diff --git a/java-dialogflow/README.md b/java-dialogflow/README.md index daa36160fd6b..6baca6646401 100644 --- a/java-dialogflow/README.md +++ b/java-dialogflow/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.21.0 + 26.22.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.28.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.29.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsClient.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsClient.java index fa64b5e9fc60..786b82a0af2d 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsClient.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsClient.java @@ -1273,6 +1273,89 @@ public final GenerateStatelessSummaryResponse generateStatelessSummary( return stub.generateStatelessSummaryCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get answers for the given query based on knowledge documents. + * + *

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()) {
+   *   SearchKnowledgeRequest request =
+   *       SearchKnowledgeRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setConversationProfile(
+   *               ConversationProfileName.ofProjectConversationProfileName(
+   *                       "[PROJECT]", "[CONVERSATION_PROFILE]")
+   *                   .toString())
+   *           .setSessionId("sessionId607796817")
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .build();
+   *   SearchKnowledgeResponse response = conversationsClient.searchKnowledge(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 SearchKnowledgeResponse searchKnowledge(SearchKnowledgeRequest request) { + return searchKnowledgeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get answers for the given query based on knowledge documents. + * + *

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()) {
+   *   SearchKnowledgeRequest request =
+   *       SearchKnowledgeRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setConversationProfile(
+   *               ConversationProfileName.ofProjectConversationProfileName(
+   *                       "[PROJECT]", "[CONVERSATION_PROFILE]")
+   *                   .toString())
+   *           .setSessionId("sessionId607796817")
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationsClient.searchKnowledgeCallable().futureCall(request);
+   *   // Do something.
+   *   SearchKnowledgeResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + searchKnowledgeCallable() { + return stub.searchKnowledgeCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsSettings.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsSettings.java index 2c543cb17936..b5075492a6d4 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsSettings.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ConversationsSettings.java @@ -121,6 +121,12 @@ public UnaryCallSettings getConversationSe return ((ConversationsStubSettings) getStubSettings()).generateStatelessSummarySettings(); } + /** Returns the object with the settings used for calls to searchKnowledge. */ + public UnaryCallSettings + searchKnowledgeSettings() { + return ((ConversationsStubSettings) getStubSettings()).searchKnowledgeSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -293,6 +299,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().generateStatelessSummarySettings(); } + /** Returns the builder for the settings used for calls to searchKnowledge. */ + public UnaryCallSettings.Builder + searchKnowledgeSettings() { + return getStubSettingsBuilder().searchKnowledgeSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json index ba96101ac45a..88d73972f1a1 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json @@ -130,6 +130,9 @@ "ListMessages": { "methods": ["listMessages", "listMessages", "listMessages", "listMessagesPagedCallable", "listMessagesCallable"] }, + "SearchKnowledge": { + "methods": ["searchKnowledge", "searchKnowledgeCallable"] + }, "SuggestConversationSummary": { "methods": ["suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummaryCallable"] } diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStub.java index 699f8aaa5707..63646d35d4ab 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStub.java @@ -32,6 +32,8 @@ import com.google.cloud.dialogflow.v2.ListConversationsResponse; import com.google.cloud.dialogflow.v2.ListMessagesRequest; import com.google.cloud.dialogflow.v2.ListMessagesResponse; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -90,6 +92,10 @@ public UnaryCallable listMessagesCall throw new UnsupportedOperationException("Not implemented: generateStatelessSummaryCallable()"); } + public UnaryCallable searchKnowledgeCallable() { + throw new UnsupportedOperationException("Not implemented: searchKnowledgeCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStubSettings.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStubSettings.java index bfe679d68ee8..fc6de40008b7 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStubSettings.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ConversationsStubSettings.java @@ -56,6 +56,8 @@ import com.google.cloud.dialogflow.v2.ListMessagesRequest; import com.google.cloud.dialogflow.v2.ListMessagesResponse; import com.google.cloud.dialogflow.v2.Message; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -133,6 +135,8 @@ public class ConversationsStubSettings extends StubSettings generateStatelessSummarySettings; + private final UnaryCallSettings + searchKnowledgeSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -346,6 +350,12 @@ public UnaryCallSettings getConversationSe return generateStatelessSummarySettings; } + /** Returns the object with the settings used for calls to searchKnowledge. */ + public UnaryCallSettings + searchKnowledgeSettings() { + return searchKnowledgeSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -471,6 +481,7 @@ protected ConversationsStubSettings(Builder settingsBuilder) throws IOException suggestConversationSummarySettings = settingsBuilder.suggestConversationSummarySettings().build(); generateStatelessSummarySettings = settingsBuilder.generateStatelessSummarySettings().build(); + searchKnowledgeSettings = settingsBuilder.searchKnowledgeSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -496,6 +507,8 @@ public static class Builder extends StubSettings.Builder generateStatelessSummarySettings; + private final UnaryCallSettings.Builder + searchKnowledgeSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -545,6 +558,7 @@ protected Builder(ClientContext clientContext) { listMessagesSettings = PagedCallSettings.newBuilder(LIST_MESSAGES_PAGE_STR_FACT); suggestConversationSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); generateStatelessSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchKnowledgeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -557,6 +571,7 @@ protected Builder(ClientContext clientContext) { listMessagesSettings, suggestConversationSummarySettings, generateStatelessSummarySettings, + searchKnowledgeSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -572,6 +587,7 @@ protected Builder(ConversationsStubSettings settings) { listMessagesSettings = settings.listMessagesSettings.toBuilder(); suggestConversationSummarySettings = settings.suggestConversationSummarySettings.toBuilder(); generateStatelessSummarySettings = settings.generateStatelessSummarySettings.toBuilder(); + searchKnowledgeSettings = settings.searchKnowledgeSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -584,6 +600,7 @@ protected Builder(ConversationsStubSettings settings) { listMessagesSettings, suggestConversationSummarySettings, generateStatelessSummarySettings, + searchKnowledgeSettings, listLocationsSettings, getLocationSettings); } @@ -650,6 +667,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 + .searchKnowledgeSettings() + .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")) @@ -724,6 +746,12 @@ public Builder applyToAllUnaryMethods( return generateStatelessSummarySettings; } + /** Returns the builder for the settings used for calls to searchKnowledge. */ + public UnaryCallSettings.Builder + searchKnowledgeSettings() { + return searchKnowledgeSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcConversationsStub.java index ec8cc46dce77..3c04df988be3 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcConversationsStub.java @@ -37,6 +37,8 @@ import com.google.cloud.dialogflow.v2.ListConversationsResponse; import com.google.cloud.dialogflow.v2.ListMessagesRequest; import com.google.cloud.dialogflow.v2.ListMessagesResponse; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -137,6 +139,17 @@ public class GrpcConversationsStub extends ConversationsStub { ProtoUtils.marshaller(GenerateStatelessSummaryResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + searchKnowledgeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Conversations/SearchKnowledge") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchKnowledgeRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchKnowledgeResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -171,6 +184,8 @@ public class GrpcConversationsStub extends ConversationsStub { suggestConversationSummaryCallable; private final UnaryCallable generateStatelessSummaryCallable; + private final UnaryCallable + searchKnowledgeCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -296,6 +311,18 @@ protected GrpcConversationsStub( return builder.build(); }) .build(); + GrpcCallSettings + searchKnowledgeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchKnowledgeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("conversation", String.valueOf(request.getConversation())); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -356,6 +383,9 @@ protected GrpcConversationsStub( generateStatelessSummaryTransportSettings, settings.generateStatelessSummarySettings(), clientContext); + this.searchKnowledgeCallable = + callableFactory.createUnaryCallable( + searchKnowledgeTransportSettings, settings.searchKnowledgeSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -423,6 +453,11 @@ public UnaryCallable listMessage return generateStatelessSummaryCallable; } + @Override + public UnaryCallable searchKnowledgeCallable() { + return searchKnowledgeCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/HttpJsonConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/HttpJsonConversationsStub.java index 2436dcd23332..38830ec99882 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/HttpJsonConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/HttpJsonConversationsStub.java @@ -43,6 +43,8 @@ import com.google.cloud.dialogflow.v2.ListConversationsResponse; import com.google.cloud.dialogflow.v2.ListMessagesRequest; import com.google.cloud.dialogflow.v2.ListMessagesResponse; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -349,6 +351,52 @@ public class HttpJsonConversationsStub extends ConversationsStub { .build()) .build(); + private static final ApiMethodDescriptor + searchKnowledgeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.v2.Conversations/SearchKnowledge") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/suggestions:searchKnowledge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "conversation", request.getConversation()); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=projects/*/locations/*}/suggestions:searchKnowledge", + "/v2/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge", + "/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearConversation().clearParent().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchKnowledgeResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -432,6 +480,8 @@ public class HttpJsonConversationsStub extends ConversationsStub { suggestConversationSummaryCallable; private final UnaryCallable generateStatelessSummaryCallable; + private final UnaryCallable + searchKnowledgeCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -565,6 +615,19 @@ protected HttpJsonConversationsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + searchKnowledgeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchKnowledgeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("conversation", String.valueOf(request.getConversation())); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -628,6 +691,9 @@ protected HttpJsonConversationsStub( generateStatelessSummaryTransportSettings, settings.generateStatelessSummarySettings(), clientContext); + this.searchKnowledgeCallable = + callableFactory.createUnaryCallable( + searchKnowledgeTransportSettings, settings.searchKnowledgeSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -652,6 +718,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listMessagesMethodDescriptor); methodDescriptors.add(suggestConversationSummaryMethodDescriptor); methodDescriptors.add(generateStatelessSummaryMethodDescriptor); + methodDescriptors.add(searchKnowledgeMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -706,6 +773,11 @@ public UnaryCallable listMessage return generateStatelessSummaryCallable; } + @Override + public UnaryCallable searchKnowledgeCallable() { + return searchKnowledgeCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java index 170026466a63..850ff41b330b 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java @@ -1404,6 +1404,89 @@ public final GenerateStatelessSummaryResponse generateStatelessSummary( return stub.generateStatelessSummaryCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get answers for the given query based on knowledge documents. + * + *

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()) {
+   *   SearchKnowledgeRequest request =
+   *       SearchKnowledgeRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setConversationProfile(
+   *               ConversationProfileName.ofProjectConversationProfileName(
+   *                       "[PROJECT]", "[CONVERSATION_PROFILE]")
+   *                   .toString())
+   *           .setSessionId("sessionId607796817")
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .build();
+   *   SearchKnowledgeResponse response = conversationsClient.searchKnowledge(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 SearchKnowledgeResponse searchKnowledge(SearchKnowledgeRequest request) { + return searchKnowledgeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get answers for the given query based on knowledge documents. + * + *

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()) {
+   *   SearchKnowledgeRequest request =
+   *       SearchKnowledgeRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setConversationProfile(
+   *               ConversationProfileName.ofProjectConversationProfileName(
+   *                       "[PROJECT]", "[CONVERSATION_PROFILE]")
+   *                   .toString())
+   *           .setSessionId("sessionId607796817")
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationsClient.searchKnowledgeCallable().futureCall(request);
+   *   // Do something.
+   *   SearchKnowledgeResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + searchKnowledgeCallable() { + return stub.searchKnowledgeCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java index 92a04d0328fc..28cd66a9e868 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java @@ -128,6 +128,12 @@ public UnaryCallSettings getConversationSe return ((ConversationsStubSettings) getStubSettings()).generateStatelessSummarySettings(); } + /** Returns the object with the settings used for calls to searchKnowledge. */ + public UnaryCallSettings + searchKnowledgeSettings() { + return ((ConversationsStubSettings) getStubSettings()).searchKnowledgeSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -306,6 +312,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().generateStatelessSummarySettings(); } + /** Returns the builder for the settings used for calls to searchKnowledge. */ + public UnaryCallSettings.Builder + searchKnowledgeSettings() { + return getStubSettingsBuilder().searchKnowledgeSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json index 0b3fe8c7b2cb..4123682d54e3 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json @@ -136,6 +136,9 @@ "ListMessages": { "methods": ["listMessages", "listMessages", "listMessages", "listMessagesPagedCallable", "listMessagesCallable"] }, + "SearchKnowledge": { + "methods": ["searchKnowledge", "searchKnowledgeCallable"] + }, "SuggestConversationSummary": { "methods": ["suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummaryCallable"] } diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java index d23400a77712..78f40d706208 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java @@ -35,6 +35,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.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -99,6 +101,10 @@ public UnaryCallable listMessagesCall throw new UnsupportedOperationException("Not implemented: generateStatelessSummaryCallable()"); } + public UnaryCallable searchKnowledgeCallable() { + throw new UnsupportedOperationException("Not implemented: searchKnowledgeCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java index 32775a5a97a3..7efc0178cec2 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java @@ -58,6 +58,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.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -138,6 +140,8 @@ public class ConversationsStubSettings extends StubSettings generateStatelessSummarySettings; + private final UnaryCallSettings + searchKnowledgeSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -357,6 +361,12 @@ public UnaryCallSettings getConversationSe return generateStatelessSummarySettings; } + /** Returns the object with the settings used for calls to searchKnowledge. */ + public UnaryCallSettings + searchKnowledgeSettings() { + return searchKnowledgeSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -483,6 +493,7 @@ protected ConversationsStubSettings(Builder settingsBuilder) throws IOException suggestConversationSummarySettings = settingsBuilder.suggestConversationSummarySettings().build(); generateStatelessSummarySettings = settingsBuilder.generateStatelessSummarySettings().build(); + searchKnowledgeSettings = settingsBuilder.searchKnowledgeSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -510,6 +521,8 @@ public static class Builder extends StubSettings.Builder generateStatelessSummarySettings; + private final UnaryCallSettings.Builder + searchKnowledgeSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -560,6 +573,7 @@ protected Builder(ClientContext clientContext) { listMessagesSettings = PagedCallSettings.newBuilder(LIST_MESSAGES_PAGE_STR_FACT); suggestConversationSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); generateStatelessSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchKnowledgeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -573,6 +587,7 @@ protected Builder(ClientContext clientContext) { listMessagesSettings, suggestConversationSummarySettings, generateStatelessSummarySettings, + searchKnowledgeSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -589,6 +604,7 @@ protected Builder(ConversationsStubSettings settings) { listMessagesSettings = settings.listMessagesSettings.toBuilder(); suggestConversationSummarySettings = settings.suggestConversationSummarySettings.toBuilder(); generateStatelessSummarySettings = settings.generateStatelessSummarySettings.toBuilder(); + searchKnowledgeSettings = settings.searchKnowledgeSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -602,6 +618,7 @@ protected Builder(ConversationsStubSettings settings) { listMessagesSettings, suggestConversationSummarySettings, generateStatelessSummarySettings, + searchKnowledgeSettings, listLocationsSettings, getLocationSettings); } @@ -673,6 +690,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 + .searchKnowledgeSettings() + .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")) @@ -753,6 +775,12 @@ public Builder applyToAllUnaryMethods( return generateStatelessSummarySettings; } + /** Returns the builder for the settings used for calls to searchKnowledge. */ + public UnaryCallSettings.Builder + searchKnowledgeSettings() { + return searchKnowledgeSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java index 572f3653f021..13afb56fd35d 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java @@ -40,6 +40,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.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -154,6 +156,17 @@ public class GrpcConversationsStub extends ConversationsStub { ProtoUtils.marshaller(GenerateStatelessSummaryResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + searchKnowledgeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2beta1.Conversations/SearchKnowledge") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchKnowledgeRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchKnowledgeResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -190,6 +203,8 @@ public class GrpcConversationsStub extends ConversationsStub { suggestConversationSummaryCallable; private final UnaryCallable generateStatelessSummaryCallable; + private final UnaryCallable + searchKnowledgeCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -326,6 +341,18 @@ protected GrpcConversationsStub( return builder.build(); }) .build(); + GrpcCallSettings + searchKnowledgeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchKnowledgeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("conversation", String.valueOf(request.getConversation())); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -391,6 +418,9 @@ protected GrpcConversationsStub( generateStatelessSummaryTransportSettings, settings.generateStatelessSummarySettings(), clientContext); + this.searchKnowledgeCallable = + callableFactory.createUnaryCallable( + searchKnowledgeTransportSettings, settings.searchKnowledgeSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -464,6 +494,11 @@ public UnaryCallable listMessage return generateStatelessSummaryCallable; } + @Override + public UnaryCallable searchKnowledgeCallable() { + return searchKnowledgeCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java index f7bdb725afe7..e8e41dfc9862 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java @@ -45,6 +45,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.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; @@ -392,6 +394,52 @@ public class HttpJsonConversationsStub extends ConversationsStub { .build()) .build(); + private static final ApiMethodDescriptor + searchKnowledgeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.v2beta1.Conversations/SearchKnowledge") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta1/{parent=projects/*}/suggestions:searchKnowledge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "conversation", request.getConversation()); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2beta1/{parent=projects/*/locations/*}/suggestions:searchKnowledge", + "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge", + "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearConversation().clearParent().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchKnowledgeResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -477,6 +525,8 @@ public class HttpJsonConversationsStub extends ConversationsStub { suggestConversationSummaryCallable; private final UnaryCallable generateStatelessSummaryCallable; + private final UnaryCallable + searchKnowledgeCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -623,6 +673,19 @@ protected HttpJsonConversationsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + searchKnowledgeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchKnowledgeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("conversation", String.valueOf(request.getConversation())); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -691,6 +754,9 @@ protected HttpJsonConversationsStub( generateStatelessSummaryTransportSettings, settings.generateStatelessSummarySettings(), clientContext); + this.searchKnowledgeCallable = + callableFactory.createUnaryCallable( + searchKnowledgeTransportSettings, settings.searchKnowledgeSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -716,6 +782,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listMessagesMethodDescriptor); methodDescriptors.add(suggestConversationSummaryMethodDescriptor); methodDescriptors.add(generateStatelessSummaryMethodDescriptor); + methodDescriptors.add(searchKnowledgeMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -776,6 +843,11 @@ public UnaryCallable listMessage return generateStatelessSummaryCallable; } + @Override + public UnaryCallable searchKnowledgeCallable() { + return searchKnowledgeCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2/reflect-config.json b/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2/reflect-config.json index 6ed59d214205..d888c084626e 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2/reflect-config.json +++ b/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2/reflect-config.json @@ -467,6 +467,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.AgentAssistantFeedback$KnowledgeSearchFeedback", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.AgentAssistantFeedback$KnowledgeSearchFeedback$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.AgentAssistantFeedback$SummarizationFeedback", "queryAllDeclaredConstructors": true, @@ -1817,6 +1835,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.DialogflowAssistAnswer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.DialogflowAssistAnswer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.Document", "queryAllDeclaredConstructors": true, @@ -2843,6 +2879,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig$SuggestionQueryConfig$DialogflowQuerySource$HumanAgentSideConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig$SuggestionQueryConfig$DialogflowQuerySource$HumanAgentSideConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig$SuggestionQueryConfig$DocumentQuerySource", "queryAllDeclaredConstructors": true, @@ -3842,6 +3896,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.IntentSuggestion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.IntentSuggestion$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.IntentView", "queryAllDeclaredConstructors": true, @@ -4769,6 +4841,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer$AnswerSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer$AnswerSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer$AnswerType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SearchKnowledgeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.Sentiment", "queryAllDeclaredConstructors": true, @@ -5336,6 +5489,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2.SuggestionInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2.SuggestionInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2.SuggestionResult", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2beta1/reflect-config.json b/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2beta1/reflect-config.json index 68c09ee2d469..dd4628b43874 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2beta1/reflect-config.json +++ b/java-dialogflow/google-cloud-dialogflow/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.v2beta1/reflect-config.json @@ -467,6 +467,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback$KnowledgeSearchFeedback", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback$KnowledgeSearchFeedback$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback$SummarizationFeedback", "queryAllDeclaredConstructors": true, @@ -4832,6 +4850,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer$AnswerSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer$AnswerSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer$AnswerType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.v2beta1.Sentiment", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientHttpJsonTest.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientHttpJsonTest.java index ba4900b64389..3647c6108f51 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientHttpJsonTest.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientHttpJsonTest.java @@ -895,6 +895,82 @@ public void generateStatelessSummaryExceptionTest() throws Exception { } } + @Test + public void searchKnowledgeTest() throws Exception { + SearchKnowledgeResponse expectedResponse = + SearchKnowledgeResponse.newBuilder() + .addAllAnswers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("projects/project-2353") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + + SearchKnowledgeResponse actualResponse = client.searchKnowledge(request); + 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 searchKnowledgeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("projects/project-2353") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + client.searchKnowledge(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientTest.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientTest.java index 581390cd2b03..f6cbc62d66e1 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientTest.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ConversationsClientTest.java @@ -37,6 +37,7 @@ import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -816,6 +817,81 @@ public void generateStatelessSummaryExceptionTest() throws Exception { } } + @Test + public void searchKnowledgeTest() throws Exception { + SearchKnowledgeResponse expectedResponse = + SearchKnowledgeResponse.newBuilder() + .addAllAnswers(new ArrayList()) + .build(); + mockConversations.addResponse(expectedResponse); + + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + + SearchKnowledgeResponse actualResponse = client.searchKnowledge(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchKnowledgeRequest actualRequest = ((SearchKnowledgeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getConversationProfile(), actualRequest.getConversationProfile()); + Assert.assertEquals(request.getSessionId(), actualRequest.getSessionId()); + Assert.assertEquals(request.getConversation(), actualRequest.getConversation()); + Assert.assertEquals(request.getLatestMessage(), actualRequest.getLatestMessage()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchKnowledgeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversations.addException(exception); + + try { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + client.searchKnowledge(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockConversationsImpl.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockConversationsImpl.java index 04332c8b6c66..bb4b8d459298 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockConversationsImpl.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockConversationsImpl.java @@ -207,4 +207,25 @@ public void generateStatelessSummary( Exception.class.getName()))); } } + + @Override + public void searchKnowledge( + SearchKnowledgeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchKnowledgeResponse) { + requests.add(request); + responseObserver.onNext(((SearchKnowledgeResponse) 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 SearchKnowledge, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchKnowledgeResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java index e09ecfed84b9..0534c141c12f 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java @@ -981,6 +981,82 @@ public void generateStatelessSummaryExceptionTest() throws Exception { } } + @Test + public void searchKnowledgeTest() throws Exception { + SearchKnowledgeResponse expectedResponse = + SearchKnowledgeResponse.newBuilder() + .addAllAnswers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("projects/project-2353") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + + SearchKnowledgeResponse actualResponse = client.searchKnowledge(request); + 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 searchKnowledgeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("projects/project-2353") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + client.searchKnowledge(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java index 81eb7c016a24..10d17d924aa6 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java @@ -891,6 +891,81 @@ public void generateStatelessSummaryExceptionTest() throws Exception { } } + @Test + public void searchKnowledgeTest() throws Exception { + SearchKnowledgeResponse expectedResponse = + SearchKnowledgeResponse.newBuilder() + .addAllAnswers(new ArrayList()) + .build(); + mockConversations.addResponse(expectedResponse); + + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + + SearchKnowledgeResponse actualResponse = client.searchKnowledge(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchKnowledgeRequest actualRequest = ((SearchKnowledgeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getConversationProfile(), actualRequest.getConversationProfile()); + Assert.assertEquals(request.getSessionId(), actualRequest.getSessionId()); + Assert.assertEquals(request.getConversation(), actualRequest.getConversation()); + Assert.assertEquals(request.getLatestMessage(), actualRequest.getLatestMessage()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchKnowledgeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversations.addException(exception); + + try { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + client.searchKnowledge(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java index ad70ce8c7301..0ca3ddf5d694 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java @@ -229,4 +229,25 @@ public void generateStatelessSummary( Exception.class.getName()))); } } + + @Override + public void searchKnowledge( + SearchKnowledgeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchKnowledgeResponse) { + requests.add(request); + responseObserver.onNext(((SearchKnowledgeResponse) 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 SearchKnowledge, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchKnowledgeResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationsGrpc.java b/java-dialogflow/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationsGrpc.java index e7ea08ab99a4..748896175526 100644 --- a/java-dialogflow/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationsGrpc.java +++ b/java-dialogflow/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationsGrpc.java @@ -373,6 +373,53 @@ private ConversationsGrpc() {} return getGenerateStatelessSummaryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse> + getSearchKnowledgeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchKnowledge", + requestType = com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.class, + responseType = com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse> + getSearchKnowledgeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse> + getSearchKnowledgeMethod; + if ((getSearchKnowledgeMethod = ConversationsGrpc.getSearchKnowledgeMethod) == null) { + synchronized (ConversationsGrpc.class) { + if ((getSearchKnowledgeMethod = ConversationsGrpc.getSearchKnowledgeMethod) == null) { + ConversationsGrpc.getSearchKnowledgeMethod = + getSearchKnowledgeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchKnowledge")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationsMethodDescriptorSupplier("SearchKnowledge")) + .build(); + } + } + } + return getSearchKnowledgeMethod; + } + /** 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 = @@ -550,6 +597,21 @@ default void generateStatelessSummary( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGenerateStatelessSummaryMethod(), responseObserver); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + default void searchKnowledge( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchKnowledgeMethod(), responseObserver); + } } /** @@ -728,6 +790,23 @@ public void generateStatelessSummary( request, responseObserver); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public void searchKnowledge( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchKnowledgeMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -865,6 +944,19 @@ public com.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse generateS return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGenerateStatelessSummaryMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeResponse searchKnowledge( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchKnowledgeMethod(), getCallOptions(), request); + } } /** @@ -1010,6 +1102,20 @@ protected ConversationsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGenerateStatelessSummaryMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse> + searchKnowledge(com.google.cloud.dialogflow.v2.SearchKnowledgeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchKnowledgeMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_CONVERSATION = 0; @@ -1019,6 +1125,7 @@ protected ConversationsFutureStub build( private static final int METHODID_LIST_MESSAGES = 4; private static final int METHODID_SUGGEST_CONVERSATION_SUMMARY = 5; private static final int METHODID_GENERATE_STATELESS_SUMMARY = 6; + private static final int METHODID_SEARCH_KNOWLEDGE = 7; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1082,6 +1189,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse>) responseObserver); break; + case METHODID_SEARCH_KNOWLEDGE: + serviceImpl.searchKnowledge( + (com.google.cloud.dialogflow.v2.SearchKnowledgeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1149,6 +1262,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest, com.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse>( service, METHODID_GENERATE_STATELESS_SUMMARY))) + .addMethod( + getSearchKnowledgeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse>( + service, METHODID_SEARCH_KNOWLEDGE))) .build(); } @@ -1207,6 +1327,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListMessagesMethod()) .addMethod(getSuggestConversationSummaryMethod()) .addMethod(getGenerateStatelessSummaryMethod()) + .addMethod(getSearchKnowledgeMethod()) .build(); } } diff --git a/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java b/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java index ec2dfc66af80..5d837254eecd 100644 --- a/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java +++ b/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java @@ -425,6 +425,53 @@ private ConversationsGrpc() {} return getGenerateStatelessSummaryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse> + getSearchKnowledgeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchKnowledge", + requestType = com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.class, + responseType = com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse> + getSearchKnowledgeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse> + getSearchKnowledgeMethod; + if ((getSearchKnowledgeMethod = ConversationsGrpc.getSearchKnowledgeMethod) == null) { + synchronized (ConversationsGrpc.class) { + if ((getSearchKnowledgeMethod = ConversationsGrpc.getSearchKnowledgeMethod) == null) { + ConversationsGrpc.getSearchKnowledgeMethod = + getSearchKnowledgeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchKnowledge")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationsMethodDescriptorSupplier("SearchKnowledge")) + .build(); + } + } + } + return getSearchKnowledgeMethod; + } + /** 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 = @@ -622,6 +669,21 @@ default void generateStatelessSummary( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGenerateStatelessSummaryMethod(), responseObserver); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + default void searchKnowledge( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchKnowledgeMethod(), responseObserver); + } } /** @@ -822,6 +884,23 @@ public void generateStatelessSummary( request, responseObserver); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public void searchKnowledge( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchKnowledgeMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -974,6 +1053,19 @@ public com.google.cloud.dialogflow.v2beta1.ListMessagesResponse listMessages( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGenerateStatelessSummaryMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse searchKnowledge( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchKnowledgeMethod(), getCallOptions(), request); + } } /** @@ -1136,6 +1228,20 @@ protected ConversationsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGenerateStatelessSummaryMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Get answers for the given query based on knowledge documents.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse> + searchKnowledge(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchKnowledgeMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_CONVERSATION = 0; @@ -1146,6 +1252,7 @@ protected ConversationsFutureStub build( private static final int METHODID_LIST_MESSAGES = 5; private static final int METHODID_SUGGEST_CONVERSATION_SUMMARY = 6; private static final int METHODID_GENERATE_STATELESS_SUMMARY = 7; + private static final int METHODID_SEARCH_KNOWLEDGE = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1217,6 +1324,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse>) responseObserver); break; + case METHODID_SEARCH_KNOWLEDGE: + serviceImpl.searchKnowledge( + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1291,6 +1405,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest, com.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse>( service, METHODID_GENERATE_STATELESS_SUMMARY))) + .addMethod( + getSearchKnowledgeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse>( + service, METHODID_SEARCH_KNOWLEDGE))) .build(); } @@ -1350,6 +1471,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListMessagesMethod()) .addMethod(getSuggestConversationSummaryMethod()) .addMethod(getGenerateStatelessSummaryMethod()) + .addMethod(getSearchKnowledgeMethod()) .build(); } } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedback.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedback.java index 2031b6bc1115..930b20bc59de 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedback.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedback.java @@ -1806,6 +1806,986 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface KnowledgeSearchFeedbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Whether the answer was copied by the human agent or not.
+     * If the value is set to be true,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + boolean getAnswerCopied(); + + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + java.util.List getClickedUrisList(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + int getClickedUrisCount(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + java.lang.String getClickedUris(int index); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + com.google.protobuf.ByteString getClickedUrisBytes(int index); + } + /** + * + * + *
+   * Feedback for knowledge search.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback} + */ + public static final class KnowledgeSearchFeedback extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + KnowledgeSearchFeedbackOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeSearchFeedback.newBuilder() to construct. + private KnowledgeSearchFeedback(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeSearchFeedback() { + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeSearchFeedback(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.class, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder + .class); + } + + public static final int ANSWER_COPIED_FIELD_NUMBER = 1; + private boolean answerCopied_ = false; + /** + * + * + *
+     * Whether the answer was copied by the human agent or not.
+     * If the value is set to be true,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + @java.lang.Override + public boolean getAnswerCopied() { + return answerCopied_; + } + + public static final int CLICKED_URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList clickedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + public com.google.protobuf.ProtocolStringList getClickedUrisList() { + return clickedUris_; + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + public int getClickedUrisCount() { + return clickedUris_.size(); + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + public java.lang.String getClickedUris(int index) { + return clickedUris_.get(index); + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + public com.google.protobuf.ByteString getClickedUrisBytes(int index) { + return clickedUris_.getByteString(index); + } + + 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 (answerCopied_ != false) { + output.writeBool(1, answerCopied_); + } + for (int i = 0; i < clickedUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clickedUris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (answerCopied_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, answerCopied_); + } + { + int dataSize = 0; + for (int i = 0; i < clickedUris_.size(); i++) { + dataSize += computeStringSizeNoTag(clickedUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getClickedUrisList().size(); + } + size += getUnknownFields().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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback other = + (com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) obj; + + if (getAnswerCopied() != other.getAnswerCopied()) return false; + if (!getClickedUrisList().equals(other.getClickedUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_COPIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnswerCopied()); + if (getClickedUrisCount() > 0) { + hash = (37 * hash) + CLICKED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getClickedUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback 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; + } + /** + * + * + *
+     * Feedback for knowledge search.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.class, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answerCopied_ = false; + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback build() { + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + buildPartial() { + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback result = + new com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answerCopied_ = answerCopied_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + clickedUris_.makeImmutable(); + result.clickedUris_ = clickedUris_; + } + } + + @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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) { + return mergeFrom( + (com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback other) { + if (other + == com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance()) return this; + if (other.getAnswerCopied() != false) { + setAnswerCopied(other.getAnswerCopied()); + } + if (!other.clickedUris_.isEmpty()) { + if (clickedUris_.isEmpty()) { + clickedUris_ = other.clickedUris_; + bitField0_ |= 0x00000002; + } else { + ensureClickedUrisIsMutable(); + clickedUris_.addAll(other.clickedUris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + answerCopied_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureClickedUrisIsMutable(); + clickedUris_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean answerCopied_; + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + @java.lang.Override + public boolean getAnswerCopied() { + return answerCopied_; + } + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @param value The answerCopied to set. + * @return This builder for chaining. + */ + public Builder setAnswerCopied(boolean value) { + + answerCopied_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @return This builder for chaining. + */ + public Builder clearAnswerCopied() { + bitField0_ = (bitField0_ & ~0x00000001); + answerCopied_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList clickedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureClickedUrisIsMutable() { + if (!clickedUris_.isModifiable()) { + clickedUris_ = new com.google.protobuf.LazyStringArrayList(clickedUris_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + public com.google.protobuf.ProtocolStringList getClickedUrisList() { + clickedUris_.makeImmutable(); + return clickedUris_; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + public int getClickedUrisCount() { + return clickedUris_.size(); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + public java.lang.String getClickedUris(int index) { + return clickedUris_.get(index); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + public com.google.protobuf.ByteString getClickedUrisBytes(int index) { + return clickedUris_.getByteString(index); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index to set the value at. + * @param value The clickedUris to set. + * @return This builder for chaining. + */ + public Builder setClickedUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClickedUrisIsMutable(); + clickedUris_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param value The clickedUris to add. + * @return This builder for chaining. + */ + public Builder addClickedUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClickedUrisIsMutable(); + clickedUris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param values The clickedUris to add. + * @return This builder for chaining. + */ + public Builder addAllClickedUris(java.lang.Iterable values) { + ensureClickedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clickedUris_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return This builder for chaining. + */ + public Builder clearClickedUris() { + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest].
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param value The bytes of the clickedUris to add. + * @return This builder for chaining. + */ + public Builder addClickedUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClickedUrisIsMutable(); + clickedUris_.add(value); + bitField0_ |= 0x00000002; + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback) + private static final com.google.cloud.dialogflow.v2.AgentAssistantFeedback + .KnowledgeSearchFeedback + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback(); + } + + public static com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeSearchFeedback parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int ANSWER_RELEVANCE_FIELD_NUMBER = 1; private int answerRelevance_ = 0; /** @@ -2036,6 +3016,67 @@ public boolean hasSummarizationFeedback() { : summarizationFeedback_; } + public static final int KNOWLEDGE_SEARCH_FEEDBACK_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + knowledgeSearchFeedback_; + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + @java.lang.Override + public boolean hasKnowledgeSearchFeedback() { + return knowledgeSearchFeedback_ != null; + } + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback() { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder() { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2071,6 +3112,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (summarizationFeedback_ != null) { output.writeMessage(4, getSummarizationFeedback()); } + if (knowledgeSearchFeedback_ != null) { + output.writeMessage(5, getKnowledgeSearchFeedback()); + } getUnknownFields().writeTo(output); } @@ -2102,6 +3146,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSummarizationFeedback()); } + if (knowledgeSearchFeedback_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKnowledgeSearchFeedback()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2125,6 +3173,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSummarizationFeedback()) { if (!getSummarizationFeedback().equals(other.getSummarizationFeedback())) return false; } + if (hasKnowledgeSearchFeedback() != other.hasKnowledgeSearchFeedback()) return false; + if (hasKnowledgeSearchFeedback()) { + if (!getKnowledgeSearchFeedback().equals(other.getKnowledgeSearchFeedback())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2146,6 +3198,10 @@ public int hashCode() { hash = (37 * hash) + SUMMARIZATION_FEEDBACK_FIELD_NUMBER; hash = (53 * hash) + getSummarizationFeedback().hashCode(); } + if (hasKnowledgeSearchFeedback()) { + hash = (37 * hash) + KNOWLEDGE_SEARCH_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeSearchFeedback().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2294,6 +3350,11 @@ public Builder clear() { summarizationFeedbackBuilder_.dispose(); summarizationFeedbackBuilder_ = null; } + knowledgeSearchFeedback_ = null; + if (knowledgeSearchFeedbackBuilder_ != null) { + knowledgeSearchFeedbackBuilder_.dispose(); + knowledgeSearchFeedbackBuilder_ = null; + } return this; } @@ -2345,6 +3406,12 @@ private void buildPartial0(com.google.cloud.dialogflow.v2.AgentAssistantFeedback ? summarizationFeedback_ : summarizationFeedbackBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.knowledgeSearchFeedback_ = + knowledgeSearchFeedbackBuilder_ == null + ? knowledgeSearchFeedback_ + : knowledgeSearchFeedbackBuilder_.build(); + } } @java.lang.Override @@ -2405,6 +3472,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.AgentAssistantFeedback o if (other.hasSummarizationFeedback()) { mergeSummarizationFeedback(other.getSummarizationFeedback()); } + if (other.hasKnowledgeSearchFeedback()) { + mergeKnowledgeSearchFeedback(other.getKnowledgeSearchFeedback()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2456,6 +3526,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 42: + { + input.readMessage( + getKnowledgeSearchFeedbackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3104,6 +4181,221 @@ public Builder clearSummarizationFeedback() { return summarizationFeedbackBuilder_; } + private com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + knowledgeSearchFeedback_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder> + knowledgeSearchFeedbackBuilder_; + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + public boolean hasKnowledgeSearchFeedback() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback() { + if (knowledgeSearchFeedbackBuilder_ == null) { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } else { + return knowledgeSearchFeedbackBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback value) { + if (knowledgeSearchFeedbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeSearchFeedback_ = value; + } else { + knowledgeSearchFeedbackBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder + builderForValue) { + if (knowledgeSearchFeedbackBuilder_ == null) { + knowledgeSearchFeedback_ = builderForValue.build(); + } else { + knowledgeSearchFeedbackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback value) { + if (knowledgeSearchFeedbackBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && knowledgeSearchFeedback_ != null + && knowledgeSearchFeedback_ + != com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance()) { + getKnowledgeSearchFeedbackBuilder().mergeFrom(value); + } else { + knowledgeSearchFeedback_ = value; + } + } else { + knowledgeSearchFeedbackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeSearchFeedback() { + bitField0_ = (bitField0_ & ~0x00000010); + knowledgeSearchFeedback_ = null; + if (knowledgeSearchFeedbackBuilder_ != null) { + knowledgeSearchFeedbackBuilder_.dispose(); + knowledgeSearchFeedbackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder + getKnowledgeSearchFeedbackBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getKnowledgeSearchFeedbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder() { + if (knowledgeSearchFeedbackBuilder_ != null) { + return knowledgeSearchFeedbackBuilder_.getMessageOrBuilder(); + } else { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder> + getKnowledgeSearchFeedbackFieldBuilder() { + if (knowledgeSearchFeedbackBuilder_ == null) { + knowledgeSearchFeedbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder, + com.google.cloud.dialogflow.v2.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder>( + getKnowledgeSearchFeedback(), getParentForChildren(), isClean()); + knowledgeSearchFeedback_ = null; + } + return knowledgeSearchFeedbackBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedbackOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedbackOrBuilder.java index 671ffb385d51..a1f6faf1a30f 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedbackOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantFeedbackOrBuilder.java @@ -193,4 +193,47 @@ public interface AgentAssistantFeedbackOrBuilder */ com.google.cloud.dialogflow.v2.AgentAssistantFeedback.SummarizationFeedbackOrBuilder getSummarizationFeedbackOrBuilder(); + + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + boolean hasKnowledgeSearchFeedback(); + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback(); + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.v2.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecord.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecord.java index 9c7590625229..d752cac74154 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecord.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecord.java @@ -71,6 +71,7 @@ public enum AnswerCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { ARTICLE_SUGGESTION_ANSWER(5), FAQ_ANSWER(6), + DIALOGFLOW_ASSIST_ANSWER(7), ANSWER_NOT_SET(0); private final int value; @@ -93,6 +94,8 @@ public static AnswerCase forNumber(int value) { return ARTICLE_SUGGESTION_ANSWER; case 6: return FAQ_ANSWER; + case 7: + return DIALOGFLOW_ASSIST_ANSWER; case 0: return ANSWER_NOT_SET; default: @@ -224,6 +227,64 @@ public com.google.cloud.dialogflow.v2.FaqAnswerOrBuilder getFaqAnswerOrBuilder() return com.google.cloud.dialogflow.v2.FaqAnswer.getDefaultInstance(); } + public static final int DIALOGFLOW_ASSIST_ANSWER_FIELD_NUMBER = 7; + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dialogflowAssistAnswer field is set. + */ + @java.lang.Override + public boolean hasDialogflowAssistAnswer() { + return answerCase_ == 7; + } + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dialogflowAssistAnswer. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer getDialogflowAssistAnswer() { + if (answerCase_ == 7) { + return (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_; + } + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder + getDialogflowAssistAnswerOrBuilder() { + if (answerCase_ == 7) { + return (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_; + } + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -244,6 +305,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (answerCase_ == 6) { output.writeMessage(6, (com.google.cloud.dialogflow.v2.FaqAnswer) answer_); } + if (answerCase_ == 7) { + output.writeMessage(7, (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_); + } getUnknownFields().writeTo(output); } @@ -263,6 +327,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.cloud.dialogflow.v2.FaqAnswer) answer_); } + if (answerCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -287,6 +356,9 @@ public boolean equals(final java.lang.Object obj) { case 6: if (!getFaqAnswer().equals(other.getFaqAnswer())) return false; break; + case 7: + if (!getDialogflowAssistAnswer().equals(other.getDialogflowAssistAnswer())) return false; + break; case 0: default: } @@ -310,6 +382,10 @@ public int hashCode() { hash = (37 * hash) + FAQ_ANSWER_FIELD_NUMBER; hash = (53 * hash) + getFaqAnswer().hashCode(); break; + case 7: + hash = (37 * hash) + DIALOGFLOW_ASSIST_ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getDialogflowAssistAnswer().hashCode(); + break; case 0: default: } @@ -458,6 +534,9 @@ public Builder clear() { if (faqAnswerBuilder_ != null) { faqAnswerBuilder_.clear(); } + if (dialogflowAssistAnswerBuilder_ != null) { + dialogflowAssistAnswerBuilder_.clear(); + } answerCase_ = 0; answer_ = null; return this; @@ -508,6 +587,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.v2.AgentAssistantRec if (answerCase_ == 6 && faqAnswerBuilder_ != null) { result.answer_ = faqAnswerBuilder_.build(); } + if (answerCase_ == 7 && dialogflowAssistAnswerBuilder_ != null) { + result.answer_ = dialogflowAssistAnswerBuilder_.build(); + } } @java.lang.Override @@ -567,6 +649,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.AgentAssistantRecord oth mergeFaqAnswer(other.getFaqAnswer()); break; } + case DIALOGFLOW_ASSIST_ANSWER: + { + mergeDialogflowAssistAnswer(other.getDialogflowAssistAnswer()); + break; + } case ANSWER_NOT_SET: { break; @@ -611,6 +698,13 @@ public Builder mergeFrom( answerCase_ = 6; break; } // case 50 + case 58: + { + input.readMessage( + getDialogflowAssistAnswerFieldBuilder().getBuilder(), extensionRegistry); + answerCase_ = 7; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1100,6 +1194,238 @@ public com.google.cloud.dialogflow.v2.FaqAnswerOrBuilder getFaqAnswerOrBuilder() return faqAnswerBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder> + dialogflowAssistAnswerBuilder_; + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dialogflowAssistAnswer field is set. + */ + @java.lang.Override + public boolean hasDialogflowAssistAnswer() { + return answerCase_ == 7; + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dialogflowAssistAnswer. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer getDialogflowAssistAnswer() { + if (dialogflowAssistAnswerBuilder_ == null) { + if (answerCase_ == 7) { + return (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_; + } + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } else { + if (answerCase_ == 7) { + return dialogflowAssistAnswerBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDialogflowAssistAnswer( + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer value) { + if (dialogflowAssistAnswerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answer_ = value; + onChanged(); + } else { + dialogflowAssistAnswerBuilder_.setMessage(value); + } + answerCase_ = 7; + return this; + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDialogflowAssistAnswer( + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder builderForValue) { + if (dialogflowAssistAnswerBuilder_ == null) { + answer_ = builderForValue.build(); + onChanged(); + } else { + dialogflowAssistAnswerBuilder_.setMessage(builderForValue.build()); + } + answerCase_ = 7; + return this; + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDialogflowAssistAnswer( + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer value) { + if (dialogflowAssistAnswerBuilder_ == null) { + if (answerCase_ == 7 + && answer_ + != com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance()) { + answer_ = + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.newBuilder( + (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_) + .mergeFrom(value) + .buildPartial(); + } else { + answer_ = value; + } + onChanged(); + } else { + if (answerCase_ == 7) { + dialogflowAssistAnswerBuilder_.mergeFrom(value); + } else { + dialogflowAssistAnswerBuilder_.setMessage(value); + } + } + answerCase_ = 7; + return this; + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDialogflowAssistAnswer() { + if (dialogflowAssistAnswerBuilder_ == null) { + if (answerCase_ == 7) { + answerCase_ = 0; + answer_ = null; + onChanged(); + } + } else { + if (answerCase_ == 7) { + answerCase_ = 0; + answer_ = null; + } + dialogflowAssistAnswerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder + getDialogflowAssistAnswerBuilder() { + return getDialogflowAssistAnswerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder + getDialogflowAssistAnswerOrBuilder() { + if ((answerCase_ == 7) && (dialogflowAssistAnswerBuilder_ != null)) { + return dialogflowAssistAnswerBuilder_.getMessageOrBuilder(); + } else { + if (answerCase_ == 7) { + return (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_; + } + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Dialogflow assist answer.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder> + getDialogflowAssistAnswerFieldBuilder() { + if (dialogflowAssistAnswerBuilder_ == null) { + if (!(answerCase_ == 7)) { + answer_ = com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + dialogflowAssistAnswerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder>( + (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) answer_, + getParentForChildren(), + isClean()); + answer_ = null; + } + answerCase_ = 7; + onChanged(); + return dialogflowAssistAnswerBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecordOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecordOrBuilder.java index 3a1cbfc02ad1..bd6331d21117 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecordOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentAssistantRecordOrBuilder.java @@ -105,5 +105,47 @@ public interface AgentAssistantRecordOrBuilder */ com.google.cloud.dialogflow.v2.FaqAnswerOrBuilder getFaqAnswerOrBuilder(); + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dialogflowAssistAnswer field is set. + */ + boolean hasDialogflowAssistAnswer(); + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dialogflowAssistAnswer. + */ + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer getDialogflowAssistAnswer(); + /** + * + * + *
+   * Output only. Dialogflow assist answer.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder + getDialogflowAssistAnswerOrBuilder(); + com.google.cloud.dialogflow.v2.AgentAssistantRecord.AnswerCase getAnswerCase(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java index 4ae425368e07..7f9b792c8a4a 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java @@ -75,6 +75,7 @@ public enum InputCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { TEXT_INPUT(6), EVENT_INPUT(8), + SUGGESTION_INPUT(12), INPUT_NOT_SET(0); private final int value; @@ -97,6 +98,8 @@ public static InputCase forNumber(int value) { return TEXT_INPUT; case 8: return EVENT_INPUT; + case 12: + return SUGGESTION_INPUT; case 0: return INPUT_NOT_SET; default: @@ -274,6 +277,57 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance(); } + public static final int SUGGESTION_INPUT_FIELD_NUMBER = 12; + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return Whether the suggestionInput field is set. + */ + @java.lang.Override + public boolean hasSuggestionInput() { + return inputCase_ == 12; + } + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return The suggestionInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInput getSuggestionInput() { + if (inputCase_ == 12) { + return (com.google.cloud.dialogflow.v2.SuggestionInput) input_; + } + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder getSuggestionInputOrBuilder() { + if (inputCase_ == 12) { + return (com.google.cloud.dialogflow.v2.SuggestionInput) input_; + } + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER = 5; private com.google.cloud.dialogflow.v2.OutputAudioConfig replyAudioConfig_; /** @@ -585,6 +639,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, requestId_); } + if (inputCase_ == 12) { + output.writeMessage(12, (com.google.cloud.dialogflow.v2.SuggestionInput) input_); + } if (assistQueryParams_ != null) { output.writeMessage(14, getAssistQueryParams()); } @@ -622,6 +679,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, requestId_); } + if (inputCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.dialogflow.v2.SuggestionInput) input_); + } if (assistQueryParams_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAssistQueryParams()); } @@ -670,6 +732,9 @@ public boolean equals(final java.lang.Object obj) { case 8: if (!getEventInput().equals(other.getEventInput())) return false; break; + case 12: + if (!getSuggestionInput().equals(other.getSuggestionInput())) return false; + break; case 0: default: } @@ -713,6 +778,10 @@ public int hashCode() { hash = (37 * hash) + EVENT_INPUT_FIELD_NUMBER; hash = (53 * hash) + getEventInput().hashCode(); break; + case 12: + hash = (37 * hash) + SUGGESTION_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getSuggestionInput().hashCode(); + break; case 0: default: } @@ -863,6 +932,9 @@ public Builder clear() { if (eventInputBuilder_ != null) { eventInputBuilder_.clear(); } + if (suggestionInputBuilder_ != null) { + suggestionInputBuilder_.clear(); + } replyAudioConfig_ = null; if (replyAudioConfigBuilder_ != null) { replyAudioConfigBuilder_.dispose(); @@ -926,25 +998,25 @@ private void buildPartial0(com.google.cloud.dialogflow.v2.AnalyzeContentRequest if (((from_bitField0_ & 0x00000001) != 0)) { result.participant_ = participant_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.replyAudioConfig_ = replyAudioConfigBuilder_ == null ? replyAudioConfig_ : replyAudioConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.queryParams_ = queryParamsBuilder_ == null ? queryParams_ : queryParamsBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.assistQueryParams_ = assistQueryParamsBuilder_ == null ? assistQueryParams_ : assistQueryParamsBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.cxParameters_ = cxParametersBuilder_ == null ? cxParameters_ : cxParametersBuilder_.build(); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.requestId_ = requestId_; } } @@ -958,6 +1030,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.v2.AnalyzeContentReq if (inputCase_ == 8 && eventInputBuilder_ != null) { result.input_ = eventInputBuilder_.build(); } + if (inputCase_ == 12 && suggestionInputBuilder_ != null) { + result.input_ = suggestionInputBuilder_.build(); + } } @java.lang.Override @@ -1025,7 +1100,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.AnalyzeContentRequest ot } if (!other.getRequestId().isEmpty()) { requestId_ = other.requestId_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } switch (other.getInputCase()) { @@ -1039,6 +1114,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.AnalyzeContentRequest ot mergeEventInput(other.getEventInput()); break; } + case SUGGESTION_INPUT: + { + mergeSuggestionInput(other.getSuggestionInput()); + break; + } case INPUT_NOT_SET: { break; @@ -1080,7 +1160,7 @@ public Builder mergeFrom( { input.readMessage( getReplyAudioConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 42 case 50: @@ -1098,26 +1178,32 @@ public Builder mergeFrom( case 74: { input.readMessage(getQueryParamsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 74 case 90: { requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 90 + case 98: + { + input.readMessage(getSuggestionInputFieldBuilder().getBuilder(), extensionRegistry); + inputCase_ = 12; + break; + } // case 98 case 114: { input.readMessage( getAssistQueryParamsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 114 case 146: { input.readMessage(getCxParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 146 default: @@ -1696,6 +1782,215 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder return eventInputBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.SuggestionInput, + com.google.cloud.dialogflow.v2.SuggestionInput.Builder, + com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder> + suggestionInputBuilder_; + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return Whether the suggestionInput field is set. + */ + @java.lang.Override + public boolean hasSuggestionInput() { + return inputCase_ == 12; + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return The suggestionInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInput getSuggestionInput() { + if (suggestionInputBuilder_ == null) { + if (inputCase_ == 12) { + return (com.google.cloud.dialogflow.v2.SuggestionInput) input_; + } + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } else { + if (inputCase_ == 12) { + return suggestionInputBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + public Builder setSuggestionInput(com.google.cloud.dialogflow.v2.SuggestionInput value) { + if (suggestionInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + suggestionInputBuilder_.setMessage(value); + } + inputCase_ = 12; + return this; + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + public Builder setSuggestionInput( + com.google.cloud.dialogflow.v2.SuggestionInput.Builder builderForValue) { + if (suggestionInputBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + suggestionInputBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 12; + return this; + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + public Builder mergeSuggestionInput(com.google.cloud.dialogflow.v2.SuggestionInput value) { + if (suggestionInputBuilder_ == null) { + if (inputCase_ == 12 + && input_ != com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance()) { + input_ = + com.google.cloud.dialogflow.v2.SuggestionInput.newBuilder( + (com.google.cloud.dialogflow.v2.SuggestionInput) input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 12) { + suggestionInputBuilder_.mergeFrom(value); + } else { + suggestionInputBuilder_.setMessage(value); + } + } + inputCase_ = 12; + return this; + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + public Builder clearSuggestionInput() { + if (suggestionInputBuilder_ == null) { + if (inputCase_ == 12) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 12) { + inputCase_ = 0; + input_ = null; + } + suggestionInputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + public com.google.cloud.dialogflow.v2.SuggestionInput.Builder getSuggestionInputBuilder() { + return getSuggestionInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder getSuggestionInputOrBuilder() { + if ((inputCase_ == 12) && (suggestionInputBuilder_ != null)) { + return suggestionInputBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 12) { + return (com.google.cloud.dialogflow.v2.SuggestionInput) input_; + } + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * An input representing the selection of a suggestion.
+     * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.SuggestionInput, + com.google.cloud.dialogflow.v2.SuggestionInput.Builder, + com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder> + getSuggestionInputFieldBuilder() { + if (suggestionInputBuilder_ == null) { + if (!(inputCase_ == 12)) { + input_ = com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + suggestionInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.SuggestionInput, + com.google.cloud.dialogflow.v2.SuggestionInput.Builder, + com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder>( + (com.google.cloud.dialogflow.v2.SuggestionInput) input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 12; + onChanged(); + return suggestionInputBuilder_; + } + private com.google.cloud.dialogflow.v2.OutputAudioConfig replyAudioConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.OutputAudioConfig, @@ -1718,7 +2013,7 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder * @return Whether the replyAudioConfig field is set. */ public boolean hasReplyAudioConfig() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1766,7 +2061,7 @@ public Builder setReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioCon } else { replyAudioConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1790,7 +2085,7 @@ public Builder setReplyAudioConfig( } else { replyAudioConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1809,7 +2104,7 @@ public Builder setReplyAudioConfig( */ public Builder mergeReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioConfig value) { if (replyAudioConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && replyAudioConfig_ != null && replyAudioConfig_ != com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()) { @@ -1820,7 +2115,7 @@ public Builder mergeReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioC } else { replyAudioConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1838,7 +2133,7 @@ public Builder mergeReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioC * .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; */ public Builder clearReplyAudioConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); replyAudioConfig_ = null; if (replyAudioConfigBuilder_ != null) { replyAudioConfigBuilder_.dispose(); @@ -1861,7 +2156,7 @@ public Builder clearReplyAudioConfig() { * .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5; */ public com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder getReplyAudioConfigBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getReplyAudioConfigFieldBuilder().getBuilder(); } @@ -1936,7 +2231,7 @@ public com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder getReplyAudioCon * @return Whether the queryParams field is set. */ public boolean hasQueryParams() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1976,7 +2271,7 @@ public Builder setQueryParams(com.google.cloud.dialogflow.v2.QueryParameters val } else { queryParamsBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1996,7 +2291,7 @@ public Builder setQueryParams( } else { queryParamsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2011,7 +2306,7 @@ public Builder setQueryParams( */ public Builder mergeQueryParams(com.google.cloud.dialogflow.v2.QueryParameters value) { if (queryParamsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && queryParams_ != null && queryParams_ != com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()) { @@ -2022,7 +2317,7 @@ public Builder mergeQueryParams(com.google.cloud.dialogflow.v2.QueryParameters v } else { queryParamsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2036,7 +2331,7 @@ public Builder mergeQueryParams(com.google.cloud.dialogflow.v2.QueryParameters v * .google.cloud.dialogflow.v2.QueryParameters query_params = 9; */ public Builder clearQueryParams() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); queryParams_ = null; if (queryParamsBuilder_ != null) { queryParamsBuilder_.dispose(); @@ -2055,7 +2350,7 @@ public Builder clearQueryParams() { * .google.cloud.dialogflow.v2.QueryParameters query_params = 9; */ public com.google.cloud.dialogflow.v2.QueryParameters.Builder getQueryParamsBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getQueryParamsFieldBuilder().getBuilder(); } @@ -2121,7 +2416,7 @@ public com.google.cloud.dialogflow.v2.QueryParametersOrBuilder getQueryParamsOrB * @return Whether the assistQueryParams field is set. */ public boolean hasAssistQueryParams() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2162,7 +2457,7 @@ public Builder setAssistQueryParams( } else { assistQueryParamsBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2182,7 +2477,7 @@ public Builder setAssistQueryParams( } else { assistQueryParamsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2198,7 +2493,7 @@ public Builder setAssistQueryParams( public Builder mergeAssistQueryParams( com.google.cloud.dialogflow.v2.AssistQueryParameters value) { if (assistQueryParamsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && assistQueryParams_ != null && assistQueryParams_ != com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()) { @@ -2209,7 +2504,7 @@ public Builder mergeAssistQueryParams( } else { assistQueryParamsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2223,7 +2518,7 @@ public Builder mergeAssistQueryParams( * .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14; */ public Builder clearAssistQueryParams() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); assistQueryParams_ = null; if (assistQueryParamsBuilder_ != null) { assistQueryParamsBuilder_.dispose(); @@ -2243,7 +2538,7 @@ public Builder clearAssistQueryParams() { */ public com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder getAssistQueryParamsBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getAssistQueryParamsFieldBuilder().getBuilder(); } @@ -2315,7 +2610,7 @@ public Builder clearAssistQueryParams() { * @return Whether the cxParameters field is set. */ public boolean hasCxParameters() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -2365,7 +2660,7 @@ public Builder setCxParameters(com.google.protobuf.Struct value) { } else { cxParametersBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2389,7 +2684,7 @@ public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValu } else { cxParametersBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2409,7 +2704,7 @@ public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValu */ public Builder mergeCxParameters(com.google.protobuf.Struct value) { if (cxParametersBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && cxParameters_ != null && cxParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { getCxParametersBuilder().mergeFrom(value); @@ -2419,7 +2714,7 @@ public Builder mergeCxParameters(com.google.protobuf.Struct value) { } else { cxParametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2438,7 +2733,7 @@ public Builder mergeCxParameters(com.google.protobuf.Struct value) { * .google.protobuf.Struct cx_parameters = 18; */ public Builder clearCxParameters() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); cxParameters_ = null; if (cxParametersBuilder_ != null) { cxParametersBuilder_.dispose(); @@ -2462,7 +2757,7 @@ public Builder clearCxParameters() { * .google.protobuf.Struct cx_parameters = 18; */ public com.google.protobuf.Struct.Builder getCxParametersBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getCxParametersFieldBuilder().getBuilder(); } @@ -2588,7 +2883,7 @@ public Builder setRequestId(java.lang.String value) { throw new NullPointerException(); } requestId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2607,7 +2902,7 @@ public Builder setRequestId(java.lang.String value) { */ public Builder clearRequestId() { requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -2631,7 +2926,7 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); requestId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java index b359db380d9e..bc1fce2da683 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java @@ -126,6 +126,41 @@ public interface AnalyzeContentRequestOrBuilder */ com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder(); + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return Whether the suggestionInput field is set. + */ + boolean hasSuggestionInput(); + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + * + * @return The suggestionInput. + */ + com.google.cloud.dialogflow.v2.SuggestionInput getSuggestionInput(); + /** + * + * + *
+   * An input representing the selection of a suggestion.
+   * 
+ * + * .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12; + */ + com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder getSuggestionInputOrBuilder(); + /** * * diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnswerRecordsProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnswerRecordsProto.java index 54e6ebade082..b723ac4089e4 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnswerRecordsProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnswerRecordsProto.java @@ -55,6 +55,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_SummarizationFeedback_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_SummarizationFeedback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2_AgentAssistantRecord_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -107,7 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".protobuf.Timestamp\"p\n\020CorrectnessLevel\022" + "!\n\035CORRECTNESS_LEVEL_UNSPECIFIED\020\000\022\017\n\013NO" + "T_CORRECT\020\001\022\025\n\021PARTIALLY_CORRECT\020\002\022\021\n\rFU" - + "LLY_CORRECT\020\003B\021\n\017detail_feedback\"\332\006\n\026Age" + + "LLY_CORRECT\020\003B\021\n\017detail_feedback\"\227\010\n\026Age" + "ntAssistantFeedback\022b\n\020answer_relevance\030" + "\001 \001(\0162B.google.cloud.dialogflow.v2.Agent" + "AssistantFeedback.AnswerRelevanceB\004\342A\001\001\022" @@ -119,43 +123,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "iciencyB\004\342A\001\001\022n\n\026summarization_feedback\030" + "\004 \001(\0132H.google.cloud.dialogflow.v2.Agent" + "AssistantFeedback.SummarizationFeedbackB" - + "\004\342A\001\001\032\216\001\n\025SummarizationFeedback\022.\n\nstart" - + "_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022" - + "/\n\013submit_time\030\002 \001(\0132\032.google.protobuf.T" - + "imestamp\022\024\n\014summary_text\030\003 \001(\t\"Q\n\017Answer" - + "Relevance\022 \n\034ANSWER_RELEVANCE_UNSPECIFIE" - + "D\020\000\022\016\n\nIRRELEVANT\020\001\022\014\n\010RELEVANT\020\002\"W\n\023Doc" - + "umentCorrectness\022$\n DOCUMENT_CORRECTNESS" - + "_UNSPECIFIED\020\000\022\r\n\tINCORRECT\020\001\022\013\n\007CORRECT" - + "\020\002\"Y\n\022DocumentEfficiency\022#\n\037DOCUMENT_EFF" - + "ICIENCY_UNSPECIFIED\020\000\022\017\n\013INEFFICIENT\020\001\022\r" - + "\n\tEFFICIENT\020\002\"\271\001\n\024AgentAssistantRecord\022T" - + "\n\031article_suggestion_answer\030\005 \001(\0132).goog" - + "le.cloud.dialogflow.v2.ArticleAnswerB\004\342A" - + "\001\003H\000\022A\n\nfaq_answer\030\006 \001(\0132%.google.cloud." - + "dialogflow.v2.FaqAnswerB\004\342A\001\003H\000B\010\n\006answe" - + "r2\255\005\n\rAnswerRecords\022\355\001\n\021ListAnswerRecord" - + "s\0224.google.cloud.dialogflow.v2.ListAnswe" - + "rRecordsRequest\0325.google.cloud.dialogflo" - + "w.v2.ListAnswerRecordsResponse\"k\332A\006paren" - + "t\202\323\344\223\002\\\022%/v2/{parent=projects/*}/answerR" - + "ecordsZ3\0221/v2/{parent=projects/*/locatio" - + "ns/*}/answerRecords\022\261\002\n\022UpdateAnswerReco" - + "rd\0225.google.cloud.dialogflow.v2.UpdateAn" - + "swerRecordRequest\032(.google.cloud.dialogf" - + "low.v2.AnswerRecord\"\271\001\332A\031answer_record,u" - + "pdate_mask\202\323\344\223\002\226\00123/v2/{answer_record.na" - + "me=projects/*/answerRecords/*}:\ranswer_r" - + "ecordZP2?/v2/{answer_record.name=project" - + "s/*/locations/*/answerRecords/*}:\ranswer" - + "_record\032x\312A\031dialogflow.googleapis.com\322AY" - + "https://www.googleapis.com/auth/cloud-pl" - + "atform,https://www.googleapis.com/auth/d" - + "ialogflowB\233\001\n\036com.google.cloud.dialogflo" - + "w.v2B\022AnswerRecordsProtoP\001Z>cloud.google" - + ".com/go/dialogflow/apiv2/dialogflowpb;di" - + "alogflowpb\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialog" - + "flow.V2b\006proto3" + + "\004\342A\001\001\022s\n\031knowledge_search_feedback\030\005 \001(\013" + + "2J.google.cloud.dialogflow.v2.AgentAssis" + + "tantFeedback.KnowledgeSearchFeedbackB\004\342A" + + "\001\001\032\216\001\n\025SummarizationFeedback\022.\n\nstart_ti" + + "me\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n\013" + + "submit_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022\024\n\014summary_text\030\003 \001(\t\032F\n\027Knowledge" + + "SearchFeedback\022\025\n\ranswer_copied\030\001 \001(\010\022\024\n" + + "\014clicked_uris\030\002 \003(\t\"Q\n\017AnswerRelevance\022 " + + "\n\034ANSWER_RELEVANCE_UNSPECIFIED\020\000\022\016\n\nIRRE" + + "LEVANT\020\001\022\014\n\010RELEVANT\020\002\"W\n\023DocumentCorrec" + + "tness\022$\n DOCUMENT_CORRECTNESS_UNSPECIFIE" + + "D\020\000\022\r\n\tINCORRECT\020\001\022\013\n\007CORRECT\020\002\"Y\n\022Docum" + + "entEfficiency\022#\n\037DOCUMENT_EFFICIENCY_UNS" + + "PECIFIED\020\000\022\017\n\013INEFFICIENT\020\001\022\r\n\tEFFICIENT" + + "\020\002\"\227\002\n\024AgentAssistantRecord\022T\n\031article_s" + + "uggestion_answer\030\005 \001(\0132).google.cloud.di" + + "alogflow.v2.ArticleAnswerB\004\342A\001\003H\000\022A\n\nfaq" + + "_answer\030\006 \001(\0132%.google.cloud.dialogflow." + + "v2.FaqAnswerB\004\342A\001\003H\000\022\\\n\030dialogflow_assis" + + "t_answer\030\007 \001(\01322.google.cloud.dialogflow" + + ".v2.DialogflowAssistAnswerB\004\342A\001\003H\000B\010\n\006an" + + "swer2\255\005\n\rAnswerRecords\022\355\001\n\021ListAnswerRec" + + "ords\0224.google.cloud.dialogflow.v2.ListAn" + + "swerRecordsRequest\0325.google.cloud.dialog" + + "flow.v2.ListAnswerRecordsResponse\"k\332A\006pa" + + "rent\202\323\344\223\002\\\022%/v2/{parent=projects/*}/answ" + + "erRecordsZ3\0221/v2/{parent=projects/*/loca" + + "tions/*}/answerRecords\022\261\002\n\022UpdateAnswerR" + + "ecord\0225.google.cloud.dialogflow.v2.Updat" + + "eAnswerRecordRequest\032(.google.cloud.dial" + + "ogflow.v2.AnswerRecord\"\271\001\332A\031answer_recor" + + "d,update_mask\202\323\344\223\002\226\00123/v2/{answer_record" + + ".name=projects/*/answerRecords/*}:\ranswe" + + "r_recordZP2?/v2/{answer_record.name=proj" + + "ects/*/locations/*/answerRecords/*}:\rans" + + "wer_record\032x\312A\031dialogflow.googleapis.com" + + "\322AYhttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/dialogflowB\233\001\n\036com.google.cloud.dialog" + + "flow.v2B\022AnswerRecordsProtoP\001Z>cloud.goo" + + "gle.com/go/dialogflow/apiv2/dialogflowpb" + + ";dialogflowpb\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dia" + + "logflow.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -225,6 +236,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DocumentCorrectness", "DocumentEfficiency", "SummarizationFeedback", + "KnowledgeSearchFeedback", }); internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_SummarizationFeedback_descriptor = internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_descriptor @@ -236,13 +248,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "StartTime", "SubmitTime", "SummaryText", }); + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor = + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor, + new java.lang.String[] { + "AnswerCopied", "ClickedUris", + }); internal_static_google_cloud_dialogflow_v2_AgentAssistantRecord_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_v2_AgentAssistantRecord_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_AgentAssistantRecord_descriptor, new java.lang.String[] { - "ArticleSuggestionAnswer", "FaqAnswer", "Answer", + "ArticleSuggestionAnswer", "FaqAnswer", "DialogflowAssistAnswer", "Answer", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AudioConfigProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AudioConfigProto.java index 32ddce8d5b81..832442b090ca 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AudioConfigProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AudioConfigProto.java @@ -104,10 +104,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eech_config\030\003 \001(\01322.google.cloud.dialogf" + "low.v2.SynthesizeSpeechConfig\"U\n\023Telepho" + "nyDtmfEvents\022>\n\013dtmf_events\030\001 \003(\0162).goog" - + "le.cloud.dialogflow.v2.TelephonyDtmf\"q\n\022" - + "SpeechToTextConfig\022L\n\024speech_model_varia" - + "nt\030\001 \001(\0162..google.cloud.dialogflow.v2.Sp" - + "eechModelVariant\022\r\n\005model\030\002 \001(\t*\224\002\n\rTele" + + "le.cloud.dialogflow.v2.TelephonyDtmf\"\230\001\n" + + "\022SpeechToTextConfig\022L\n\024speech_model_vari" + + "ant\030\001 \001(\0162..google.cloud.dialogflow.v2.S" + + "peechModelVariant\022\r\n\005model\030\002 \001(\t\022%\n\035use_" + + "timeout_based_endpointing\030\013 \001(\010*\224\002\n\rTele" + "phonyDtmf\022\036\n\032TELEPHONY_DTMF_UNSPECIFIED\020" + "\000\022\014\n\010DTMF_ONE\020\001\022\014\n\010DTMF_TWO\020\002\022\016\n\nDTMF_TH" + "REE\020\003\022\r\n\tDTMF_FOUR\020\004\022\r\n\tDTMF_FIVE\020\005\022\014\n\010D" @@ -224,7 +225,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_SpeechToTextConfig_descriptor, new java.lang.String[] { - "SpeechModelVariant", "Model", + "SpeechModelVariant", "Model", "UseTimeoutBasedEndpointing", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfo.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfo.java index e24ce7b18092..f26ee1126975 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfo.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfo.java @@ -645,7 +645,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -660,7 +660,7 @@ public boolean hasNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -677,7 +677,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -689,6 +689,56 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { : noSpeechTimeout_; } + public static final int ENDPOINTING_TIMEOUT_FIELD_NUMBER = 19; + private com.google.protobuf.Duration endpointingTimeout_; + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + @java.lang.Override + public boolean hasEndpointingTimeout() { + return endpointingTimeout_ != null; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndpointingTimeout() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + public static final int IS_INPUT_TEXT_FIELD_NUMBER = 16; private boolean isInputText_ = false; /** @@ -872,6 +922,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clientHalfCloseStreamingTimeOffset_ != null) { output.writeMessage(18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + output.writeMessage(19, getEndpointingTimeout()); + } getUnknownFields().writeTo(output); } @@ -948,6 +1001,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEndpointingTimeout()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -995,6 +1051,10 @@ public boolean equals(final java.lang.Object obj) { if (hasNoSpeechTimeout()) { if (!getNoSpeechTimeout().equals(other.getNoSpeechTimeout())) return false; } + if (hasEndpointingTimeout() != other.hasEndpointingTimeout()) return false; + if (hasEndpointingTimeout()) { + if (!getEndpointingTimeout().equals(other.getEndpointingTimeout())) return false; + } if (getIsInputText() != other.getIsInputText()) return false; if (hasClientHalfCloseTimeOffset() != other.hasClientHalfCloseTimeOffset()) return false; if (hasClientHalfCloseTimeOffset()) { @@ -1062,6 +1122,10 @@ public int hashCode() { hash = (37 * hash) + NO_SPEECH_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getNoSpeechTimeout().hashCode(); } + if (hasEndpointingTimeout()) { + hash = (37 * hash) + ENDPOINTING_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getEndpointingTimeout().hashCode(); + } hash = (37 * hash) + IS_INPUT_TEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInputText()); if (hasClientHalfCloseTimeOffset()) { @@ -1269,6 +1333,11 @@ public Builder clear() { noSpeechTimeoutBuilder_.dispose(); noSpeechTimeoutBuilder_ = null; } + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } isInputText_ = false; clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { @@ -1403,15 +1472,21 @@ private void buildPartial0( noSpeechTimeoutBuilder_ == null ? noSpeechTimeout_ : noSpeechTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00004000) != 0)) { - result.isInputText_ = isInputText_; + result.endpointingTimeout_ = + endpointingTimeoutBuilder_ == null + ? endpointingTimeout_ + : endpointingTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00008000) != 0)) { + result.isInputText_ = isInputText_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { result.clientHalfCloseTimeOffset_ = clientHalfCloseTimeOffsetBuilder_ == null ? clientHalfCloseTimeOffset_ : clientHalfCloseTimeOffsetBuilder_.build(); } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.clientHalfCloseStreamingTimeOffset_ = clientHalfCloseStreamingTimeOffsetBuilder_ == null ? clientHalfCloseStreamingTimeOffset_ @@ -1605,6 +1680,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.CloudConversationDebuggi if (other.hasNoSpeechTimeout()) { mergeNoSpeechTimeout(other.getNoSpeechTimeout()); } + if (other.hasEndpointingTimeout()) { + mergeEndpointingTimeout(other.getEndpointingTimeout()); + } if (other.getIsInputText() != false) { setIsInputText(other.getIsInputText()); } @@ -1754,14 +1832,14 @@ public Builder mergeFrom( case 128: { isInputText_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 128 case 138: { input.readMessage( getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 138 case 146: @@ -1769,9 +1847,16 @@ public Builder mergeFrom( input.readMessage( getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 146 + case 154: + { + input.readMessage( + getEndpointingTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4182,7 +4267,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4196,7 +4281,7 @@ public boolean hasNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4216,7 +4301,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4238,7 +4323,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4257,7 +4342,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration.Builder builderFo * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4282,7 +4367,7 @@ public Builder mergeNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4301,7 +4386,7 @@ public Builder clearNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4315,7 +4400,7 @@ public com.google.protobuf.Duration.Builder getNoSpeechTimeoutBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4333,7 +4418,7 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4355,6 +4440,189 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { return noSpeechTimeoutBuilder_; } + private com.google.protobuf.Duration endpointingTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endpointingTimeoutBuilder_; + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + public boolean hasEndpointingTimeout() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + public com.google.protobuf.Duration getEndpointingTimeout() { + if (endpointingTimeoutBuilder_ == null) { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } else { + return endpointingTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointingTimeout_ = value; + } else { + endpointingTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeout_ = builderForValue.build(); + } else { + endpointingTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder mergeEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && endpointingTimeout_ != null + && endpointingTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndpointingTimeoutBuilder().mergeFrom(value); + } else { + endpointingTimeout_ = value; + } + } else { + endpointingTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder clearEndpointingTimeout() { + bitField0_ = (bitField0_ & ~0x00004000); + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.Duration.Builder getEndpointingTimeoutBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getEndpointingTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + if (endpointingTimeoutBuilder_ != null) { + return endpointingTimeoutBuilder_.getMessageOrBuilder(); + } else { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndpointingTimeoutFieldBuilder() { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndpointingTimeout(), getParentForChildren(), isClean()); + endpointingTimeout_ = null; + } + return endpointingTimeoutBuilder_; + } + private boolean isInputText_; /** * @@ -4386,7 +4654,7 @@ public boolean getIsInputText() { public Builder setIsInputText(boolean value) { isInputText_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4402,7 +4670,7 @@ public Builder setIsInputText(boolean value) { * @return This builder for chaining. */ public Builder clearIsInputText() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); isInputText_ = false; onChanged(); return this; @@ -4426,7 +4694,7 @@ public Builder clearIsInputText() { * @return Whether the clientHalfCloseTimeOffset field is set. */ public boolean hasClientHalfCloseTimeOffset() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4466,7 +4734,7 @@ public Builder setClientHalfCloseTimeOffset(com.google.protobuf.Duration value) } else { clientHalfCloseTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4486,7 +4754,7 @@ public Builder setClientHalfCloseTimeOffset( } else { clientHalfCloseTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4501,7 +4769,7 @@ public Builder setClientHalfCloseTimeOffset( */ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && clientHalfCloseTimeOffset_ != null && clientHalfCloseTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { getClientHalfCloseTimeOffsetBuilder().mergeFrom(value); @@ -4511,7 +4779,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value } else { clientHalfCloseTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4525,7 +4793,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value * .google.protobuf.Duration client_half_close_time_offset = 17; */ public Builder clearClientHalfCloseTimeOffset() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { clientHalfCloseTimeOffsetBuilder_.dispose(); @@ -4544,7 +4812,7 @@ public Builder clearClientHalfCloseTimeOffset() { * .google.protobuf.Duration client_half_close_time_offset = 17; */ public com.google.protobuf.Duration.Builder getClientHalfCloseTimeOffsetBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(); } @@ -4610,7 +4878,7 @@ public com.google.protobuf.DurationOrBuilder getClientHalfCloseTimeOffsetOrBuild * @return Whether the clientHalfCloseStreamingTimeOffset field is set. */ public boolean hasClientHalfCloseStreamingTimeOffset() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4650,7 +4918,7 @@ public Builder setClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duratio } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4670,7 +4938,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4685,7 +4953,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( */ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseStreamingTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && clientHalfCloseStreamingTimeOffset_ != null && clientHalfCloseStreamingTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { @@ -4696,7 +4964,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat } else { clientHalfCloseStreamingTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4710,7 +4978,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public Builder clearClientHalfCloseStreamingTimeOffset() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); clientHalfCloseStreamingTimeOffset_ = null; if (clientHalfCloseStreamingTimeOffsetBuilder_ != null) { clientHalfCloseStreamingTimeOffsetBuilder_.dispose(); @@ -4729,7 +4997,7 @@ public Builder clearClientHalfCloseStreamingTimeOffset() { * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public com.google.protobuf.Duration.Builder getClientHalfCloseStreamingTimeOffsetBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfoOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfoOrBuilder.java index 68ad4f1fe835..2f88de97bea5 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfoOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/CloudConversationDebuggingInfoOrBuilder.java @@ -446,7 +446,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -458,7 +458,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -470,13 +470,48 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; */ com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + boolean hasEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + com.google.protobuf.Duration getEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder(); + /** * * diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProfileProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProfileProto.java index 2deeb8c4d627..0547a5ef03f0 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProfileProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProfileProto.java @@ -91,6 +91,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -221,7 +225,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "dAgentConfig\0227\n\005agent\030\001 \001(\tB(\342A\001\002\372A!\n\037di" + "alogflow.googleapis.com/Agent\0224\n\013session" + "_ttl\030\003 \001(\0132\031.google.protobuf.DurationB\004\342" - + "A\001\001\"\204\024\n\031HumanAgentAssistantConfig\022K\n\023not" + + "A\001\001\"\241\026\n\031HumanAgentAssistantConfig\022K\n\023not" + "ification_config\030\002 \001(\0132..google.cloud.di" + "alogflow.v2.NotificationConfig\022m\n\035human_" + "agent_suggestion_config\030\003 \001(\0132F.google.c" @@ -233,181 +237,189 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\0132K.google.cloud.dialogflow.v2.HumanAge" + "ntAssistantConfig.MessageAnalysisConfig\032" + "H\n\031SuggestionTriggerSettings\022\024\n\014no_small" - + "talk\030\001 \001(\010\022\025\n\ronly_end_user\030\002 \001(\010\032\314\004\n\027Su" + + "talk\030\001 \001(\010\022\025\n\ronly_end_user\030\002 \001(\010\032\367\004\n\027Su" + "ggestionFeatureConfig\022I\n\022suggestion_feat" + "ure\030\005 \001(\0132-.google.cloud.dialogflow.v2.S" + "uggestionFeature\022%\n\035enable_event_based_s" - + "uggestion\030\003 \001(\010\022t\n\033suggestion_trigger_se" - + "ttings\030\n \001(\0132O.google.cloud.dialogflow.v" - + "2.HumanAgentAssistantConfig.SuggestionTr" - + "iggerSettings\022a\n\014query_config\030\006 \001(\0132K.go" - + "ogle.cloud.dialogflow.v2.HumanAgentAssis" - + "tantConfig.SuggestionQueryConfig\022p\n\031conv" - + "ersation_model_config\030\007 \001(\0132M.google.clo" - + "ud.dialogflow.v2.HumanAgentAssistantConf" - + "ig.ConversationModelConfig\022t\n\033conversati" - + "on_process_config\030\010 \001(\0132O.google.cloud.d" - + "ialogflow.v2.HumanAgentAssistantConfig.C" - + "onversationProcessConfig\032\236\001\n\020SuggestionC" - + "onfig\022f\n\017feature_configs\030\002 \003(\0132M.google." - + "cloud.dialogflow.v2.HumanAgentAssistantC" - + "onfig.SuggestionFeatureConfig\022\"\n\032group_s" - + "uggestion_responses\030\003 \001(\010\032\377\007\n\025Suggestion" - + "QueryConfig\022\213\001\n\033knowledge_base_query_sou" - + "rce\030\001 \001(\0132d.google.cloud.dialogflow.v2.H" - + "umanAgentAssistantConfig.SuggestionQuery" - + "Config.KnowledgeBaseQuerySourceH\000\022\200\001\n\025do" - + "cument_query_source\030\002 \001(\0132_.google.cloud" - + ".dialogflow.v2.HumanAgentAssistantConfig" - + ".SuggestionQueryConfig.DocumentQuerySour" - + "ceH\000\022\204\001\n\027dialogflow_query_source\030\003 \001(\0132a" + + "uggestion\030\003 \001(\010\022)\n\033disable_agent_query_l" + + "ogging\030\016 \001(\010B\004\342A\001\001\022t\n\033suggestion_trigger" + + "_settings\030\n \001(\0132O.google.cloud.dialogflo" + + "w.v2.HumanAgentAssistantConfig.Suggestio" + + "nTriggerSettings\022a\n\014query_config\030\006 \001(\0132K" + ".google.cloud.dialogflow.v2.HumanAgentAs" - + "sistantConfig.SuggestionQueryConfig.Dial" - + "ogflowQuerySourceH\000\022\023\n\013max_results\030\004 \001(\005" - + "\022\034\n\024confidence_threshold\030\005 \001(\002\022\202\001\n\027conte" - + "xt_filter_settings\030\007 \001(\0132a.google.cloud." - + "dialogflow.v2.HumanAgentAssistantConfig." - + "SuggestionQueryConfig.ContextFilterSetti" - + "ngs\032e\n\030KnowledgeBaseQuerySource\022I\n\017knowl" - + "edge_bases\030\001 \003(\tB0\342A\001\002\372A)\n\'dialogflow.go" - + "ogleapis.com/KnowledgeBase\032U\n\023DocumentQu" - + "erySource\022>\n\tdocuments\030\001 \003(\tB+\342A\001\002\372A$\n\"d" - + "ialogflow.googleapis.com/Document\032P\n\025Dia" - + "logflowQuerySource\0227\n\005agent\030\001 \001(\tB(\342A\001\002\372" - + "A!\n\037dialogflow.googleapis.com/Agent\032v\n\025C" - + "ontextFilterSettings\022\035\n\025drop_handoff_mes" - + "sages\030\001 \001(\010\022#\n\033drop_virtual_agent_messag" - + "es\030\002 \001(\010\022\031\n\021drop_ivr_messages\030\003 \001(\010B\016\n\014q" - + "uery_source\032z\n\027ConversationModelConfig\022?" - + "\n\005model\030\001 \001(\tB0\372A-\n+dialogflow.googleapi" - + "s.com/ConversationModel\022\036\n\026baseline_mode" - + "l_version\030\010 \001(\t\032;\n\031ConversationProcessCo" - + "nfig\022\036\n\026recent_sentences_count\030\002 \001(\005\032\\\n\025" - + "MessageAnalysisConfig\022 \n\030enable_entity_e" - + "xtraction\030\002 \001(\010\022!\n\031enable_sentiment_anal" - + "ysis\030\003 \001(\010\"\311\003\n\027HumanAgentHandoffConfig\022b" - + "\n\022live_person_config\030\001 \001(\0132D.google.clou" - + "d.dialogflow.v2.HumanAgentHandoffConfig." - + "LivePersonConfigH\000\022u\n\034salesforce_live_ag" - + "ent_config\030\002 \001(\0132M.google.cloud.dialogfl" - + "ow.v2.HumanAgentHandoffConfig.Salesforce" - + "LiveAgentConfigH\000\0320\n\020LivePersonConfig\022\034\n" - + "\016account_number\030\001 \001(\tB\004\342A\001\002\032\217\001\n\031Salesfor" - + "ceLiveAgentConfig\022\035\n\017organization_id\030\001 \001" - + "(\tB\004\342A\001\002\022\033\n\rdeployment_id\030\002 \001(\tB\004\342A\001\002\022\027\n" - + "\tbutton_id\030\003 \001(\tB\004\342A\001\002\022\035\n\017endpoint_domai" - + "n\030\004 \001(\tB\004\342A\001\002B\017\n\ragent_service\"\277\001\n\022Notif" - + "icationConfig\022\r\n\005topic\030\001 \001(\t\022T\n\016message_" - + "format\030\002 \001(\0162<.google.cloud.dialogflow.v" - + "2.NotificationConfig.MessageFormat\"D\n\rMe" - + "ssageFormat\022\036\n\032MESSAGE_FORMAT_UNSPECIFIE" - + "D\020\000\022\t\n\005PROTO\020\001\022\010\n\004JSON\020\002\"3\n\rLoggingConfi" - + "g\022\"\n\032enable_stackdriver_logging\030\003 \001(\010\"\245\001" - + "\n\021SuggestionFeature\022@\n\004type\030\001 \001(\01622.goog" - + "le.cloud.dialogflow.v2.SuggestionFeature" - + ".Type\"N\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\026\n\022A" - + "RTICLE_SUGGESTION\020\001\022\007\n\003FAQ\020\002\022\017\n\013SMART_RE" - + "PLY\020\003\"\215\002\n!SetSuggestionFeatureConfigRequ" - + "est\022\"\n\024conversation_profile\030\001 \001(\tB\004\342A\001\002\022" - + "L\n\020participant_role\030\002 \001(\0162,.google.cloud" - + ".dialogflow.v2.Participant.RoleB\004\342A\001\002\022v\n" - + "\031suggestion_feature_config\030\003 \001(\0132M.googl" - + "e.cloud.dialogflow.v2.HumanAgentAssistan" - + "tConfig.SuggestionFeatureConfigB\004\342A\001\002\"\362\001" - + "\n#ClearSuggestionFeatureConfigRequest\022\"\n" - + "\024conversation_profile\030\001 \001(\tB\004\342A\001\002\022L\n\020par" - + "ticipant_role\030\002 \001(\0162,.google.cloud.dialo" - + "gflow.v2.Participant.RoleB\004\342A\001\002\022Y\n\027sugge" - + "stion_feature_type\030\003 \001(\01622.google.cloud." - + "dialogflow.v2.SuggestionFeature.TypeB\004\342A" - + "\001\002\"\245\002\n+SetSuggestionFeatureConfigOperati" - + "onMetadata\022\034\n\024conversation_profile\030\001 \001(\t" - + "\022L\n\020participant_role\030\002 \001(\0162,.google.clou" - + "d.dialogflow.v2.Participant.RoleB\004\342A\001\002\022Y" - + "\n\027suggestion_feature_type\030\003 \001(\01622.google" - + ".cloud.dialogflow.v2.SuggestionFeature.T" - + "ypeB\004\342A\001\002\022/\n\013create_time\030\004 \001(\0132\032.google." - + "protobuf.Timestamp\"\247\002\n-ClearSuggestionFe" - + "atureConfigOperationMetadata\022\034\n\024conversa" - + "tion_profile\030\001 \001(\t\022L\n\020participant_role\030\002" - + " \001(\0162,.google.cloud.dialogflow.v2.Partic" - + "ipant.RoleB\004\342A\001\002\022Y\n\027suggestion_feature_t" - + "ype\030\003 \001(\01622.google.cloud.dialogflow.v2.S" - + "uggestionFeature.TypeB\004\342A\001\002\022/\n\013create_ti" - + "me\030\004 \001(\0132\032.google.protobuf.Timestamp2\263\024\n" - + "\024ConversationProfiles\022\220\002\n\030ListConversati" - + "onProfiles\022;.google.cloud.dialogflow.v2." - + "ListConversationProfilesRequest\032<.google" - + ".cloud.dialogflow.v2.ListConversationPro" - + "filesResponse\"y\332A\006parent\202\323\344\223\002j\022,/v2/{par" - + "ent=projects/*}/conversationProfilesZ:\0228" - + "/v2/{parent=projects/*/locations/*}/conv" - + "ersationProfiles\022\375\001\n\026GetConversationProf" - + "ile\0229.google.cloud.dialogflow.v2.GetConv" - + "ersationProfileRequest\032/.google.cloud.di" - + "alogflow.v2.ConversationProfile\"w\332A\004name" - + "\202\323\344\223\002j\022,/v2/{name=projects/*/conversatio" - + "nProfiles/*}Z:\0228/v2/{name=projects/*/loc" - + "ations/*/conversationProfiles/*}\022\310\002\n\031Cre" - + "ateConversationProfile\022<.google.cloud.di" - + "alogflow.v2.CreateConversationProfileReq" - + "uest\032/.google.cloud.dialogflow.v2.Conver" - + "sationProfile\"\273\001\332A\033parent,conversation_p" - + "rofile\202\323\344\223\002\226\001\",/v2/{parent=projects/*}/c" - + "onversationProfiles:\024conversation_profil" - + "eZP\"8/v2/{parent=projects/*/locations/*}" - + "/conversationProfiles:\024conversation_prof" - + "ile\022\367\002\n\031UpdateConversationProfile\022<.goog" - + "le.cloud.dialogflow.v2.UpdateConversatio" - + "nProfileRequest\032/.google.cloud.dialogflo" - + "w.v2.ConversationProfile\"\352\001\332A conversati" - + "on_profile,update_mask\202\323\344\223\002\300\0012A/v2/{conv" - + "ersation_profile.name=projects/*/convers" - + "ationProfiles/*}:\024conversation_profileZe" - + "2M/v2/{conversation_profile.name=project" - + "s/*/locations/*/conversationProfiles/*}:" - + "\024conversation_profile\022\352\001\n\031DeleteConversa" - + "tionProfile\022<.google.cloud.dialogflow.v2" - + ".DeleteConversationProfileRequest\032\026.goog" - + "le.protobuf.Empty\"w\332A\004name\202\323\344\223\002j*,/v2/{n" - + "ame=projects/*/conversationProfiles/*}Z:" - + "*8/v2/{name=projects/*/locations/*/conve" - + "rsationProfiles/*}\022\350\003\n\032SetSuggestionFeat" - + "ureConfig\022=.google.cloud.dialogflow.v2.S" - + "etSuggestionFeatureConfigRequest\032\035.googl" - + "e.longrunning.Operation\"\353\002\312AB\n\023Conversat" - + "ionProfile\022+SetSuggestionFeatureConfigOp" - + "erationMetadata\332A\024conversation_profile\332A" - + "?conversation_profile,participant_role,s" - + "uggestion_feature_config\202\323\344\223\002\306\001\"W/v2/{co" - + "nversation_profile=projects/*/conversati" - + "onProfiles/*}:setSuggestionFeatureConfig" - + ":\001*Zh\"c/v2/{conversation_profile=project" - + "s/*/locations/*/conversationProfiles/*}:" - + "setSuggestionFeatureConfig:\001*\022\360\003\n\034ClearS" - + "uggestionFeatureConfig\022?.google.cloud.di" - + "alogflow.v2.ClearSuggestionFeatureConfig" - + "Request\032\035.google.longrunning.Operation\"\357" - + "\002\312AD\n\023ConversationProfile\022-ClearSuggesti" - + "onFeatureConfigOperationMetadata\332A\024conve" - + "rsation_profile\332A=conversation_profile,p" - + "articipant_role,suggestion_feature_type\202" - + "\323\344\223\002\312\001\"Y/v2/{conversation_profile=projec" - + "ts/*/conversationProfiles/*}:clearSugges" - + "tionFeatureConfig:\001*Zj\"e/v2/{conversatio" - + "n_profile=projects/*/locations/*/convers" - + "ationProfiles/*}:clearSuggestionFeatureC" - + "onfig:\001*\032x\312A\031dialogflow.googleapis.com\322A" - + "Yhttps://www.googleapis.com/auth/cloud-p" - + "latform,https://www.googleapis.com/auth/" - + "dialogflowB\240\002\n\036com.google.cloud.dialogfl" - + "ow.v2B\030ConversationProfileProtoP\001Z>cloud" - + ".google.com/go/dialogflow/apiv2/dialogfl" - + "owpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032Google.Cloud" - + ".Dialogflow.V2\352A|\n,dialogflow.googleapis" - + ".com/CXSecuritySettings\022Lprojects/{proje" - + "ct}/locations/{location}/securitySetting" - + "s/{security_settings}b\006proto3" + + "sistantConfig.SuggestionQueryConfig\022p\n\031c" + + "onversation_model_config\030\007 \001(\0132M.google." + + "cloud.dialogflow.v2.HumanAgentAssistantC" + + "onfig.ConversationModelConfig\022t\n\033convers" + + "ation_process_config\030\010 \001(\0132O.google.clou" + + "d.dialogflow.v2.HumanAgentAssistantConfi" + + "g.ConversationProcessConfig\032\236\001\n\020Suggesti" + + "onConfig\022f\n\017feature_configs\030\002 \003(\0132M.goog" + + "le.cloud.dialogflow.v2.HumanAgentAssista" + + "ntConfig.SuggestionFeatureConfig\022\"\n\032grou" + + "p_suggestion_responses\030\003 \001(\010\032\361\t\n\025Suggest" + + "ionQueryConfig\022\213\001\n\033knowledge_base_query_" + + "source\030\001 \001(\0132d.google.cloud.dialogflow.v" + + "2.HumanAgentAssistantConfig.SuggestionQu" + + "eryConfig.KnowledgeBaseQuerySourceH\000\022\200\001\n" + + "\025document_query_source\030\002 \001(\0132_.google.cl" + + "oud.dialogflow.v2.HumanAgentAssistantCon" + + "fig.SuggestionQueryConfig.DocumentQueryS" + + "ourceH\000\022\204\001\n\027dialogflow_query_source\030\003 \001(" + + "\0132a.google.cloud.dialogflow.v2.HumanAgen" + + "tAssistantConfig.SuggestionQueryConfig.D" + + "ialogflowQuerySourceH\000\022\023\n\013max_results\030\004 " + + "\001(\005\022\034\n\024confidence_threshold\030\005 \001(\002\022\202\001\n\027co" + + "ntext_filter_settings\030\007 \001(\0132a.google.clo" + + "ud.dialogflow.v2.HumanAgentAssistantConf" + + "ig.SuggestionQueryConfig.ContextFilterSe" + + "ttings\032e\n\030KnowledgeBaseQuerySource\022I\n\017kn" + + "owledge_bases\030\001 \003(\tB0\342A\001\002\372A)\n\'dialogflow" + + ".googleapis.com/KnowledgeBase\032U\n\023Documen" + + "tQuerySource\022>\n\tdocuments\030\001 \003(\tB+\342A\001\002\372A$" + + "\n\"dialogflow.googleapis.com/Document\032\301\002\n" + + "\025DialogflowQuerySource\0227\n\005agent\030\001 \001(\tB(\342" + + "A\001\002\372A!\n\037dialogflow.googleapis.com/Agent\022" + + "\235\001\n\027human_agent_side_config\030\003 \001(\0132v.goog" + + "le.cloud.dialogflow.v2.HumanAgentAssista" + + "ntConfig.SuggestionQueryConfig.Dialogflo" + + "wQuerySource.HumanAgentSideConfigB\004\342A\001\001\032" + + "O\n\024HumanAgentSideConfig\0227\n\005agent\030\001 \001(\tB(" + + "\342A\001\001\372A!\n\037dialogflow.googleapis.com/Agent" + + "\032v\n\025ContextFilterSettings\022\035\n\025drop_handof" + + "f_messages\030\001 \001(\010\022#\n\033drop_virtual_agent_m" + + "essages\030\002 \001(\010\022\031\n\021drop_ivr_messages\030\003 \001(\010" + + "B\016\n\014query_source\032z\n\027ConversationModelCon" + + "fig\022?\n\005model\030\001 \001(\tB0\372A-\n+dialogflow.goog" + + "leapis.com/ConversationModel\022\036\n\026baseline" + + "_model_version\030\010 \001(\t\032;\n\031ConversationProc" + + "essConfig\022\036\n\026recent_sentences_count\030\002 \001(" + + "\005\032\\\n\025MessageAnalysisConfig\022 \n\030enable_ent" + + "ity_extraction\030\002 \001(\010\022!\n\031enable_sentiment" + + "_analysis\030\003 \001(\010\"\311\003\n\027HumanAgentHandoffCon" + + "fig\022b\n\022live_person_config\030\001 \001(\0132D.google" + + ".cloud.dialogflow.v2.HumanAgentHandoffCo" + + "nfig.LivePersonConfigH\000\022u\n\034salesforce_li" + + "ve_agent_config\030\002 \001(\0132M.google.cloud.dia" + + "logflow.v2.HumanAgentHandoffConfig.Sales" + + "forceLiveAgentConfigH\000\0320\n\020LivePersonConf" + + "ig\022\034\n\016account_number\030\001 \001(\tB\004\342A\001\002\032\217\001\n\031Sal" + + "esforceLiveAgentConfig\022\035\n\017organization_i" + + "d\030\001 \001(\tB\004\342A\001\002\022\033\n\rdeployment_id\030\002 \001(\tB\004\342A" + + "\001\002\022\027\n\tbutton_id\030\003 \001(\tB\004\342A\001\002\022\035\n\017endpoint_" + + "domain\030\004 \001(\tB\004\342A\001\002B\017\n\ragent_service\"\277\001\n\022" + + "NotificationConfig\022\r\n\005topic\030\001 \001(\t\022T\n\016mes" + + "sage_format\030\002 \001(\0162<.google.cloud.dialogf" + + "low.v2.NotificationConfig.MessageFormat\"" + + "D\n\rMessageFormat\022\036\n\032MESSAGE_FORMAT_UNSPE" + + "CIFIED\020\000\022\t\n\005PROTO\020\001\022\010\n\004JSON\020\002\"3\n\rLogging" + + "Config\022\"\n\032enable_stackdriver_logging\030\003 \001" + + "(\010\"\273\001\n\021SuggestionFeature\022@\n\004type\030\001 \001(\01622" + + ".google.cloud.dialogflow.v2.SuggestionFe" + + "ature.Type\"d\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000" + + "\022\026\n\022ARTICLE_SUGGESTION\020\001\022\007\n\003FAQ\020\002\022\017\n\013SMA" + + "RT_REPLY\020\003\022\024\n\020KNOWLEDGE_SEARCH\020\016\"\215\002\n!Set" + + "SuggestionFeatureConfigRequest\022\"\n\024conver" + + "sation_profile\030\001 \001(\tB\004\342A\001\002\022L\n\020participan" + + "t_role\030\002 \001(\0162,.google.cloud.dialogflow.v" + + "2.Participant.RoleB\004\342A\001\002\022v\n\031suggestion_f" + + "eature_config\030\003 \001(\0132M.google.cloud.dialo" + + "gflow.v2.HumanAgentAssistantConfig.Sugge" + + "stionFeatureConfigB\004\342A\001\002\"\362\001\n#ClearSugges" + + "tionFeatureConfigRequest\022\"\n\024conversation" + + "_profile\030\001 \001(\tB\004\342A\001\002\022L\n\020participant_role" + + "\030\002 \001(\0162,.google.cloud.dialogflow.v2.Part" + + "icipant.RoleB\004\342A\001\002\022Y\n\027suggestion_feature" + + "_type\030\003 \001(\01622.google.cloud.dialogflow.v2" + + ".SuggestionFeature.TypeB\004\342A\001\002\"\245\002\n+SetSug" + + "gestionFeatureConfigOperationMetadata\022\034\n" + + "\024conversation_profile\030\001 \001(\t\022L\n\020participa" + + "nt_role\030\002 \001(\0162,.google.cloud.dialogflow." + + "v2.Participant.RoleB\004\342A\001\002\022Y\n\027suggestion_" + + "feature_type\030\003 \001(\01622.google.cloud.dialog" + + "flow.v2.SuggestionFeature.TypeB\004\342A\001\002\022/\n\013" + + "create_time\030\004 \001(\0132\032.google.protobuf.Time" + + "stamp\"\247\002\n-ClearSuggestionFeatureConfigOp" + + "erationMetadata\022\034\n\024conversation_profile\030" + + "\001 \001(\t\022L\n\020participant_role\030\002 \001(\0162,.google" + + ".cloud.dialogflow.v2.Participant.RoleB\004\342" + + "A\001\002\022Y\n\027suggestion_feature_type\030\003 \001(\01622.g" + + "oogle.cloud.dialogflow.v2.SuggestionFeat" + + "ure.TypeB\004\342A\001\002\022/\n\013create_time\030\004 \001(\0132\032.go" + + "ogle.protobuf.Timestamp2\263\024\n\024Conversation" + + "Profiles\022\220\002\n\030ListConversationProfiles\022;." + + "google.cloud.dialogflow.v2.ListConversat" + + "ionProfilesRequest\032<.google.cloud.dialog" + + "flow.v2.ListConversationProfilesResponse" + + "\"y\332A\006parent\202\323\344\223\002j\022,/v2/{parent=projects/" + + "*}/conversationProfilesZ:\0228/v2/{parent=p" + + "rojects/*/locations/*}/conversationProfi" + + "les\022\375\001\n\026GetConversationProfile\0229.google." + + "cloud.dialogflow.v2.GetConversationProfi" + + "leRequest\032/.google.cloud.dialogflow.v2.C" + + "onversationProfile\"w\332A\004name\202\323\344\223\002j\022,/v2/{" + + "name=projects/*/conversationProfiles/*}Z" + + ":\0228/v2/{name=projects/*/locations/*/conv" + + "ersationProfiles/*}\022\310\002\n\031CreateConversati" + + "onProfile\022<.google.cloud.dialogflow.v2.C" + + "reateConversationProfileRequest\032/.google" + + ".cloud.dialogflow.v2.ConversationProfile" + + "\"\273\001\332A\033parent,conversation_profile\202\323\344\223\002\226\001" + + "\",/v2/{parent=projects/*}/conversationPr" + + "ofiles:\024conversation_profileZP\"8/v2/{par" + + "ent=projects/*/locations/*}/conversation" + + "Profiles:\024conversation_profile\022\367\002\n\031Updat" + + "eConversationProfile\022<.google.cloud.dial" + + "ogflow.v2.UpdateConversationProfileReque" + + "st\032/.google.cloud.dialogflow.v2.Conversa" + + "tionProfile\"\352\001\332A conversation_profile,up" + + "date_mask\202\323\344\223\002\300\0012A/v2/{conversation_prof" + + "ile.name=projects/*/conversationProfiles" + + "/*}:\024conversation_profileZe2M/v2/{conver" + + "sation_profile.name=projects/*/locations" + + "/*/conversationProfiles/*}:\024conversation" + + "_profile\022\352\001\n\031DeleteConversationProfile\022<" + + ".google.cloud.dialogflow.v2.DeleteConver" + + "sationProfileRequest\032\026.google.protobuf.E" + + "mpty\"w\332A\004name\202\323\344\223\002j*,/v2/{name=projects/" + + "*/conversationProfiles/*}Z:*8/v2/{name=p" + + "rojects/*/locations/*/conversationProfil" + + "es/*}\022\350\003\n\032SetSuggestionFeatureConfig\022=.g" + + "oogle.cloud.dialogflow.v2.SetSuggestionF" + + "eatureConfigRequest\032\035.google.longrunning" + + ".Operation\"\353\002\312AB\n\023ConversationProfile\022+S" + + "etSuggestionFeatureConfigOperationMetada" + + "ta\332A\024conversation_profile\332A?conversation" + + "_profile,participant_role,suggestion_fea" + + "ture_config\202\323\344\223\002\306\001\"W/v2/{conversation_pr" + + "ofile=projects/*/conversationProfiles/*}" + + ":setSuggestionFeatureConfig:\001*Zh\"c/v2/{c" + + "onversation_profile=projects/*/locations" + + "/*/conversationProfiles/*}:setSuggestion" + + "FeatureConfig:\001*\022\360\003\n\034ClearSuggestionFeat" + + "ureConfig\022?.google.cloud.dialogflow.v2.C" + + "learSuggestionFeatureConfigRequest\032\035.goo" + + "gle.longrunning.Operation\"\357\002\312AD\n\023Convers" + + "ationProfile\022-ClearSuggestionFeatureConf" + + "igOperationMetadata\332A\024conversation_profi" + + "le\332A=conversation_profile,participant_ro" + + "le,suggestion_feature_type\202\323\344\223\002\312\001\"Y/v2/{" + + "conversation_profile=projects/*/conversa" + + "tionProfiles/*}:clearSuggestionFeatureCo" + + "nfig:\001*Zj\"e/v2/{conversation_profile=pro" + + "jects/*/locations/*/conversationProfiles" + + "/*}:clearSuggestionFeatureConfig:\001*\032x\312A\031" + + "dialogflow.googleapis.com\322AYhttps://www." + + "googleapis.com/auth/cloud-platform,https" + + "://www.googleapis.com/auth/dialogflowB\240\002" + + "\n\036com.google.cloud.dialogflow.v2B\030Conver" + + "sationProfileProtoP\001Z>cloud.google.com/g" + + "o/dialogflow/apiv2/dialogflowpb;dialogfl" + + "owpb\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V" + + "2\352A|\n,dialogflow.googleapis.com/CXSecuri" + + "tySettings\022Lprojects/{project}/locations" + + "/{location}/securitySettings/{security_s" + + "ettings}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -534,6 +546,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SuggestionFeature", "EnableEventBasedSuggestion", + "DisableAgentQueryLogging", "SuggestionTriggerSettings", "QueryConfig", "ConversationModelConfig", @@ -592,6 +605,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_descriptor, + new java.lang.String[] { + "Agent", "HumanAgentSideConfig", + }); + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor = + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor, new java.lang.String[] { "Agent", }); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProto.java index ce45dd0b6473..bf7758522b1d 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ConversationProto.java @@ -99,6 +99,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -115,150 +131,184 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oto\032\031google/api/resource.proto\0325google/c" + "loud/dialogflow/v2/conversation_profile." + "proto\032,google/cloud/dialogflow/v2/partic" - + "ipant.proto\032\037google/protobuf/timestamp.p" - + "roto\"\306\006\n\014Conversation\022\022\n\004name\030\001 \001(\tB\004\342A\001" - + "\003\022V\n\017lifecycle_state\030\002 \001(\01627.google.clou" - + "d.dialogflow.v2.Conversation.LifecycleSt" - + "ateB\004\342A\001\003\022T\n\024conversation_profile\030\003 \001(\tB" - + "6\342A\001\002\372A/\n-dialogflow.googleapis.com/Conv" - + "ersationProfile\022O\n\014phone_number\030\004 \001(\01323." - + "google.cloud.dialogflow.v2.ConversationP" - + "honeNumberB\004\342A\001\003\0224\n\nstart_time\030\005 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_ti" - + "me\030\006 \001(\0132\032.google.protobuf.TimestampB\004\342A" - + "\001\003\022V\n\022conversation_stage\030\007 \001(\0162:.google." - + "cloud.dialogflow.v2.Conversation.Convers" - + "ationStage\"Q\n\016LifecycleState\022\037\n\033LIFECYCL" - + "E_STATE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\r" - + "\n\tCOMPLETED\020\002\"h\n\021ConversationStage\022\"\n\036CO" - + "NVERSATION_STAGE_UNSPECIFIED\020\000\022\027\n\023VIRTUA" - + "L_AGENT_STAGE\020\001\022\026\n\022HUMAN_ASSIST_STAGE\020\002:" - + "\243\001\352A\237\001\n&dialogflow.googleapis.com/Conver" - + "sation\022/projects/{project}/conversations" - + "/{conversation}\022Dprojects/{project}/loca" - + "tions/{location}/conversations/{conversa" - + "tion}\"\301\001\n\031CreateConversationRequest\022?\n\006p" - + "arent\030\001 \001(\tB/\342A\001\002\372A(\022&dialogflow.googlea" - + "pis.com/Conversation\022D\n\014conversation\030\002 \001" - + "(\0132(.google.cloud.dialogflow.v2.Conversa" - + "tionB\004\342A\001\002\022\035\n\017conversation_id\030\003 \001(\tB\004\342A\001" - + "\001\"\236\001\n\030ListConversationsRequest\022?\n\006parent" - + "\030\001 \001(\tB/\342A\001\002\372A(\022&dialogflow.googleapis.c" - + "om/Conversation\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001" - + "\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\016\n\006filter\030\004 \001" - + "(\t\"u\n\031ListConversationsResponse\022?\n\rconve" - + "rsations\030\001 \003(\0132(.google.cloud.dialogflow" - + ".v2.Conversation\022\027\n\017next_page_token\030\002 \001(" - + "\t\"W\n\026GetConversationRequest\022=\n\004name\030\001 \001(" - + "\tB/\342A\001\002\372A(\n&dialogflow.googleapis.com/Co" - + "nversation\"\\\n\033CompleteConversationReques" - + "t\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&dialogflow.goo" - + "gleapis.com/Conversation\"\232\001\n\023ListMessage" - + "sRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!dialo" - + "gflow.googleapis.com/Message\022\024\n\006filter\030\004" - + " \001(\tB\004\342A\001\001\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\np" - + "age_token\030\003 \001(\tB\004\342A\001\001\"f\n\024ListMessagesRes" - + "ponse\0225\n\010messages\030\001 \003(\0132#.google.cloud.d" - + "ialogflow.v2.Message\022\027\n\017next_page_token\030" - + "\002 \001(\t\"5\n\027ConversationPhoneNumber\022\032\n\014phon" - + "e_number\030\003 \001(\tB\004\342A\001\003\"\220\002\n!SuggestConversa" - + "tionSummaryRequest\022E\n\014conversation\030\001 \001(\t" - + "B/\342A\001\002\372A(\n&dialogflow.googleapis.com/Con" - + "versation\022>\n\016latest_message\030\003 \001(\tB&\372A#\n!" - + "dialogflow.googleapis.com/Message\022\024\n\014con" - + "text_size\030\004 \001(\005\022N\n\023assist_query_params\030\005" - + " \001(\01321.google.cloud.dialogflow.v2.Assist" - + "QueryParameters\"\327\003\n\"SuggestConversationS" - + "ummaryResponse\022W\n\007summary\030\001 \001(\0132F.google" - + ".cloud.dialogflow.v2.SuggestConversation" - + "SummaryResponse.Summary\022>\n\016latest_messag" - + "e\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.com/" - + "Message\022\024\n\014context_size\030\003 \001(\005\032\201\002\n\007Summar" - + "y\022\014\n\004text\030\001 \001(\t\022o\n\rtext_sections\030\004 \003(\0132X" - + ".google.cloud.dialogflow.v2.SuggestConve" - + "rsationSummaryResponse.Summary.TextSecti" - + "onsEntry\022B\n\ranswer_record\030\003 \001(\tB+\372A(\n&di" - + "alogflow.googleapis.com/AnswerRecord\0323\n\021" - + "TextSectionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001\"\330\003\n\037GenerateStatelessSummaryRe" - + "quest\022u\n\026stateless_conversation\030\001 \001(\0132O." - + "google.cloud.dialogflow.v2.GenerateState" - + "lessSummaryRequest.MinimalConversationB\004" - + "\342A\001\002\022S\n\024conversation_profile\030\002 \001(\0132/.goo" - + "gle.cloud.dialogflow.v2.ConversationProf" - + "ileB\004\342A\001\002\022>\n\016latest_message\030\003 \001(\tB&\372A#\n!" - + "dialogflow.googleapis.com/Message\022\030\n\020max" - + "_context_size\030\004 \001(\005\032\216\001\n\023MinimalConversat" - + "ion\022;\n\010messages\030\001 \003(\0132#.google.cloud.dia" - + "logflow.v2.MessageB\004\342A\001\002\022:\n\006parent\030\002 \001(\t" - + "B*\342A\001\002\372A#\n!locations.googleapis.com/Loca" - + "tion\"\215\003\n GenerateStatelessSummaryRespons" - + "e\022U\n\007summary\030\001 \001(\0132D.google.cloud.dialog" - + "flow.v2.GenerateStatelessSummaryResponse" - + ".Summary\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!d" - + "ialogflow.googleapis.com/Message\022\024\n\014cont" - + "ext_size\030\003 \001(\005\032\273\001\n\007Summary\022\014\n\004text\030\001 \001(\t" - + "\022m\n\rtext_sections\030\002 \003(\0132V.google.cloud.d" - + "ialogflow.v2.GenerateStatelessSummaryRes" - + "ponse.Summary.TextSectionsEntry\0323\n\021TextS" - + "ectionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" - + ":\0028\0012\264\020\n\rConversations\022\214\002\n\022CreateConvers" - + "ation\0225.google.cloud.dialogflow.v2.Creat" - + "eConversationRequest\032(.google.cloud.dial" - + "ogflow.v2.Conversation\"\224\001\332A\023parent,conve" - + "rsation\202\323\344\223\002x\"%/v2/{parent=projects/*}/c" - + "onversations:\014conversationZA\"1/v2/{paren" - + "t=projects/*/locations/*}/conversations:" - + "\014conversation\022\355\001\n\021ListConversations\0224.go" + + "ipant.proto\032(google/cloud/dialogflow/v2/" + + "session.proto\032\037google/protobuf/timestamp" + + ".proto\"\306\006\n\014Conversation\022\022\n\004name\030\001 \001(\tB\004\342" + + "A\001\003\022V\n\017lifecycle_state\030\002 \001(\01627.google.cl" + + "oud.dialogflow.v2.Conversation.Lifecycle" + + "StateB\004\342A\001\003\022T\n\024conversation_profile\030\003 \001(" + + "\tB6\342A\001\002\372A/\n-dialogflow.googleapis.com/Co" + + "nversationProfile\022O\n\014phone_number\030\004 \001(\0132" + + "3.google.cloud.dialogflow.v2.Conversatio" + + "nPhoneNumberB\004\342A\001\003\0224\n\nstart_time\030\005 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" + + "time\030\006 \001(\0132\032.google.protobuf.TimestampB\004" + + "\342A\001\003\022V\n\022conversation_stage\030\007 \001(\0162:.googl" + + "e.cloud.dialogflow.v2.Conversation.Conve" + + "rsationStage\"Q\n\016LifecycleState\022\037\n\033LIFECY" + + "CLE_STATE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001" + + "\022\r\n\tCOMPLETED\020\002\"h\n\021ConversationStage\022\"\n\036" + + "CONVERSATION_STAGE_UNSPECIFIED\020\000\022\027\n\023VIRT" + + "UAL_AGENT_STAGE\020\001\022\026\n\022HUMAN_ASSIST_STAGE\020" + + "\002:\243\001\352A\237\001\n&dialogflow.googleapis.com/Conv" + + "ersation\022/projects/{project}/conversatio" + + "ns/{conversation}\022Dprojects/{project}/lo" + + "cations/{location}/conversations/{conver" + + "sation}\"\301\001\n\031CreateConversationRequest\022?\n" + + "\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&dialogflow.googl" + + "eapis.com/Conversation\022D\n\014conversation\030\002" + + " \001(\0132(.google.cloud.dialogflow.v2.Conver" + + "sationB\004\342A\001\002\022\035\n\017conversation_id\030\003 \001(\tB\004\342" + + "A\001\001\"\236\001\n\030ListConversationsRequest\022?\n\006pare" + + "nt\030\001 \001(\tB/\342A\001\002\372A(\022&dialogflow.googleapis" + + ".com/Conversation\022\027\n\tpage_size\030\002 \001(\005B\004\342A" + + "\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\016\n\006filter\030\004" + + " \001(\t\"u\n\031ListConversationsResponse\022?\n\rcon" + + "versations\030\001 \003(\0132(.google.cloud.dialogfl" + + "ow.v2.Conversation\022\027\n\017next_page_token\030\002 " + + "\001(\t\"W\n\026GetConversationRequest\022=\n\004name\030\001 " + + "\001(\tB/\342A\001\002\372A(\n&dialogflow.googleapis.com/" + + "Conversation\"\\\n\033CompleteConversationRequ" + + "est\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&dialogflow.g" + + "oogleapis.com/Conversation\"\232\001\n\023ListMessa" + + "gesRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!dia" + + "logflow.googleapis.com/Message\022\024\n\006filter" + + "\030\004 \001(\tB\004\342A\001\001\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n" + + "\npage_token\030\003 \001(\tB\004\342A\001\001\"f\n\024ListMessagesR" + + "esponse\0225\n\010messages\030\001 \003(\0132#.google.cloud" + + ".dialogflow.v2.Message\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\"5\n\027ConversationPhoneNumber\022\032\n\014ph" + + "one_number\030\003 \001(\tB\004\342A\001\003\"\220\002\n!SuggestConver" + + "sationSummaryRequest\022E\n\014conversation\030\001 \001" + + "(\tB/\342A\001\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\022N\n\023assist_query_params" + + "\030\005 \001(\01321.google.cloud.dialogflow.v2.Assi" + + "stQueryParameters\"\367\003\n\"SuggestConversatio" + + "nSummaryResponse\022W\n\007summary\030\001 \001(\0132F.goog" + + "le.cloud.dialogflow.v2.SuggestConversati" + + "onSummaryResponse.Summary\022>\n\016latest_mess" + + "age\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.co" + + "m/Message\022\024\n\014context_size\030\003 \001(\005\032\241\002\n\007Summ" + + "ary\022\014\n\004text\030\001 \001(\t\022o\n\rtext_sections\030\004 \003(\013" + + "2X.google.cloud.dialogflow.v2.SuggestCon" + + "versationSummaryResponse.Summary.TextSec" + + "tionsEntry\022B\n\ranswer_record\030\003 \001(\tB+\372A(\n&" + + "dialogflow.googleapis.com/AnswerRecord\022\036" + + "\n\026baseline_model_version\030\005 \001(\t\0323\n\021TextSe" + + "ctionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"\330\003\n\037GenerateStatelessSummaryRequest\022" + + "u\n\026stateless_conversation\030\001 \001(\0132O.google" + + ".cloud.dialogflow.v2.GenerateStatelessSu" + + "mmaryRequest.MinimalConversationB\004\342A\001\002\022S" + + "\n\024conversation_profile\030\002 \001(\0132/.google.cl" + + "oud.dialogflow.v2.ConversationProfileB\004\342" + + "A\001\002\022>\n\016latest_message\030\003 \001(\tB&\372A#\n!dialog" + + "flow.googleapis.com/Message\022\030\n\020max_conte" + + "xt_size\030\004 \001(\005\032\216\001\n\023MinimalConversation\022;\n" + + "\010messages\030\001 \003(\0132#.google.cloud.dialogflo" + + "w.v2.MessageB\004\342A\001\002\022:\n\006parent\030\002 \001(\tB*\342A\001\002" + + "\372A#\n!locations.googleapis.com/Location\"\255" + + "\003\n GenerateStatelessSummaryResponse\022U\n\007s" + + "ummary\030\001 \001(\0132D.google.cloud.dialogflow.v" + + "2.GenerateStatelessSummaryResponse.Summa" + + "ry\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\032\333\001\n\007Summary\022\014\n\004text\030\001 \001(\t\022m\n\rte" + + "xt_sections\030\002 \003(\0132V.google.cloud.dialogf" + + "low.v2.GenerateStatelessSummaryResponse." + + "Summary.TextSectionsEntry\022\036\n\026baseline_mo" + + "del_version\030\004 \001(\t\0323\n\021TextSectionsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\321\002\n\026Searc" + + "hKnowledgeRequest\022\016\n\006parent\030\006 \001(\t\022:\n\005que" + + "ry\030\001 \001(\0132%.google.cloud.dialogflow.v2.Te" + + "xtInputB\004\342A\001\002\022T\n\024conversation_profile\030\002 " + + "\001(\tB6\342A\001\002\372A/\n-dialogflow.googleapis.com/" + + "ConversationProfile\022\022\n\nsession_id\030\003 \001(\t\022" + + "A\n\014conversation\030\004 \001(\tB+\372A(\n&dialogflow.g" + + "oogleapis.com/Conversation\022>\n\016latest_mes" + + "sage\030\005 \001(\tB&\372A#\n!dialogflow.googleapis.c" + + "om/Message\"]\n\027SearchKnowledgeResponse\022B\n" + + "\007answers\030\002 \003(\01321.google.cloud.dialogflow" + + ".v2.SearchKnowledgeAnswer\"\352\002\n\025SearchKnow" + + "ledgeAnswer\022\016\n\006answer\030\001 \001(\t\022Q\n\013answer_ty" + + "pe\030\002 \001(\0162<.google.cloud.dialogflow.v2.Se" + + "archKnowledgeAnswer.AnswerType\022V\n\016answer" + + "_sources\030\003 \003(\0132>.google.cloud.dialogflow" + + ".v2.SearchKnowledgeAnswer.AnswerSource\022\025" + + "\n\ranswer_record\030\005 \001(\t\032;\n\014AnswerSource\022\r\n" + + "\005title\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\017\n\007snippet\030\003 \001" + + "(\t\"B\n\nAnswerType\022\033\n\027ANSWER_TYPE_UNSPECIF" + + "IED\020\000\022\007\n\003FAQ\020\001\022\016\n\nGENERATIVE\020\0022\345\023\n\rConve" + + "rsations\022\214\002\n\022CreateConversation\0225.google" + + ".cloud.dialogflow.v2.CreateConversationR" + + "equest\032(.google.cloud.dialogflow.v2.Conv" + + "ersation\"\224\001\332A\023parent,conversation\202\323\344\223\002x\"" + + "%/v2/{parent=projects/*}/conversations:\014" + + "conversationZA\"1/v2/{parent=projects/*/l" + + "ocations/*}/conversations:\014conversation\022" + + "\355\001\n\021ListConversations\0224.google.cloud.dia" + + "logflow.v2.ListConversationsRequest\0325.go" + "ogle.cloud.dialogflow.v2.ListConversatio" - + "nsRequest\0325.google.cloud.dialogflow.v2.L" - + "istConversationsResponse\"k\332A\006parent\202\323\344\223\002" - + "\\\022%/v2/{parent=projects/*}/conversations" - + "Z3\0221/v2/{parent=projects/*/locations/*}/" - + "conversations\022\332\001\n\017GetConversation\0222.goog" - + "le.cloud.dialogflow.v2.GetConversationRe" - + "quest\032(.google.cloud.dialogflow.v2.Conve" - + "rsation\"i\332A\004name\202\323\344\223\002\\\022%/v2/{name=projec" - + "ts/*/conversations/*}Z3\0221/v2/{name=proje" - + "cts/*/locations/*/conversations/*}\022\375\001\n\024C" - + "ompleteConversation\0227.google.cloud.dialo" - + "gflow.v2.CompleteConversationRequest\032(.g" - + "oogle.cloud.dialogflow.v2.Conversation\"\201" - + "\001\332A\004name\202\323\344\223\002t\"./v2/{name=projects/*/con" - + "versations/*}:complete:\001*Z?\":/v2/{name=p" - + "rojects/*/locations/*/conversations/*}:c" - + "omplete:\001*\022\365\001\n\014ListMessages\022/.google.clo" - + "ud.dialogflow.v2.ListMessagesRequest\0320.g" - + "oogle.cloud.dialogflow.v2.ListMessagesRe" - + "sponse\"\201\001\332A\006parent\202\323\344\223\002r\0220/v2/{parent=pr" - + "ojects/*/conversations/*}/messagesZ>\022.googl" - + "e.cloud.dialogflow.v2.SuggestConversatio" - + "nSummaryResponse\"\326\001\332A\014conversation\202\323\344\223\002\300" - + "\001\"T/v2/{conversation=projects/*/conversa" - + "tions/*}/suggestions:suggestConversation" - + "Summary:\001*Ze\"`/v2/{conversation=projects" - + "/*/locations/*/conversations/*}/suggesti" - + "ons:suggestConversationSummary:\001*\022\335\002\n\030Ge" - + "nerateStatelessSummary\022;.google.cloud.di" - + "alogflow.v2.GenerateStatelessSummaryRequ" - + "est\032<.google.cloud.dialogflow.v2.Generat" - + "eStatelessSummaryResponse\"\305\001\202\323\344\223\002\276\001\"S/v2" - + "/{stateless_conversation.parent=projects" - + "/*}/suggestions:generateStatelessSummary" - + ":\001*Zd\"_/v2/{stateless_conversation.paren" - + "t=projects/*/locations/*}/suggestions:ge" - + "nerateStatelessSummary:\001*\032x\312A\031dialogflow" - + ".googleapis.com\322AYhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.goo" - + "gleapis.com/auth/dialogflowB\232\001\n\036com.goog" - + "le.cloud.dialogflow.v2B\021ConversationProt" - + "oP\001Z>cloud.google.com/go/dialogflow/apiv" - + "2/dialogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032Go" - + "ogle.Cloud.Dialogflow.V2b\006proto3" + + "nsResponse\"k\332A\006parent\202\323\344\223\002\\\022%/v2/{parent" + + "=projects/*}/conversationsZ3\0221/v2/{paren" + + "t=projects/*/locations/*}/conversations\022" + + "\332\001\n\017GetConversation\0222.google.cloud.dialo" + + "gflow.v2.GetConversationRequest\032(.google" + + ".cloud.dialogflow.v2.Conversation\"i\332A\004na" + + "me\202\323\344\223\002\\\022%/v2/{name=projects/*/conversat" + + "ions/*}Z3\0221/v2/{name=projects/*/location" + + "s/*/conversations/*}\022\375\001\n\024CompleteConvers" + + "ation\0227.google.cloud.dialogflow.v2.Compl" + + "eteConversationRequest\032(.google.cloud.di" + + "alogflow.v2.Conversation\"\201\001\332A\004name\202\323\344\223\002t" + + "\"./v2/{name=projects/*/conversations/*}:" + + "complete:\001*Z?\":/v2/{name=projects/*/loca" + + "tions/*/conversations/*}:complete:\001*\022\365\001\n" + + "\014ListMessages\022/.google.cloud.dialogflow." + + "v2.ListMessagesRequest\0320.google.cloud.di" + + "alogflow.v2.ListMessagesResponse\"\201\001\332A\006pa" + + "rent\202\323\344\223\002r\0220/v2/{parent=projects/*/conve" + + "rsations/*}/messagesZ>\022.google.cloud.dialog" + + "flow.v2.SuggestConversationSummaryRespon" + + "se\"\326\001\332A\014conversation\202\323\344\223\002\300\001\"T/v2/{conver" + + "sation=projects/*/conversations/*}/sugge" + + "stions:suggestConversationSummary:\001*Ze\"`" + + "/v2/{conversation=projects/*/locations/*" + + "/conversations/*}/suggestions:suggestCon" + + "versationSummary:\001*\022\335\002\n\030GenerateStateles" + + "sSummary\022;.google.cloud.dialogflow.v2.Ge" + + "nerateStatelessSummaryRequest\032<.google.c" + + "loud.dialogflow.v2.GenerateStatelessSumm" + + "aryResponse\"\305\001\202\323\344\223\002\276\001\"S/v2/{stateless_co" + + "nversation.parent=projects/*}/suggestion" + + "s:generateStatelessSummary:\001*Zd\"_/v2/{st" + + "ateless_conversation.parent=projects/*/l" + + "ocations/*}/suggestions:generateStateles" + + "sSummary:\001*\022\256\003\n\017SearchKnowledge\0222.google" + + ".cloud.dialogflow.v2.SearchKnowledgeRequ" + + "est\0323.google.cloud.dialogflow.v2.SearchK" + + "nowledgeResponse\"\261\002\202\323\344\223\002\252\002\"3/v2/{parent=" + + "projects/*}/suggestions:searchKnowledge:" + + "\001*ZD\"?/v2/{parent=projects/*/locations/*" + + "}/suggestions:searchKnowledge:\001*ZN\"I/v2/" + + "{conversation=projects/*/conversations/*" + + "}/suggestions:searchKnowledge:\001*ZZ\"U/v2/" + + "{conversation=projects/*/locations/*/con" + + "versations/*}/suggestions:searchKnowledg" + + "e:\001*\032x\312A\031dialogflow.googleapis.com\322AYhtt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "orm,https://www.googleapis.com/auth/dial" + + "ogflowB\232\001\n\036com.google.cloud.dialogflow.v" + + "2B\021ConversationProtoP\001Z>cloud.google.com" + + "/go/dialogflow/apiv2/dialogflowpb;dialog" + + "flowpb\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow" + + ".V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -270,6 +320,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.v2.ConversationProfileProto.getDescriptor(), com.google.cloud.dialogflow.v2.ParticipantProto.getDescriptor(), + com.google.cloud.dialogflow.v2.SessionProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_dialogflow_v2_Conversation_descriptor = @@ -374,7 +425,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_descriptor, new java.lang.String[] { - "Text", "TextSections", "AnswerRecord", + "Text", "TextSections", "AnswerRecord", "BaselineModelVersion", }); internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor = internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_descriptor @@ -420,7 +471,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_GenerateStatelessSummaryResponse_Summary_descriptor, new java.lang.String[] { - "Text", "TextSections", + "Text", "TextSections", "BaselineModelVersion", }); internal_static_google_cloud_dialogflow_v2_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_descriptor = internal_static_google_cloud_dialogflow_v2_GenerateStatelessSummaryResponse_Summary_descriptor @@ -432,6 +483,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor, + new java.lang.String[] { + "Parent", + "Query", + "ConversationProfile", + "SessionId", + "Conversation", + "LatestMessage", + }); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor, + new java.lang.String[] { + "Answers", + }); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor, + new java.lang.String[] { + "Answer", "AnswerType", "AnswerSources", "AnswerRecord", + }); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor = + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor, + new java.lang.String[] { + "Title", "Uri", "Snippet", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -449,6 +539,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.v2.ConversationProfileProto.getDescriptor(); com.google.cloud.dialogflow.v2.ParticipantProto.getDescriptor(); + com.google.cloud.dialogflow.v2.SessionProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswer.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswer.java new file mode 100644 index 000000000000..b571cf0b5f05 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswer.java @@ -0,0 +1,1310 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Represents a Dialogflow assist answer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.DialogflowAssistAnswer} + */ +public final class DialogflowAssistAnswer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.DialogflowAssistAnswer) + DialogflowAssistAnswerOrBuilder { + private static final long serialVersionUID = 0L; + // Use DialogflowAssistAnswer.newBuilder() to construct. + private DialogflowAssistAnswer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DialogflowAssistAnswer() { + answerRecord_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DialogflowAssistAnswer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.class, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder.class); + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QUERY_RESULT(1), + INTENT_SUGGESTION(5), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return QUERY_RESULT; + case 5: + return INTENT_SUGGESTION; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int QUERY_RESULT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return Whether the queryResult field is set. + */ + @java.lang.Override + public boolean hasQueryResult() { + return resultCase_ == 1; + } + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return The queryResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.QueryResult getQueryResult() { + if (resultCase_ == 1) { + return (com.google.cloud.dialogflow.v2.QueryResult) result_; + } + return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.QueryResultOrBuilder getQueryResultOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.dialogflow.v2.QueryResult) result_; + } + return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } + + public static final int INTENT_SUGGESTION_FIELD_NUMBER = 5; + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return Whether the intentSuggestion field is set. + */ + @java.lang.Override + public boolean hasIntentSuggestion() { + return resultCase_ == 5; + } + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return The intentSuggestion. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestion getIntentSuggestion() { + if (resultCase_ == 5) { + return (com.google.cloud.dialogflow.v2.IntentSuggestion) result_; + } + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder getIntentSuggestionOrBuilder() { + if (resultCase_ == 5) { + return (com.google.cloud.dialogflow.v2.IntentSuggestion) result_; + } + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + + public static final int ANSWER_RECORD_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerRecord_ = ""; + /** + * + * + *
+   * The name of answer record, in the format of
+   * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>"
+   * 
+ * + * string answer_record = 2; + * + * @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 answer record, in the format of
+   * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>"
+   * 
+ * + * string answer_record = 2; + * + * @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 (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.v2.QueryResult) result_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, answerRecord_); + } + if (resultCase_ == 5) { + output.writeMessage(5, (com.google.cloud.dialogflow.v2.IntentSuggestion) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.v2.QueryResult) result_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, answerRecord_); + } + if (resultCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.v2.IntentSuggestion) result_); + } + size += getUnknownFields().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.v2.DialogflowAssistAnswer)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer other = + (com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) obj; + + if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getQueryResult().equals(other.getQueryResult())) return false; + break; + case 5: + if (!getIntentSuggestion().equals(other.getIntentSuggestion())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getAnswerRecord().hashCode(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + QUERY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getQueryResult().hashCode(); + break; + case 5: + hash = (37 * hash) + INTENT_SUGGESTION_FIELD_NUMBER; + hash = (53 * hash) + getIntentSuggestion().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer 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.v2.DialogflowAssistAnswer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer 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.v2.DialogflowAssistAnswer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer 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.v2.DialogflowAssistAnswer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer 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.v2.DialogflowAssistAnswer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer 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.v2.DialogflowAssistAnswer 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; + } + /** + * + * + *
+   * Represents a Dialogflow assist answer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.DialogflowAssistAnswer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.DialogflowAssistAnswer) + com.google.cloud.dialogflow.v2.DialogflowAssistAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.class, + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryResultBuilder_ != null) { + queryResultBuilder_.clear(); + } + if (intentSuggestionBuilder_ != null) { + intentSuggestionBuilder_.clear(); + } + answerRecord_ = ""; + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer build() { + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.DialogflowAssistAnswer buildPartial() { + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer result = + new com.google.cloud.dialogflow.v2.DialogflowAssistAnswer(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.DialogflowAssistAnswer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.answerRecord_ = answerRecord_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.v2.DialogflowAssistAnswer result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 1 && queryResultBuilder_ != null) { + result.result_ = queryResultBuilder_.build(); + } + if (resultCase_ == 5 && intentSuggestionBuilder_ != null) { + result.result_ = intentSuggestionBuilder_.build(); + } + } + + @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.v2.DialogflowAssistAnswer) { + return mergeFrom((com.google.cloud.dialogflow.v2.DialogflowAssistAnswer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.DialogflowAssistAnswer other) { + if (other == com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.getDefaultInstance()) + return this; + if (!other.getAnswerRecord().isEmpty()) { + answerRecord_ = other.answerRecord_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getResultCase()) { + case QUERY_RESULT: + { + mergeQueryResult(other.getQueryResult()); + break; + } + case INTENT_SUGGESTION: + { + mergeIntentSuggestion(other.getIntentSuggestion()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getQueryResultFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + break; + } // case 10 + case 18: + { + answerRecord_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 42: + { + input.readMessage( + getIntentSuggestionFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.QueryResult, + com.google.cloud.dialogflow.v2.QueryResult.Builder, + com.google.cloud.dialogflow.v2.QueryResultOrBuilder> + queryResultBuilder_; + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return Whether the queryResult field is set. + */ + @java.lang.Override + public boolean hasQueryResult() { + return resultCase_ == 1; + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return The queryResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.QueryResult getQueryResult() { + if (queryResultBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.dialogflow.v2.QueryResult) result_; + } + return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return queryResultBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + public Builder setQueryResult(com.google.cloud.dialogflow.v2.QueryResult value) { + if (queryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + queryResultBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + public Builder setQueryResult( + com.google.cloud.dialogflow.v2.QueryResult.Builder builderForValue) { + if (queryResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + queryResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + public Builder mergeQueryResult(com.google.cloud.dialogflow.v2.QueryResult value) { + if (queryResultBuilder_ == null) { + if (resultCase_ == 1 + && result_ != com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance()) { + result_ = + com.google.cloud.dialogflow.v2.QueryResult.newBuilder( + (com.google.cloud.dialogflow.v2.QueryResult) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + queryResultBuilder_.mergeFrom(value); + } else { + queryResultBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + public Builder clearQueryResult() { + if (queryResultBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + queryResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + public com.google.cloud.dialogflow.v2.QueryResult.Builder getQueryResultBuilder() { + return getQueryResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.QueryResultOrBuilder getQueryResultOrBuilder() { + if ((resultCase_ == 1) && (queryResultBuilder_ != null)) { + return queryResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.dialogflow.v2.QueryResult) result_; + } + return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Result from v2 agent.
+     * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.QueryResult, + com.google.cloud.dialogflow.v2.QueryResult.Builder, + com.google.cloud.dialogflow.v2.QueryResultOrBuilder> + getQueryResultFieldBuilder() { + if (queryResultBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); + } + queryResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.QueryResult, + com.google.cloud.dialogflow.v2.QueryResult.Builder, + com.google.cloud.dialogflow.v2.QueryResultOrBuilder>( + (com.google.cloud.dialogflow.v2.QueryResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged(); + return queryResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.IntentSuggestion, + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder, + com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder> + intentSuggestionBuilder_; + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return Whether the intentSuggestion field is set. + */ + @java.lang.Override + public boolean hasIntentSuggestion() { + return resultCase_ == 5; + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return The intentSuggestion. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestion getIntentSuggestion() { + if (intentSuggestionBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.cloud.dialogflow.v2.IntentSuggestion) result_; + } + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return intentSuggestionBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + public Builder setIntentSuggestion(com.google.cloud.dialogflow.v2.IntentSuggestion value) { + if (intentSuggestionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + intentSuggestionBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + public Builder setIntentSuggestion( + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder builderForValue) { + if (intentSuggestionBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + intentSuggestionBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + public Builder mergeIntentSuggestion(com.google.cloud.dialogflow.v2.IntentSuggestion value) { + if (intentSuggestionBuilder_ == null) { + if (resultCase_ == 5 + && result_ != com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance()) { + result_ = + com.google.cloud.dialogflow.v2.IntentSuggestion.newBuilder( + (com.google.cloud.dialogflow.v2.IntentSuggestion) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + intentSuggestionBuilder_.mergeFrom(value); + } else { + intentSuggestionBuilder_.setMessage(value); + } + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + public Builder clearIntentSuggestion() { + if (intentSuggestionBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + intentSuggestionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + public com.google.cloud.dialogflow.v2.IntentSuggestion.Builder getIntentSuggestionBuilder() { + return getIntentSuggestionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder getIntentSuggestionOrBuilder() { + if ((resultCase_ == 5) && (intentSuggestionBuilder_ != null)) { + return intentSuggestionBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.cloud.dialogflow.v2.IntentSuggestion) result_; + } + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + } + /** + * + * + *
+     * An intent suggestion generated from conversation.
+     * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.IntentSuggestion, + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder, + com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder> + getIntentSuggestionFieldBuilder() { + if (intentSuggestionBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + intentSuggestionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.IntentSuggestion, + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder, + com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder>( + (com.google.cloud.dialogflow.v2.IntentSuggestion) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged(); + return intentSuggestionBuilder_; + } + + private java.lang.Object answerRecord_ = ""; + /** + * + * + *
+     * The name of answer record, in the format of
+     * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>"
+     * 
+ * + * string answer_record = 2; + * + * @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 answer record, in the format of
+     * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>"
+     * 
+ * + * string answer_record = 2; + * + * @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 answer record, in the format of
+     * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>"
+     * 
+ * + * string answer_record = 2; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of answer record, in the format of
+     * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>"
+     * 
+ * + * string answer_record = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnswerRecord() { + answerRecord_ = getDefaultInstance().getAnswerRecord(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of answer record, in the format of
+     * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>"
+     * 
+ * + * string answer_record = 2; + * + * @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; + bitField0_ |= 0x00000004; + 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.v2.DialogflowAssistAnswer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DialogflowAssistAnswer) + private static final com.google.cloud.dialogflow.v2.DialogflowAssistAnswer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.DialogflowAssistAnswer(); + } + + public static com.google.cloud.dialogflow.v2.DialogflowAssistAnswer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DialogflowAssistAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.DialogflowAssistAnswer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswerOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswerOrBuilder.java new file mode 100644 index 000000000000..44eb0630c742 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DialogflowAssistAnswerOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +public interface DialogflowAssistAnswerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.DialogflowAssistAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return Whether the queryResult field is set. + */ + boolean hasQueryResult(); + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + * + * @return The queryResult. + */ + com.google.cloud.dialogflow.v2.QueryResult getQueryResult(); + /** + * + * + *
+   * Result from v2 agent.
+   * 
+ * + * .google.cloud.dialogflow.v2.QueryResult query_result = 1; + */ + com.google.cloud.dialogflow.v2.QueryResultOrBuilder getQueryResultOrBuilder(); + + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return Whether the intentSuggestion field is set. + */ + boolean hasIntentSuggestion(); + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + * + * @return The intentSuggestion. + */ + com.google.cloud.dialogflow.v2.IntentSuggestion getIntentSuggestion(); + /** + * + * + *
+   * An intent suggestion generated from conversation.
+   * 
+ * + * .google.cloud.dialogflow.v2.IntentSuggestion intent_suggestion = 5; + */ + com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder getIntentSuggestionOrBuilder(); + + /** + * + * + *
+   * The name of answer record, in the format of
+   * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>"
+   * 
+ * + * string answer_record = 2; + * + * @return The answerRecord. + */ + java.lang.String getAnswerRecord(); + /** + * + * + *
+   * The name of answer record, in the format of
+   * "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>"
+   * 
+ * + * string answer_record = 2; + * + * @return The bytes for answerRecord. + */ + com.google.protobuf.ByteString getAnswerRecordBytes(); + + com.google.cloud.dialogflow.v2.DialogflowAssistAnswer.ResultCase getResultCase(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GenerateStatelessSummaryResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GenerateStatelessSummaryResponse.java index a618e2870b00..c50335274d21 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GenerateStatelessSummaryResponse.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GenerateStatelessSummaryResponse.java @@ -161,6 +161,33 @@ java.lang.String getTextSectionsOrDefault( * map<string, string> text_sections = 2; */ java.lang.String getTextSectionsOrThrow(java.lang.String key); + + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + java.lang.String getBaselineModelVersion(); + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + com.google.protobuf.ByteString getBaselineModelVersionBytes(); } /** * @@ -183,6 +210,7 @@ private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Summary() { text_ = ""; + baselineModelVersion_ = ""; } @java.lang.Override @@ -381,6 +409,59 @@ public java.lang.String getTextSectionsOrThrow(java.lang.String key) { return map.get(key); } + public static final int BASELINE_MODEL_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + @java.lang.Override + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + 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(); + baselineModelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -400,6 +481,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 2); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baselineModelVersion_); + } getUnknownFields().writeTo(output); } @@ -422,6 +506,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, textSections__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baselineModelVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -441,6 +528,7 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; + if (!getBaselineModelVersion().equals(other.getBaselineModelVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -458,6 +546,8 @@ public int hashCode() { hash = (37 * hash) + TEXT_SECTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetTextSections().hashCode(); } + hash = (37 * hash) + BASELINE_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBaselineModelVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -625,6 +715,7 @@ public Builder clear() { bitField0_ = 0; text_ = ""; internalGetMutableTextSections().clear(); + baselineModelVersion_ = ""; return this; } @@ -673,6 +764,9 @@ private void buildPartial0( result.textSections_ = internalGetTextSections(); result.textSections_.makeImmutable(); } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baselineModelVersion_ = baselineModelVersion_; + } } @java.lang.Override @@ -734,6 +828,11 @@ public Builder mergeFrom( } internalGetMutableTextSections().mergeFrom(other.internalGetTextSections()); bitField0_ |= 0x00000002; + if (!other.getBaselineModelVersion().isEmpty()) { + baselineModelVersion_ = other.baselineModelVersion_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -778,6 +877,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 34: + { + baselineModelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1083,6 +1188,117 @@ public Builder putAllTextSections(java.util.Map + * The baseline model version used to generate this summary. It is empty if + * a baseline model was not used to generate this summary. + * + * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineModelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @param value The baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baselineModelVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @return This builder for chaining. + */ + public Builder clearBaselineModelVersion() { + baselineModelVersion_ = getDefaultInstance().getBaselineModelVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @param value The bytes for baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baselineModelVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/HumanAgentAssistantConfig.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/HumanAgentAssistantConfig.java index f5a47e7cdbef..65d1690be4b5 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/HumanAgentAssistantConfig.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/HumanAgentAssistantConfig.java @@ -795,7 +795,8 @@ public interface SuggestionFeatureConfigOrBuilder * Automatically iterates all participants and tries to compile * suggestions. * - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + * KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -804,6 +805,22 @@ public interface SuggestionFeatureConfigOrBuilder */ boolean getEnableEventBasedSuggestion(); + /** + * + * + *
+     * Optional. Disable the logging of search queries sent by human agents. It
+     * can prevent those queries from being stored at answer records.
+     *
+     * Supported features: KNOWLEDGE_SEARCH.
+     * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAgentQueryLogging. + */ + boolean getDisableAgentQueryLogging(); + /** * * @@ -1086,7 +1103,8 @@ public com.google.cloud.dialogflow.v2.SuggestionFeature getSuggestionFeature() { * Automatically iterates all participants and tries to compile * suggestions. * - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + * KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -1098,6 +1116,27 @@ public boolean getEnableEventBasedSuggestion() { return enableEventBasedSuggestion_; } + public static final int DISABLE_AGENT_QUERY_LOGGING_FIELD_NUMBER = 14; + private boolean disableAgentQueryLogging_ = false; + /** + * + * + *
+     * Optional. Disable the logging of search queries sent by human agents. It
+     * can prevent those queries from being stored at answer records.
+     *
+     * Supported features: KNOWLEDGE_SEARCH.
+     * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAgentQueryLogging. + */ + @java.lang.Override + public boolean getDisableAgentQueryLogging() { + return disableAgentQueryLogging_; + } + public static final int SUGGESTION_TRIGGER_SETTINGS_FIELD_NUMBER = 10; private com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestionTriggerSettings_; @@ -1382,6 +1421,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (suggestionTriggerSettings_ != null) { output.writeMessage(10, getSuggestionTriggerSettings()); } + if (disableAgentQueryLogging_ != false) { + output.writeBool(14, disableAgentQueryLogging_); + } getUnknownFields().writeTo(output); } @@ -1416,6 +1458,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, getSuggestionTriggerSettings()); } + if (disableAgentQueryLogging_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(14, disableAgentQueryLogging_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1439,6 +1485,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSuggestionFeature().equals(other.getSuggestionFeature())) return false; } if (getEnableEventBasedSuggestion() != other.getEnableEventBasedSuggestion()) return false; + if (getDisableAgentQueryLogging() != other.getDisableAgentQueryLogging()) return false; if (hasSuggestionTriggerSettings() != other.hasSuggestionTriggerSettings()) return false; if (hasSuggestionTriggerSettings()) { if (!getSuggestionTriggerSettings().equals(other.getSuggestionTriggerSettings())) @@ -1475,6 +1522,8 @@ public int hashCode() { hash = (37 * hash) + ENABLE_EVENT_BASED_SUGGESTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableEventBasedSuggestion()); + hash = (37 * hash) + DISABLE_AGENT_QUERY_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAgentQueryLogging()); if (hasSuggestionTriggerSettings()) { hash = (37 * hash) + SUGGESTION_TRIGGER_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSuggestionTriggerSettings().hashCode(); @@ -1650,6 +1699,7 @@ public Builder clear() { suggestionFeatureBuilder_ = null; } enableEventBasedSuggestion_ = false; + disableAgentQueryLogging_ = false; suggestionTriggerSettings_ = null; if (suggestionTriggerSettingsBuilder_ != null) { suggestionTriggerSettingsBuilder_.dispose(); @@ -1723,22 +1773,25 @@ private void buildPartial0( result.enableEventBasedSuggestion_ = enableEventBasedSuggestion_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.disableAgentQueryLogging_ = disableAgentQueryLogging_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.suggestionTriggerSettings_ = suggestionTriggerSettingsBuilder_ == null ? suggestionTriggerSettings_ : suggestionTriggerSettingsBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.queryConfig_ = queryConfigBuilder_ == null ? queryConfig_ : queryConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.conversationModelConfig_ = conversationModelConfigBuilder_ == null ? conversationModelConfig_ : conversationModelConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.conversationProcessConfig_ = conversationProcessConfigBuilder_ == null ? conversationProcessConfig_ @@ -1806,6 +1859,9 @@ public Builder mergeFrom( if (other.getEnableEventBasedSuggestion() != false) { setEnableEventBasedSuggestion(other.getEnableEventBasedSuggestion()); } + if (other.getDisableAgentQueryLogging() != false) { + setDisableAgentQueryLogging(other.getDisableAgentQueryLogging()); + } if (other.hasSuggestionTriggerSettings()) { mergeSuggestionTriggerSettings(other.getSuggestionTriggerSettings()); } @@ -1860,30 +1916,36 @@ public Builder mergeFrom( case 50: { input.readMessage(getQueryConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 50 case 58: { input.readMessage( getConversationModelConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 58 case 66: { input.readMessage( getConversationProcessConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 66 case 82: { input.readMessage( getSuggestionTriggerSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 82 + case 112: + { + disableAgentQueryLogging_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 112 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2099,7 +2161,8 @@ public Builder clearSuggestionFeature() { * Automatically iterates all participants and tries to compile * suggestions. * - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + * KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2117,7 +2180,8 @@ public boolean getEnableEventBasedSuggestion() { * Automatically iterates all participants and tries to compile * suggestions. * - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + * KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2139,7 +2203,8 @@ public Builder setEnableEventBasedSuggestion(boolean value) { * Automatically iterates all participants and tries to compile * suggestions. * - * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + * KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2153,6 +2218,71 @@ public Builder clearEnableEventBasedSuggestion() { return this; } + private boolean disableAgentQueryLogging_; + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableAgentQueryLogging. + */ + @java.lang.Override + public boolean getDisableAgentQueryLogging() { + return disableAgentQueryLogging_; + } + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableAgentQueryLogging to set. + * @return This builder for chaining. + */ + public Builder setDisableAgentQueryLogging(boolean value) { + + disableAgentQueryLogging_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableAgentQueryLogging() { + bitField0_ = (bitField0_ & ~0x00000004); + disableAgentQueryLogging_ = false; + onChanged(); + return this; + } + private com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestionTriggerSettings_; private com.google.protobuf.SingleFieldBuilderV3< @@ -2178,7 +2308,7 @@ public Builder clearEnableEventBasedSuggestion() { * @return Whether the suggestionTriggerSettings field is set. */ public boolean hasSuggestionTriggerSettings() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2230,7 +2360,7 @@ public Builder setSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2255,7 +2385,7 @@ public Builder setSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2276,7 +2406,7 @@ public Builder mergeSuggestionTriggerSettings( com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings value) { if (suggestionTriggerSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && suggestionTriggerSettings_ != null && suggestionTriggerSettings_ != com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig @@ -2288,7 +2418,7 @@ public Builder mergeSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2306,7 +2436,7 @@ public Builder mergeSuggestionTriggerSettings( * */ public Builder clearSuggestionTriggerSettings() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); suggestionTriggerSettings_ = null; if (suggestionTriggerSettingsBuilder_ != null) { suggestionTriggerSettingsBuilder_.dispose(); @@ -2331,7 +2461,7 @@ public Builder clearSuggestionTriggerSettings() { public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings .Builder getSuggestionTriggerSettingsBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getSuggestionTriggerSettingsFieldBuilder().getBuilder(); } @@ -2418,7 +2548,7 @@ public Builder clearSuggestionTriggerSettings() { * @return Whether the queryConfig field is set. */ public boolean hasQueryConfig() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2465,7 +2595,7 @@ public Builder setQueryConfig( } else { queryConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2488,7 +2618,7 @@ public Builder setQueryConfig( } else { queryConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2506,7 +2636,7 @@ public Builder setQueryConfig( public Builder mergeQueryConfig( com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig value) { if (queryConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && queryConfig_ != null && queryConfig_ != com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig @@ -2518,7 +2648,7 @@ public Builder mergeQueryConfig( } else { queryConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2534,7 +2664,7 @@ public Builder mergeQueryConfig( * */ public Builder clearQueryConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); queryConfig_ = null; if (queryConfigBuilder_ != null) { queryConfigBuilder_.dispose(); @@ -2556,7 +2686,7 @@ public Builder clearQueryConfig() { */ public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.Builder getQueryConfigBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getQueryConfigFieldBuilder().getBuilder(); } @@ -2637,7 +2767,7 @@ public Builder clearQueryConfig() { * @return Whether the conversationModelConfig field is set. */ public boolean hasConversationModelConfig() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2684,7 +2814,7 @@ public Builder setConversationModelConfig( } else { conversationModelConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2707,7 +2837,7 @@ public Builder setConversationModelConfig( } else { conversationModelConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2725,7 +2855,7 @@ public Builder setConversationModelConfig( public Builder mergeConversationModelConfig( com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig value) { if (conversationModelConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && conversationModelConfig_ != null && conversationModelConfig_ != com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig @@ -2737,7 +2867,7 @@ public Builder mergeConversationModelConfig( } else { conversationModelConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2753,7 +2883,7 @@ public Builder mergeConversationModelConfig( * */ public Builder clearConversationModelConfig() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); conversationModelConfig_ = null; if (conversationModelConfigBuilder_ != null) { conversationModelConfigBuilder_.dispose(); @@ -2776,7 +2906,7 @@ public Builder clearConversationModelConfig() { public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig .Builder getConversationModelConfigBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getConversationModelConfigFieldBuilder().getBuilder(); } @@ -2858,7 +2988,7 @@ public Builder clearConversationModelConfig() { * @return Whether the conversationProcessConfig field is set. */ public boolean hasConversationProcessConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2906,7 +3036,7 @@ public Builder setConversationProcessConfig( } else { conversationProcessConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2929,7 +3059,7 @@ public Builder setConversationProcessConfig( } else { conversationProcessConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2948,7 +3078,7 @@ public Builder mergeConversationProcessConfig( com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig value) { if (conversationProcessConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && conversationProcessConfig_ != null && conversationProcessConfig_ != com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig @@ -2960,7 +3090,7 @@ public Builder mergeConversationProcessConfig( } else { conversationProcessConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2976,7 +3106,7 @@ public Builder mergeConversationProcessConfig( * */ public Builder clearConversationProcessConfig() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); conversationProcessConfig_ = null; if (conversationProcessConfigBuilder_ != null) { conversationProcessConfigBuilder_.dispose(); @@ -2999,7 +3129,7 @@ public Builder clearConversationProcessConfig() { public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig .Builder getConversationProcessConfigBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getConversationProcessConfigFieldBuilder().getBuilder(); } @@ -6604,6 +6734,51 @@ public interface DialogflowQuerySourceOrBuilder * @return The bytes for agent. */ com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the humanAgentSideConfig field is set. + */ + boolean hasHumanAgentSideConfig(); + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The humanAgentSideConfig. + */ + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getHumanAgentSideConfig(); + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder + getHumanAgentSideConfigOrBuilder(); } /** * @@ -6654,84 +6829,904 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .DialogflowQuerySource.Builder.class); } - public static final int AGENT_FIELD_NUMBER = 1; + public interface HumanAgentSideConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object agent_ = ""; - /** - * - * - *
-       * Required. The name of a Dialogflow virtual agent used for end user side
-       * intent detection and suggestion. Format: `projects/<Project
-       * ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
-       * the same Dialogflow project.
-       * 
- * - * - * string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The agent. - */ - @java.lang.Override - public java.lang.String getAgent() { - java.lang.Object ref = agent_; - 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(); - agent_ = s; - return s; - } + /** + * + * + *
+         * Optional. The name of a dialogflow virtual agent used for intent
+         * detection and suggestion triggered by human agent.
+         * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+         * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+         * Optional. The name of a dialogflow virtual agent used for intent
+         * detection and suggestion triggered by human agent.
+         * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+         * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); } /** * * *
-       * Required. The name of a Dialogflow virtual agent used for end user side
-       * intent detection and suggestion. Format: `projects/<Project
-       * ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
-       * the same Dialogflow project.
+       * The configuration used for human agent side Dialogflow assist
+       * suggestion.
        * 
* - * - * string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for agent. + * Protobuf type {@code + * google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig} */ - @java.lang.Override - public com.google.protobuf.ByteString getAgentBytes() { - java.lang.Object ref = agent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - agent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class HumanAgentSideConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig) + HumanAgentSideConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use HumanAgentSideConfig.newBuilder() to construct. + private HumanAgentSideConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - private byte memoizedIsInitialized = -1; + private HumanAgentSideConfig() { + agent_ = ""; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HumanAgentSideConfig(); + } - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProfileProto + .internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProfileProto + .internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.class, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder.class); + } + + public static final int AGENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object agent_ = ""; + /** + * + * + *
+         * Optional. The name of a dialogflow virtual agent used for intent
+         * detection and suggestion triggered by human agent.
+         * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+         * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + 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(); + agent_ = s; + return s; + } + } + /** + * + * + *
+         * Optional. The name of a dialogflow virtual agent used for intent
+         * detection and suggestion triggered by human agent.
+         * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+         * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = 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(agent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, agent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, agent_); + } + size += getUnknownFields().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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + other = + (com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig) + obj; + + if (!getAgent().equals(other.getAgent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + 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 configuration used for human agent side Dialogflow assist
+         * suggestion.
+         * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig) + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProfileProto + .internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProfileProto + .internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.class, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + agent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ConversationProfileProto + .internal_static_google_cloud_dialogflow_v2_HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + build() { + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + buildPartial() { + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + result = + new com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig + .SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.agent_ = agent_; + } + } + + @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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + other) { + if (other + == com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance()) return this; + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + agent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object agent_ = ""; + /** + * + * + *
+           * Optional. The name of a dialogflow virtual agent used for intent
+           * detection and suggestion triggered by human agent.
+           * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+           * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Optional. The name of a dialogflow virtual agent used for intent
+           * detection and suggestion triggered by human agent.
+           * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+           * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Optional. The name of a dialogflow virtual agent used for intent
+           * detection and suggestion triggered by human agent.
+           * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+           * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Optional. The name of a dialogflow virtual agent used for intent
+           * detection and suggestion triggered by human agent.
+           * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+           * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + agent_ = getDefaultInstance().getAgent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Optional. The name of a dialogflow virtual agent used for intent
+           * detection and suggestion triggered by human agent.
+           * Format: `projects/<Project ID>/locations/<Location ID>/agent`.
+           * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agent_ = value; + bitField0_ |= 0x00000001; + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig) + private static final com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig + .SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig(); + } + + public static com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HumanAgentSideConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AGENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object agent_ = ""; + /** + * + * + *
+       * Required. The name of a Dialogflow virtual agent used for end user side
+       * intent detection and suggestion. Format: `projects/<Project
+       * ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
+       * the same Dialogflow project.
+       * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + 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(); + agent_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The name of a Dialogflow virtual agent used for end user side
+       * intent detection and suggestion. Format: `projects/<Project
+       * ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
+       * the same Dialogflow project.
+       * 
+ * + * + * string agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HUMAN_AGENT_SIDE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + humanAgentSideConfig_; + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the humanAgentSideConfig field is set. + */ + @java.lang.Override + public boolean hasHumanAgentSideConfig() { + return humanAgentSideConfig_ != null; + } + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The humanAgentSideConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getHumanAgentSideConfig() { + return humanAgentSideConfig_ == null + ? com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance() + : humanAgentSideConfig_; + } + /** + * + * + *
+       * Optional. The Dialogflow assist configuration for human agent.
+       * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder + getHumanAgentSideConfigOrBuilder() { + return humanAgentSideConfig_ == null + ? com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance() + : humanAgentSideConfig_; + } + + 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(agent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, agent_); } + if (humanAgentSideConfig_ != null) { + output.writeMessage(3, getHumanAgentSideConfig()); + } getUnknownFields().writeTo(output); } @@ -6744,6 +7739,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, agent_); } + if (humanAgentSideConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getHumanAgentSideConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -6768,6 +7768,10 @@ public boolean equals(final java.lang.Object obj) { obj; if (!getAgent().equals(other.getAgent())) return false; + if (hasHumanAgentSideConfig() != other.hasHumanAgentSideConfig()) return false; + if (hasHumanAgentSideConfig()) { + if (!getHumanAgentSideConfig().equals(other.getHumanAgentSideConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6781,6 +7785,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + AGENT_FIELD_NUMBER; hash = (53 * hash) + getAgent().hashCode(); + if (hasHumanAgentSideConfig()) { + hash = (37 * hash) + HUMAN_AGENT_SIDE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHumanAgentSideConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -6953,6 +7961,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; agent_ = ""; + humanAgentSideConfig_ = null; + if (humanAgentSideConfigBuilder_ != null) { + humanAgentSideConfigBuilder_.dispose(); + humanAgentSideConfigBuilder_ = null; + } return this; } @@ -7007,6 +8020,12 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000001) != 0)) { result.agent_ = agent_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.humanAgentSideConfig_ = + humanAgentSideConfigBuilder_ == null + ? humanAgentSideConfig_ + : humanAgentSideConfigBuilder_.build(); + } } @java.lang.Override @@ -7072,6 +8091,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; onChanged(); } + if (other.hasHumanAgentSideConfig()) { + mergeHumanAgentSideConfig(other.getHumanAgentSideConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7104,6 +8126,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 26: + { + input.readMessage( + getHumanAgentSideConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7254,6 +8283,238 @@ public Builder setAgentBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + humanAgentSideConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder> + humanAgentSideConfigBuilder_; + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the humanAgentSideConfig field is set. + */ + public boolean hasHumanAgentSideConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The humanAgentSideConfig. + */ + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + getHumanAgentSideConfig() { + if (humanAgentSideConfigBuilder_ == null) { + return humanAgentSideConfig_ == null + ? com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance() + : humanAgentSideConfig_; + } else { + return humanAgentSideConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHumanAgentSideConfig( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + value) { + if (humanAgentSideConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + humanAgentSideConfig_ = value; + } else { + humanAgentSideConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHumanAgentSideConfig( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder + builderForValue) { + if (humanAgentSideConfigBuilder_ == null) { + humanAgentSideConfig_ = builderForValue.build(); + } else { + humanAgentSideConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHumanAgentSideConfig( + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig + value) { + if (humanAgentSideConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && humanAgentSideConfig_ != null + && humanAgentSideConfig_ + != com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig + .SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig + .getDefaultInstance()) { + getHumanAgentSideConfigBuilder().mergeFrom(value); + } else { + humanAgentSideConfig_ = value; + } + } else { + humanAgentSideConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHumanAgentSideConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + humanAgentSideConfig_ = null; + if (humanAgentSideConfigBuilder_ != null) { + humanAgentSideConfigBuilder_.dispose(); + humanAgentSideConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder + getHumanAgentSideConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHumanAgentSideConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder + getHumanAgentSideConfigOrBuilder() { + if (humanAgentSideConfigBuilder_ != null) { + return humanAgentSideConfigBuilder_.getMessageOrBuilder(); + } else { + return humanAgentSideConfig_ == null + ? com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.getDefaultInstance() + : humanAgentSideConfig_; + } + } + /** + * + * + *
+         * Optional. The Dialogflow assist configuration for human agent.
+         * 
+ * + * + * .google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.HumanAgentSideConfig human_agent_side_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder> + getHumanAgentSideConfigFieldBuilder() { + if (humanAgentSideConfigBuilder_ == null) { + humanAgentSideConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfig.Builder, + com.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + .DialogflowQuerySource.HumanAgentSideConfigOrBuilder>( + getHumanAgentSideConfig(), getParentForChildren(), isClean()); + humanAgentSideConfig_ = null; + } + return humanAgentSideConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestion.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestion.java new file mode 100644 index 000000000000..45a6117bea04 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestion.java @@ -0,0 +1,1145 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Represents an intent suggestion.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.IntentSuggestion} + */ +public final class IntentSuggestion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.IntentSuggestion) + IntentSuggestionOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntentSuggestion.newBuilder() to construct. + private IntentSuggestion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntentSuggestion() { + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntentSuggestion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_IntentSuggestion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.IntentSuggestion.class, + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder.class); + } + + private int intentCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object intent_; + + public enum IntentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENT_V2(2), + INTENT_NOT_SET(0); + private final int value; + + private IntentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IntentCase valueOf(int value) { + return forNumber(value); + } + + public static IntentCase forNumber(int value) { + switch (value) { + case 2: + return INTENT_V2; + case 0: + return INTENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IntentCase getIntentCase() { + return IntentCase.forNumber(intentCase_); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The display name of the intent.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The display name of the intent.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENT_V2_FIELD_NUMBER = 2; + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return Whether the intentV2 field is set. + */ + public boolean hasIntentV2() { + return intentCase_ == 2; + } + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return The intentV2. + */ + public java.lang.String getIntentV2() { + java.lang.Object ref = ""; + if (intentCase_ == 2) { + ref = intent_; + } + 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(); + if (intentCase_ == 2) { + intent_ = s; + } + return s; + } + } + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return The bytes for intentV2. + */ + public com.google.protobuf.ByteString getIntentV2Bytes() { + java.lang.Object ref = ""; + if (intentCase_ == 2) { + ref = intent_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentCase_ == 2) { + intent_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Human readable description for better understanding an intent like its
+   * scope, content, result etc. Maximum character limit: 140 characters.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Human readable description for better understanding an intent like its
+   * scope, content, result etc. Maximum character limit: 140 characters.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = 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(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (intentCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, intent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (intentCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, intent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + size += getUnknownFields().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.v2.IntentSuggestion)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.IntentSuggestion other = + (com.google.cloud.dialogflow.v2.IntentSuggestion) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getIntentCase().equals(other.getIntentCase())) return false; + switch (intentCase_) { + case 2: + if (!getIntentV2().equals(other.getIntentV2())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (intentCase_) { + case 2: + hash = (37 * hash) + INTENT_V2_FIELD_NUMBER; + hash = (53 * hash) + getIntentV2().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion 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.v2.IntentSuggestion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion 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.v2.IntentSuggestion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion 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.v2.IntentSuggestion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion 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.v2.IntentSuggestion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion 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.v2.IntentSuggestion 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; + } + /** + * + * + *
+   * Represents an intent suggestion.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.IntentSuggestion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.IntentSuggestion) + com.google.cloud.dialogflow.v2.IntentSuggestionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_IntentSuggestion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.IntentSuggestion.class, + com.google.cloud.dialogflow.v2.IntentSuggestion.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.IntentSuggestion.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + description_ = ""; + intentCase_ = 0; + intent_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestion getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestion build() { + com.google.cloud.dialogflow.v2.IntentSuggestion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.IntentSuggestion buildPartial() { + com.google.cloud.dialogflow.v2.IntentSuggestion result = + new com.google.cloud.dialogflow.v2.IntentSuggestion(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.IntentSuggestion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.v2.IntentSuggestion result) { + result.intentCase_ = intentCase_; + result.intent_ = this.intent_; + } + + @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.v2.IntentSuggestion) { + return mergeFrom((com.google.cloud.dialogflow.v2.IntentSuggestion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.IntentSuggestion other) { + if (other == com.google.cloud.dialogflow.v2.IntentSuggestion.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getIntentCase()) { + case INTENT_V2: + { + intentCase_ = 2; + intent_ = other.intent_; + onChanged(); + break; + } + case INTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + intentCase_ = 2; + intent_ = s; + break; + } // case 18 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int intentCase_ = 0; + private java.lang.Object intent_; + + public IntentCase getIntentCase() { + return IntentCase.forNumber(intentCase_); + } + + public Builder clearIntent() { + intentCase_ = 0; + intent_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the intent.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The display name of the intent.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The display name of the intent.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the intent.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the intent.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @return Whether the intentV2 field is set. + */ + @java.lang.Override + public boolean hasIntentV2() { + return intentCase_ == 2; + } + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @return The intentV2. + */ + @java.lang.Override + public java.lang.String getIntentV2() { + java.lang.Object ref = ""; + if (intentCase_ == 2) { + ref = intent_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (intentCase_ == 2) { + intent_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @return The bytes for intentV2. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIntentV2Bytes() { + java.lang.Object ref = ""; + if (intentCase_ == 2) { + ref = intent_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentCase_ == 2) { + intent_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @param value The intentV2 to set. + * @return This builder for chaining. + */ + public Builder setIntentV2(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + intentCase_ = 2; + intent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @return This builder for chaining. + */ + public Builder clearIntentV2() { + if (intentCase_ == 2) { + intentCase_ = 0; + intent_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The unique identifier of this
+     * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+     * 
+ * + * string intent_v2 = 2; + * + * @param value The bytes for intentV2 to set. + * @return This builder for chaining. + */ + public Builder setIntentV2Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + intentCase_ = 2; + intent_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Human readable description for better understanding an intent like its
+     * scope, content, result etc. Maximum character limit: 140 characters.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human readable description for better understanding an intent like its
+     * scope, content, result etc. Maximum character limit: 140 characters.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human readable description for better understanding an intent like its
+     * scope, content, result etc. Maximum character limit: 140 characters.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable description for better understanding an intent like its
+     * scope, content, result etc. Maximum character limit: 140 characters.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable description for better understanding an intent like its
+     * scope, content, result etc. Maximum character limit: 140 characters.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + 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.v2.IntentSuggestion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.IntentSuggestion) + private static final com.google.cloud.dialogflow.v2.IntentSuggestion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.IntentSuggestion(); + } + + public static com.google.cloud.dialogflow.v2.IntentSuggestion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntentSuggestion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.IntentSuggestion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestionOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestionOrBuilder.java new file mode 100644 index 000000000000..1c93bad2a54e --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentSuggestionOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +public interface IntentSuggestionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.IntentSuggestion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The display name of the intent.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the intent.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return Whether the intentV2 field is set. + */ + boolean hasIntentV2(); + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return The intentV2. + */ + java.lang.String getIntentV2(); + /** + * + * + *
+   * The unique identifier of this
+   * [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agent/intents/<Intent ID>`.
+   * 
+ * + * string intent_v2 = 2; + * + * @return The bytes for intentV2. + */ + com.google.protobuf.ByteString getIntentV2Bytes(); + + /** + * + * + *
+   * Human readable description for better understanding an intent like its
+   * scope, content, result etc. Maximum character limit: 140 characters.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Human readable description for better understanding an intent like its
+   * scope, content, result etc. Maximum character limit: 140 characters.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + com.google.cloud.dialogflow.v2.IntentSuggestion.IntentCase getIntentCase(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java index 6069646d5de9..87ae1ed628f6 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java @@ -131,6 +131,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_SmartReplyAnswer_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_SmartReplyAnswer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_IntentSuggestion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2_SuggestionResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -147,6 +155,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_MessageAnnotation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_MessageAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_SuggestionInput_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2_AssistQueryParameters_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -223,221 +235,231 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030UpdateParticipantRequest\022B\n\013participant" + "\030\001 \001(\0132\'.google.cloud.dialogflow.v2.Part" + "icipantB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\004\342A\001\002\"\203\004\n\025Analyze" + + "gle.protobuf.FieldMaskB\004\342A\001\002\"\314\004\n\025Analyze" + "ContentRequest\022C\n\013participant\030\001 \001(\tB.\342A\001" + "\002\372A\'\n%dialogflow.googleapis.com/Particip" + "ant\022;\n\ntext_input\030\006 \001(\0132%.google.cloud.d" + "ialogflow.v2.TextInputH\000\022=\n\013event_input\030" + "\010 \001(\0132&.google.cloud.dialogflow.v2.Event" - + "InputH\000\022I\n\022reply_audio_config\030\005 \001(\0132-.go" - + "ogle.cloud.dialogflow.v2.OutputAudioConf" - + "ig\022A\n\014query_params\030\t \001(\0132+.google.cloud." - + "dialogflow.v2.QueryParameters\022N\n\023assist_" - + "query_params\030\016 \001(\01321.google.cloud.dialog" - + "flow.v2.AssistQueryParameters\022.\n\rcx_para" - + "meters\030\022 \001(\0132\027.google.protobuf.Struct\022\022\n" - + "\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfParame" - + "ters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"\336\003\n\026Ana" - + "lyzeContentResponse\022\022\n\nreply_text\030\001 \001(\t\022" - + "<\n\013reply_audio\030\002 \001(\0132\'.google.cloud.dial" - + "ogflow.v2.OutputAudio\022N\n\025automated_agent" - + "_reply\030\003 \001(\0132/.google.cloud.dialogflow.v" - + "2.AutomatedAgentReply\0224\n\007message\030\005 \001(\0132#" - + ".google.cloud.dialogflow.v2.Message\022T\n\036h" - + "uman_agent_suggestion_results\030\006 \003(\0132,.go" - + "ogle.cloud.dialogflow.v2.SuggestionResul" - + "t\022Q\n\033end_user_suggestion_results\030\007 \003(\0132," - + ".google.cloud.dialogflow.v2.SuggestionRe" - + "sult\022C\n\017dtmf_parameters\030\t \001(\0132*.google.c" - + "loud.dialogflow.v2.DtmfParameters\"\321\005\n\036St" - + "reamingAnalyzeContentRequest\022C\n\013particip" - + "ant\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.googleapi" - + "s.com/Participant\022D\n\014audio_config\030\002 \001(\0132" - + ",.google.cloud.dialogflow.v2.InputAudioC" - + "onfigH\000\022B\n\013text_config\030\003 \001(\0132+.google.cl" - + "oud.dialogflow.v2.InputTextConfigH\000\022I\n\022r" - + "eply_audio_config\030\004 \001(\0132-.google.cloud.d" - + "ialogflow.v2.OutputAudioConfig\022\025\n\013input_" - + "audio\030\005 \001(\014H\001\022\024\n\ninput_text\030\006 \001(\tH\001\022E\n\ni" - + "nput_dtmf\030\t \001(\0132/.google.cloud.dialogflo" - + "w.v2.TelephonyDtmfEventsH\001\022A\n\014query_para" - + "ms\030\007 \001(\0132+.google.cloud.dialogflow.v2.Qu" - + "eryParameters\022N\n\023assist_query_params\030\010 \001" - + "(\01321.google.cloud.dialogflow.v2.AssistQu" - + "eryParameters\022.\n\rcx_parameters\030\r \001(\0132\027.g" - + "oogle.protobuf.Struct\022,\n$enable_partial_" - + "automated_agent_reply\030\014 \001(\010\022\035\n\025enable_de" - + "bugging_info\030\023 \001(\010B\010\n\006configB\007\n\005input\"\217\005" - + "\n\037StreamingAnalyzeContentResponse\022R\n\022rec" - + "ognition_result\030\001 \001(\01326.google.cloud.dia" - + "logflow.v2.StreamingRecognitionResult\022\022\n" - + "\nreply_text\030\002 \001(\t\022<\n\013reply_audio\030\003 \001(\0132\'" - + ".google.cloud.dialogflow.v2.OutputAudio\022" - + "N\n\025automated_agent_reply\030\004 \001(\0132/.google." - + "cloud.dialogflow.v2.AutomatedAgentReply\022" - + "4\n\007message\030\006 \001(\0132#.google.cloud.dialogfl" - + "ow.v2.Message\022T\n\036human_agent_suggestion_" - + "results\030\007 \003(\0132,.google.cloud.dialogflow." - + "v2.SuggestionResult\022Q\n\033end_user_suggesti" - + "on_results\030\010 \003(\0132,.google.cloud.dialogfl" - + "ow.v2.SuggestionResult\022C\n\017dtmf_parameter" - + "s\030\n \001(\0132*.google.cloud.dialogflow.v2.Dtm" - + "fParameters\022R\n\016debugging_info\030\013 \001(\0132:.go" - + "ogle.cloud.dialogflow.v2.CloudConversati" - + "onDebuggingInfo\"\210\002\n\026SuggestArticlesReque" - + "st\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow." - + "googleapis.com/Participant\022B\n\016latest_mes" - + "sage\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow.googleap" - + "is.com/Message\022\032\n\014context_size\030\003 \001(\005B\004\342A" - + "\001\001\022N\n\023assist_query_params\030\004 \001(\01321.google" - + ".cloud.dialogflow.v2.AssistQueryParamete" - + "rs\"\213\001\n\027SuggestArticlesResponse\022B\n\017articl" - + "e_answers\030\001 \003(\0132).google.cloud.dialogflo" - + "w.v2.ArticleAnswer\022\026\n\016latest_message\030\002 \001" - + "(\t\022\024\n\014context_size\030\003 \001(\005\"\212\002\n\030SuggestFaqA" - + "nswersRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%" - + "dialogflow.googleapis.com/Participant\022B\n" - + "\016latest_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialogfl" - + "ow.googleapis.com/Message\022\032\n\014context_siz" - + "e\030\003 \001(\005B\004\342A\001\001\022N\n\023assist_query_params\030\004 \001" - + "(\01321.google.cloud.dialogflow.v2.AssistQu" - + "eryParameters\"\205\001\n\031SuggestFaqAnswersRespo" - + "nse\022:\n\013faq_answers\030\001 \003(\0132%.google.cloud." - + "dialogflow.v2.FaqAnswer\022\026\n\016latest_messag" - + "e\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\365\001\n\032Sugges" - + "tSmartRepliesRequest\022>\n\006parent\030\001 \001(\tB.\342A" - + "\001\002\372A\'\n%dialogflow.googleapis.com/Partici" - + "pant\022A\n\022current_text_input\030\004 \001(\0132%.googl" - + "e.cloud.dialogflow.v2.TextInput\022>\n\016lates" - + "t_message\030\002 \001(\tB&\372A#\n!dialogflow.googlea" - + "pis.com/Message\022\024\n\014context_size\030\003 \001(\005\"\304\001" - + "\n\033SuggestSmartRepliesResponse\022O\n\023smart_r" - + "eply_answers\030\001 \003(\0132,.google.cloud.dialog" - + "flow.v2.SmartReplyAnswerB\004\342A\001\003\022>\n\016latest" - + "_message\030\002 \001(\tB&\372A#\n!dialogflow.googleap" - + "is.com/Message\022\024\n\014context_size\030\003 \001(\005\"[\n\013" - + "OutputAudio\022=\n\006config\030\001 \001(\0132-.google.clo" - + "ud.dialogflow.v2.OutputAudioConfig\022\r\n\005au" - + "dio\030\002 \001(\014\"\350\002\n\023AutomatedAgentReply\022P\n\026det" - + "ect_intent_response\030\001 \001(\01320.google.cloud" - + ".dialogflow.v2.DetectIntentResponse\022k\n\032a" - + "utomated_agent_reply_type\030\007 \001(\0162G.google" - + ".cloud.dialogflow.v2.AutomatedAgentReply" - + ".AutomatedAgentReplyType\022\032\n\022allow_cancel" - + "lation\030\010 \001(\010\022\027\n\017cx_current_page\030\013 \001(\t\"]\n" - + "\027AutomatedAgentReplyType\022*\n&AUTOMATED_AG" - + "ENT_REPLY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020" - + "\001\022\t\n\005FINAL\020\002\"\344\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\022\022\n\n" - + "confidence\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.goo" - + "gle.cloud.dialogflow.v2.ArticleAnswer.Me" - + "tadataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMe" - + "tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"\340\001\n\tFaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\ncon" - + "fidence\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006sourc" - + "e\030\004 \001(\t\022E\n\010metadata\030\005 \003(\01323.google.cloud" - + ".dialogflow.v2.FaqAnswer.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\020SmartR" - + "eplyAnswer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030" - + "\002 \001(\002\022B\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialo" - + "gflow.googleapis.com/AnswerRecord\"\352\002\n\020Su" - + "ggestionResult\022#\n\005error\030\001 \001(\0132\022.google.r" - + "pc.StatusH\000\022X\n\031suggest_articles_response" - + "\030\002 \001(\01323.google.cloud.dialogflow.v2.Sugg" - + "estArticlesResponseH\000\022]\n\034suggest_faq_ans" - + "wers_response\030\003 \001(\01325.google.cloud.dialo" - + "gflow.v2.SuggestFaqAnswersResponseH\000\022a\n\036" - + "suggest_smart_replies_response\030\004 \001(\01327.g" - + "oogle.cloud.dialogflow.v2.SuggestSmartRe" - + "pliesResponseH\000B\025\n\023suggestion_response\"." - + "\n\017InputTextConfig\022\033\n\rlanguage_code\030\001 \001(\t" - + "B\004\342A\001\002\"j\n\024AnnotatedMessagePart\022\014\n\004text\030\001" - + " \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017formatted_v" - + "alue\030\003 \001(\0132\026.google.protobuf.Value\"n\n\021Me" - + "ssageAnnotation\022?\n\005parts\030\001 \003(\01320.google." - + "cloud.dialogflow.v2.AnnotatedMessagePart" - + "\022\030\n\020contain_entities\030\002 \001(\010\"\315\001\n\025AssistQue" - + "ryParameters\022s\n\032documents_metadata_filte" - + "rs\030\001 \003(\0132O.google.cloud.dialogflow.v2.As" - + "sistQueryParameters.DocumentsMetadataFil" - + "tersEntry\032?\n\035DocumentsMetadataFiltersEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\372\025\n\014P" - + "articipants\022\245\002\n\021CreateParticipant\0224.goog" - + "le.cloud.dialogflow.v2.CreateParticipant" - + "Request\032\'.google.cloud.dialogflow.v2.Par" - + "ticipant\"\260\001\332A\022parent,participant\202\323\344\223\002\224\001\"" - + "4/v2/{parent=projects/*/conversations/*}" - + "/participants:\013participantZO\"@/v2/{paren" - + "t=projects/*/locations/*/conversations/*" - + "}/participants:\013participant\022\366\001\n\016GetParti" - + "cipant\0221.google.cloud.dialogflow.v2.GetP" - + "articipantRequest\032\'.google.cloud.dialogf" - + "low.v2.Participant\"\207\001\332A\004name\202\323\344\223\002z\0224/v2/" - + "{name=projects/*/conversations/*/partici" - + "pants/*}ZB\022@/v2/{name=projects/*/locatio" - + "ns/*/conversations/*/participants/*}\022\211\002\n" - + "\020ListParticipants\0223.google.cloud.dialogf" - + "low.v2.ListParticipantsRequest\0324.google." - + "cloud.dialogflow.v2.ListParticipantsResp" - + "onse\"\211\001\332A\006parent\202\323\344\223\002z\0224/v2/{parent=proj" - + "ects/*/conversations/*}/participantsZB\022@" - + "/v2/{parent=projects/*/locations/*/conve" - + "rsations/*}/participants\022\302\002\n\021UpdateParti" - + "cipant\0224.google.cloud.dialogflow.v2.Upda" - + "teParticipantRequest\032\'.google.cloud.dial" - + "ogflow.v2.Participant\"\315\001\332A\027participant,u" - + "pdate_mask\202\323\344\223\002\254\0012@/v2/{participant.name" - + "=projects/*/conversations/*/participants" - + "/*}:\013participantZ[2L/v2/{participant.nam" - + "e=projects/*/locations/*/conversations/*" - + "/participants/*}:\013participant\022\340\002\n\016Analyz" - + "eContent\0221.google.cloud.dialogflow.v2.An" - + "alyzeContentRequest\0322.google.cloud.dialo" - + "gflow.v2.AnalyzeContentResponse\"\346\001\332A\026par" - + "ticipant,text_input\332A\027participant,event_" - + "input\202\323\344\223\002\254\001\"J/v2/{participant=projects/" - + "*/conversations/*/participants/*}:analyz" - + "eContent:\001*Z[\"V/v2/{participant=projects" - + "/*/locations/*/conversations/*/participa" - + "nts/*}:analyzeContent:\001*\022\230\001\n\027StreamingAn" - + "alyzeContent\022:.google.cloud.dialogflow.v" - + "2.StreamingAnalyzeContentRequest\032;.googl" - + "e.cloud.dialogflow.v2.StreamingAnalyzeCo" - + "ntentResponse\"\000(\0010\001\022\311\002\n\017SuggestArticles\022" - + "2.google.cloud.dialogflow.v2.SuggestArti" - + "clesRequest\0323.google.cloud.dialogflow.v2" - + ".SuggestArticlesResponse\"\314\001\332A\006parent\202\323\344\223" - + "\002\274\001\"R/v2/{parent=projects/*/conversation" - + "s/*/participants/*}/suggestions:suggestA" - + "rticles:\001*Zc\"^/v2/{parent=projects/*/loc" - + "ations/*/conversations/*/participants/*}" - + "/suggestions:suggestArticles:\001*\022\323\002\n\021Sugg" - + "estFaqAnswers\0224.google.cloud.dialogflow." - + "v2.SuggestFaqAnswersRequest\0325.google.clo" - + "ud.dialogflow.v2.SuggestFaqAnswersRespon" - + "se\"\320\001\332A\006parent\202\323\344\223\002\300\001\"T/v2/{parent=proje" - + "cts/*/conversations/*/participants/*}/su" - + "ggestions:suggestFaqAnswers:\001*Ze\"`/v2/{p" - + "arent=projects/*/locations/*/conversatio" - + "ns/*/participants/*}/suggestions:suggest" - + "FaqAnswers:\001*\022\335\002\n\023SuggestSmartReplies\0226." - + "google.cloud.dialogflow.v2.SuggestSmartR" - + "epliesRequest\0327.google.cloud.dialogflow." - + "v2.SuggestSmartRepliesResponse\"\324\001\332A\006pare" - + "nt\202\323\344\223\002\304\001\"V/v2/{parent=projects/*/conver" + + "InputH\000\022G\n\020suggestion_input\030\014 \001(\0132+.goog" + + "le.cloud.dialogflow.v2.SuggestionInputH\000" + + "\022I\n\022reply_audio_config\030\005 \001(\0132-.google.cl" + + "oud.dialogflow.v2.OutputAudioConfig\022A\n\014q" + + "uery_params\030\t \001(\0132+.google.cloud.dialogf" + + "low.v2.QueryParameters\022N\n\023assist_query_p" + + "arams\030\016 \001(\01321.google.cloud.dialogflow.v2" + + ".AssistQueryParameters\022.\n\rcx_parameters\030" + + "\022 \001(\0132\027.google.protobuf.Struct\022\022\n\nreques" + + "t_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfParameters\022\032\n" + + "\022accepts_dtmf_input\030\001 \001(\010\"\336\003\n\026AnalyzeCon" + + "tentResponse\022\022\n\nreply_text\030\001 \001(\t\022<\n\013repl" + + "y_audio\030\002 \001(\0132\'.google.cloud.dialogflow." + + "v2.OutputAudio\022N\n\025automated_agent_reply\030" + + "\003 \001(\0132/.google.cloud.dialogflow.v2.Autom" + + "atedAgentReply\0224\n\007message\030\005 \001(\0132#.google" + + ".cloud.dialogflow.v2.Message\022T\n\036human_ag" + + "ent_suggestion_results\030\006 \003(\0132,.google.cl" + + "oud.dialogflow.v2.SuggestionResult\022Q\n\033en" + + "d_user_suggestion_results\030\007 \003(\0132,.google" + + ".cloud.dialogflow.v2.SuggestionResult\022C\n" + + "\017dtmf_parameters\030\t \001(\0132*.google.cloud.di" + + "alogflow.v2.DtmfParameters\"\321\005\n\036Streaming" + + "AnalyzeContentRequest\022C\n\013participant\030\001 \001" + + "(\tB.\342A\001\002\372A\'\n%dialogflow.googleapis.com/P" + + "articipant\022D\n\014audio_config\030\002 \001(\0132,.googl" + + "e.cloud.dialogflow.v2.InputAudioConfigH\000" + + "\022B\n\013text_config\030\003 \001(\0132+.google.cloud.dia" + + "logflow.v2.InputTextConfigH\000\022I\n\022reply_au" + + "dio_config\030\004 \001(\0132-.google.cloud.dialogfl" + + "ow.v2.OutputAudioConfig\022\025\n\013input_audio\030\005" + + " \001(\014H\001\022\024\n\ninput_text\030\006 \001(\tH\001\022E\n\ninput_dt" + + "mf\030\t \001(\0132/.google.cloud.dialogflow.v2.Te" + + "lephonyDtmfEventsH\001\022A\n\014query_params\030\007 \001(" + + "\0132+.google.cloud.dialogflow.v2.QueryPara" + + "meters\022N\n\023assist_query_params\030\010 \001(\01321.go" + + "ogle.cloud.dialogflow.v2.AssistQueryPara" + + "meters\022.\n\rcx_parameters\030\r \001(\0132\027.google.p" + + "rotobuf.Struct\022,\n$enable_partial_automat" + + "ed_agent_reply\030\014 \001(\010\022\035\n\025enable_debugging" + + "_info\030\023 \001(\010B\010\n\006configB\007\n\005input\"\217\005\n\037Strea" + + "mingAnalyzeContentResponse\022R\n\022recognitio" + + "n_result\030\001 \001(\01326.google.cloud.dialogflow" + + ".v2.StreamingRecognitionResult\022\022\n\nreply_" + + "text\030\002 \001(\t\022<\n\013reply_audio\030\003 \001(\0132\'.google" + + ".cloud.dialogflow.v2.OutputAudio\022N\n\025auto" + + "mated_agent_reply\030\004 \001(\0132/.google.cloud.d" + + "ialogflow.v2.AutomatedAgentReply\0224\n\007mess" + + "age\030\006 \001(\0132#.google.cloud.dialogflow.v2.M" + + "essage\022T\n\036human_agent_suggestion_results" + + "\030\007 \003(\0132,.google.cloud.dialogflow.v2.Sugg" + + "estionResult\022Q\n\033end_user_suggestion_resu" + + "lts\030\010 \003(\0132,.google.cloud.dialogflow.v2.S" + + "uggestionResult\022C\n\017dtmf_parameters\030\n \001(\013" + + "2*.google.cloud.dialogflow.v2.DtmfParame" + + "ters\022R\n\016debugging_info\030\013 \001(\0132:.google.cl" + + "oud.dialogflow.v2.CloudConversationDebug" + + "gingInfo\"\210\002\n\026SuggestArticlesRequest\022>\n\006p" + + "arent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.googlea" + + "pis.com/Participant\022B\n\016latest_message\030\002 " + + "\001(\tB*\342A\001\001\372A#\n!dialogflow.googleapis.com/" + + "Message\022\032\n\014context_size\030\003 \001(\005B\004\342A\001\001\022N\n\023a" + + "ssist_query_params\030\004 \001(\01321.google.cloud." + + "dialogflow.v2.AssistQueryParameters\"\213\001\n\027" + + "SuggestArticlesResponse\022B\n\017article_answe" + + "rs\030\001 \003(\0132).google.cloud.dialogflow.v2.Ar" + + "ticleAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014c" + + "ontext_size\030\003 \001(\005\"\212\002\n\030SuggestFaqAnswersR" + + "equest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogf" + + "low.googleapis.com/Participant\022B\n\016latest" + + "_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow.goog" + + "leapis.com/Message\022\032\n\014context_size\030\003 \001(\005" + + "B\004\342A\001\001\022N\n\023assist_query_params\030\004 \001(\01321.go" + + "ogle.cloud.dialogflow.v2.AssistQueryPara" + + "meters\"\205\001\n\031SuggestFaqAnswersResponse\022:\n\013" + + "faq_answers\030\001 \003(\0132%.google.cloud.dialogf" + + "low.v2.FaqAnswer\022\026\n\016latest_message\030\002 \001(\t" + + "\022\024\n\014context_size\030\003 \001(\005\"\365\001\n\032SuggestSmartR" + + "epliesRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%" + + "dialogflow.googleapis.com/Participant\022A\n" + + "\022current_text_input\030\004 \001(\0132%.google.cloud" + + ".dialogflow.v2.TextInput\022>\n\016latest_messa" + + "ge\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.com" + + "/Message\022\024\n\014context_size\030\003 \001(\005\"\304\001\n\033Sugge" + + "stSmartRepliesResponse\022O\n\023smart_reply_an" + + "swers\030\001 \003(\0132,.google.cloud.dialogflow.v2" + + ".SmartReplyAnswerB\004\342A\001\003\022>\n\016latest_messag" + + "e\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.com/" + + "Message\022\024\n\014context_size\030\003 \001(\005\"[\n\013OutputA" + + "udio\022=\n\006config\030\001 \001(\0132-.google.cloud.dial" + + "ogflow.v2.OutputAudioConfig\022\r\n\005audio\030\002 \001" + + "(\014\"\350\002\n\023AutomatedAgentReply\022P\n\026detect_int" + + "ent_response\030\001 \001(\01320.google.cloud.dialog" + + "flow.v2.DetectIntentResponse\022k\n\032automate" + + "d_agent_reply_type\030\007 \001(\0162G.google.cloud." + + "dialogflow.v2.AutomatedAgentReply.Automa" + + "tedAgentReplyType\022\032\n\022allow_cancellation\030" + + "\010 \001(\010\022\027\n\017cx_current_page\030\013 \001(\t\"]\n\027Automa" + + "tedAgentReplyType\022*\n&AUTOMATED_AGENT_REP" + + "LY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FI" + + "NAL\020\002\"\344\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\022\022\n\nconfide" + + "nce\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.google.clo" + + "ud.dialogflow.v2.ArticleAnswer.MetadataE" + + "ntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\340\001\n" + + "\tFaqAnswer\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" + + "\022E\n\010metadata\030\005 \003(\01323.google.cloud.dialog" + + "flow.v2.FaqAnswer.MetadataEntry\022\025\n\ranswe" + + "r_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\020SmartReplyAns" + + "wer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B" + + "\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialogflow.g" + + "oogleapis.com/AnswerRecord\"\\\n\020IntentSugg" + + "estion\022\024\n\014display_name\030\001 \001(\t\022\023\n\tintent_v" + + "2\030\002 \001(\tH\000\022\023\n\013description\030\005 \001(\tB\010\n\006intent" + + "\"\305\001\n\026DialogflowAssistAnswer\022?\n\014query_res" + + "ult\030\001 \001(\0132\'.google.cloud.dialogflow.v2.Q" + + "ueryResultH\000\022I\n\021intent_suggestion\030\005 \001(\0132" + + ",.google.cloud.dialogflow.v2.IntentSugge" + + "stionH\000\022\025\n\ranswer_record\030\002 \001(\tB\010\n\006result" + + "\"\352\002\n\020SuggestionResult\022#\n\005error\030\001 \001(\0132\022.g" + + "oogle.rpc.StatusH\000\022X\n\031suggest_articles_r" + + "esponse\030\002 \001(\01323.google.cloud.dialogflow." + + "v2.SuggestArticlesResponseH\000\022]\n\034suggest_" + + "faq_answers_response\030\003 \001(\01325.google.clou" + + "d.dialogflow.v2.SuggestFaqAnswersRespons" + + "eH\000\022a\n\036suggest_smart_replies_response\030\004 " + + "\001(\01327.google.cloud.dialogflow.v2.Suggest" + + "SmartRepliesResponseH\000B\025\n\023suggestion_res" + + "ponse\".\n\017InputTextConfig\022\033\n\rlanguage_cod" + + "e\030\001 \001(\tB\004\342A\001\002\"j\n\024AnnotatedMessagePart\022\014\n" + + "\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017form" + + "atted_value\030\003 \001(\0132\026.google.protobuf.Valu" + + "e\"n\n\021MessageAnnotation\022?\n\005parts\030\001 \003(\01320." + + "google.cloud.dialogflow.v2.AnnotatedMess" + + "agePart\022\030\n\020contain_entities\030\002 \001(\010\".\n\017Sug" + + "gestionInput\022\033\n\ranswer_record\030\001 \001(\tB\004\342A\001" + + "\002\"\315\001\n\025AssistQueryParameters\022s\n\032documents" + + "_metadata_filters\030\001 \003(\0132O.google.cloud.d" + + "ialogflow.v2.AssistQueryParameters.Docum" + + "entsMetadataFiltersEntry\032?\n\035DocumentsMet" + + "adataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\0012\372\025\n\014Participants\022\245\002\n\021CreatePar" + + "ticipant\0224.google.cloud.dialogflow.v2.Cr" + + "eateParticipantRequest\032\'.google.cloud.di" + + "alogflow.v2.Participant\"\260\001\332A\022parent,part" + + "icipant\202\323\344\223\002\224\001\"4/v2/{parent=projects/*/c" + + "onversations/*}/participants:\013participan" + + "tZO\"@/v2/{parent=projects/*/locations/*/" + + "conversations/*}/participants:\013participa" + + "nt\022\366\001\n\016GetParticipant\0221.google.cloud.dia" + + "logflow.v2.GetParticipantRequest\032\'.googl" + + "e.cloud.dialogflow.v2.Participant\"\207\001\332A\004n" + + "ame\202\323\344\223\002z\0224/v2/{name=projects/*/conversa" + + "tions/*/participants/*}ZB\022@/v2/{name=pro" + + "jects/*/locations/*/conversations/*/part" + + "icipants/*}\022\211\002\n\020ListParticipants\0223.googl" + + "e.cloud.dialogflow.v2.ListParticipantsRe" + + "quest\0324.google.cloud.dialogflow.v2.ListP" + + "articipantsResponse\"\211\001\332A\006parent\202\323\344\223\002z\0224/" + + "v2/{parent=projects/*/conversations/*}/p" + + "articipantsZB\022@/v2/{parent=projects/*/lo" + + "cations/*/conversations/*}/participants\022" + + "\302\002\n\021UpdateParticipant\0224.google.cloud.dia" + + "logflow.v2.UpdateParticipantRequest\032\'.go" + + "ogle.cloud.dialogflow.v2.Participant\"\315\001\332" + + "A\027participant,update_mask\202\323\344\223\002\254\0012@/v2/{p" + + "articipant.name=projects/*/conversations" + + "/*/participants/*}:\013participantZ[2L/v2/{" + + "participant.name=projects/*/locations/*/" + + "conversations/*/participants/*}:\013partici" + + "pant\022\340\002\n\016AnalyzeContent\0221.google.cloud.d" + + "ialogflow.v2.AnalyzeContentRequest\0322.goo" + + "gle.cloud.dialogflow.v2.AnalyzeContentRe" + + "sponse\"\346\001\332A\026participant,text_input\332A\027par" + + "ticipant,event_input\202\323\344\223\002\254\001\"J/v2/{partic" + + "ipant=projects/*/conversations/*/partici" + + "pants/*}:analyzeContent:\001*Z[\"V/v2/{parti" + + "cipant=projects/*/locations/*/conversati" + + "ons/*/participants/*}:analyzeContent:\001*\022" + + "\230\001\n\027StreamingAnalyzeContent\022:.google.clo" + + "ud.dialogflow.v2.StreamingAnalyzeContent" + + "Request\032;.google.cloud.dialogflow.v2.Str" + + "eamingAnalyzeContentResponse\"\000(\0010\001\022\311\002\n\017S" + + "uggestArticles\0222.google.cloud.dialogflow" + + ".v2.SuggestArticlesRequest\0323.google.clou" + + "d.dialogflow.v2.SuggestArticlesResponse\"" + + "\314\001\332A\006parent\202\323\344\223\002\274\001\"R/v2/{parent=projects" + + "/*/conversations/*/participants/*}/sugge" + + "stions:suggestArticles:\001*Zc\"^/v2/{parent" + + "=projects/*/locations/*/conversations/*/" + + "participants/*}/suggestions:suggestArtic" + + "les:\001*\022\323\002\n\021SuggestFaqAnswers\0224.google.cl" + + "oud.dialogflow.v2.SuggestFaqAnswersReque" + + "st\0325.google.cloud.dialogflow.v2.SuggestF" + + "aqAnswersResponse\"\320\001\332A\006parent\202\323\344\223\002\300\001\"T/v" + + "2/{parent=projects/*/conversations/*/par" + + "ticipants/*}/suggestions:suggestFaqAnswe" + + "rs:\001*Ze\"`/v2/{parent=projects/*/location" + + "s/*/conversations/*/participants/*}/sugg" + + "estions:suggestFaqAnswers:\001*\022\335\002\n\023Suggest" + + "SmartReplies\0226.google.cloud.dialogflow.v" + + "2.SuggestSmartRepliesRequest\0327.google.cl" + + "oud.dialogflow.v2.SuggestSmartRepliesRes" + + "ponse\"\324\001\332A\006parent\202\323\344\223\002\304\001\"V/v2/{parent=pr" + + "ojects/*/conversations/*/participants/*}" + + "/suggestions:suggestSmartReplies:\001*Zg\"b/" + + "v2/{parent=projects/*/locations/*/conver" + "sations/*/participants/*}/suggestions:su" - + "ggestSmartReplies:\001*Zg\"b/v2/{parent=proj" - + "ects/*/locations/*/conversations/*/parti" - + "cipants/*}/suggestions:suggestSmartRepli" - + "es:\001*\032x\312A\031dialogflow.googleapis.com\322AYht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "form,https://www.googleapis.com/auth/dia" - + "logflowB\231\001\n\036com.google.cloud.dialogflow." - + "v2B\020ParticipantProtoP\001Z>cloud.google.com" - + "/go/dialogflow/apiv2/dialogflowpb;dialog" - + "flowpb\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow" - + ".V2b\006proto3" + + "ggestSmartReplies:\001*\032x\312A\031dialogflow.goog" + + "leapis.com\322AYhttps://www.googleapis.com/" + + "auth/cloud-platform,https://www.googleap" + + "is.com/auth/dialogflowB\231\001\n\036com.google.cl" + + "oud.dialogflow.v2B\020ParticipantProtoP\001Z>c" + + "loud.google.com/go/dialogflow/apiv2/dial" + + "ogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032Google.C" + + "loud.Dialogflow.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -539,6 +561,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Participant", "TextInput", "EventInput", + "SuggestionInput", "ReplyAudioConfig", "QueryParams", "AssistQueryParams", @@ -712,8 +735,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Reply", "Confidence", "AnswerRecord", }); - internal_static_google_cloud_dialogflow_v2_SuggestionResult_descriptor = + internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor = getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_dialogflow_v2_IntentSuggestion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_IntentSuggestion_descriptor, + new java.lang.String[] { + "DisplayName", "IntentV2", "Description", "Intent", + }); + internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_DialogflowAssistAnswer_descriptor, + new java.lang.String[] { + "QueryResult", "IntentSuggestion", "AnswerRecord", "Result", + }); + internal_static_google_cloud_dialogflow_v2_SuggestionResult_descriptor = + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_v2_SuggestionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_SuggestionResult_descriptor, @@ -725,7 +764,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SuggestionResponse", }); internal_static_google_cloud_dialogflow_v2_InputTextConfig_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dialogflow_v2_InputTextConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_InputTextConfig_descriptor, @@ -733,7 +772,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", }); internal_static_google_cloud_dialogflow_v2_AnnotatedMessagePart_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_dialogflow_v2_AnnotatedMessagePart_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_AnnotatedMessagePart_descriptor, @@ -741,15 +780,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", "EntityType", "FormattedValue", }); internal_static_google_cloud_dialogflow_v2_MessageAnnotation_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_dialogflow_v2_MessageAnnotation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_MessageAnnotation_descriptor, new java.lang.String[] { "Parts", "ContainEntities", }); + internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_dialogflow_v2_SuggestionInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor, + new java.lang.String[] { + "AnswerRecord", + }); internal_static_google_cloud_dialogflow_v2_AssistQueryParameters_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_dialogflow_v2_AssistQueryParameters_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_AssistQueryParameters_descriptor, diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParameters.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParameters.java index ade0139b0c77..61aa53d10bab 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParameters.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParameters.java @@ -41,6 +41,7 @@ private QueryParameters() { timeZone_ = ""; contexts_ = java.util.Collections.emptyList(); sessionEntityTypes_ = java.util.Collections.emptyList(); + platform_ = ""; } @java.lang.Override @@ -612,6 +613,65 @@ public java.lang.String getWebhookHeadersOrThrow(java.lang.String key) { return map.get(key); } + public static final int PLATFORM_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object platform_ = ""; + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The platform. + */ + @java.lang.Override + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + 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(); + platform_ = s; + return s; + } + } + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -649,6 +709,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetWebhookHeaders(), WebhookHeadersDefaultEntryHolder.defaultEntry, 14); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(platform_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, platform_); + } getUnknownFields().writeTo(output); } @@ -692,6 +755,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, webhookHeaders__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(platform_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, platform_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -727,6 +793,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false; + if (!getPlatform().equals(other.getPlatform())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -766,6 +833,8 @@ public int hashCode() { hash = (37 * hash) + WEBHOOK_HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetWebhookHeaders().hashCode(); } + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -957,6 +1026,7 @@ public Builder clear() { sentimentAnalysisRequestConfigBuilder_ = null; } internalGetMutableWebhookHeaders().clear(); + platform_ = ""; return this; } @@ -1038,6 +1108,9 @@ private void buildPartial0(com.google.cloud.dialogflow.v2.QueryParameters result result.webhookHeaders_ = internalGetWebhookHeaders(); result.webhookHeaders_.makeImmutable(); } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.platform_ = platform_; + } } @java.lang.Override @@ -1158,6 +1231,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.QueryParameters other) { } internalGetMutableWebhookHeaders().mergeFrom(other.internalGetWebhookHeaders()); bitField0_ |= 0x00000080; + if (!other.getPlatform().isEmpty()) { + platform_ = other.platform_; + bitField0_ |= 0x00000100; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1255,6 +1333,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 114 + case 146: + { + platform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3045,6 +3129,132 @@ public Builder putAllWebhookHeaders(java.util.Map + * The platform of the virtual agent response messages. + * + * If not empty, only emits messages from this platform in the response. + * Valid values are the enum names of + * [platform][google.cloud.dialogflow.v2.Intent.Message.platform]. + * + * + * string platform = 18; + * + * @return The platform. + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + public com.google.protobuf.ByteString getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + platform_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + platform_ = getDefaultInstance().getPlatform(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @param value The bytes for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + platform_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParametersOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParametersOrBuilder.java index cc4804a51216..12711fab908c 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParametersOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryParametersOrBuilder.java @@ -412,4 +412,37 @@ java.lang.String getWebhookHeadersOrDefault( * map<string, string> webhook_headers = 14; */ java.lang.String getWebhookHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The platform. + */ + java.lang.String getPlatform(); + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + com.google.protobuf.ByteString getPlatformBytes(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswer.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswer.java new file mode 100644 index 000000000000..ece81fdc9790 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswer.java @@ -0,0 +1,2780 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Represents a SearchKnowledge answer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeAnswer} + */ +public final class SearchKnowledgeAnswer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SearchKnowledgeAnswer) + SearchKnowledgeAnswerOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeAnswer.newBuilder() to construct. + private SearchKnowledgeAnswer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeAnswer() { + answer_ = ""; + answerType_ = 0; + answerSources_ = java.util.Collections.emptyList(); + answerRecord_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeAnswer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder.class); + } + + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType} + */ + public enum AnswerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The answer has a unspecified type.
+     * 
+ * + * ANSWER_TYPE_UNSPECIFIED = 0; + */ + ANSWER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The answer is from FAQ doucments.
+     * 
+ * + * FAQ = 1; + */ + FAQ(1), + /** + * + * + *
+     * The answer is from generative model.
+     * 
+ * + * GENERATIVE = 2; + */ + GENERATIVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The answer has a unspecified type.
+     * 
+ * + * ANSWER_TYPE_UNSPECIFIED = 0; + */ + public static final int ANSWER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The answer is from FAQ doucments.
+     * 
+ * + * FAQ = 1; + */ + public static final int FAQ_VALUE = 1; + /** + * + * + *
+     * The answer is from generative model.
+     * 
+ * + * GENERATIVE = 2; + */ + public static final int GENERATIVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AnswerType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AnswerType forNumber(int value) { + switch (value) { + case 0: + return ANSWER_TYPE_UNSPECIFIED; + case 1: + return FAQ; + case 2: + return GENERATIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnswerType findValueByNumber(int number) { + return AnswerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AnswerType[] VALUES = values(); + + public static AnswerType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnswerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType) + } + + public interface AnswerSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + java.lang.String getSnippet(); + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + com.google.protobuf.ByteString getSnippetBytes(); + } + /** + * + * + *
+   * The sources of the answers.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource} + */ + public static final class AnswerSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) + AnswerSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerSource.newBuilder() to construct. + private AnswerSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerSource() { + title_ = ""; + uri_ = ""; + snippet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SNIPPET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object snippet_ = ""; + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + @java.lang.Override + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + 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(); + snippet_ = s; + return s; + } + } + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = 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(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snippet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snippet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snippet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snippet_); + } + size += getUnknownFields().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.v2.SearchKnowledgeAnswer.AnswerSource)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource other = + (com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getSnippet().equals(other.getSnippet())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getSnippet().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource 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.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource 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.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource 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.v2.SearchKnowledgeAnswer.AnswerSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + 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.v2.SearchKnowledgeAnswer.AnswerSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource 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.v2.SearchKnowledgeAnswer.AnswerSource 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 sources of the answers.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + uri_ = ""; + snippet_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource build() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource buildPartial() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource result = + new com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.snippet_ = snippet_; + } + } + + @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.v2.SearchKnowledgeAnswer.AnswerSource) { + return mergeFrom( + (com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource other) { + if (other + == com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSnippet().isEmpty()) { + snippet_ = other.snippet_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + snippet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object snippet_ = ""; + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @param value The snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snippet_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return This builder for chaining. + */ + public Builder clearSnippet() { + snippet_ = getDefaultInstance().getSnippet(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @param value The bytes for snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snippet_ = value; + bitField0_ |= 0x00000004; + 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.v2.SearchKnowledgeAnswer.AnswerSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource) + private static final com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource(); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.SearchKnowledgeAnswer.AnswerSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANSWER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object answer_ = ""; + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The answer. + */ + @java.lang.Override + public java.lang.String getAnswer() { + java.lang.Object ref = answer_; + 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(); + answer_ = s; + return s; + } + } + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerBytes() { + java.lang.Object ref = answer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANSWER_TYPE_FIELD_NUMBER = 2; + private int answerType_ = 0; + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The enum numeric value on the wire for answerType. + */ + @java.lang.Override + public int getAnswerTypeValue() { + return answerType_; + } + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The answerType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType getAnswerType() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType result = + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.forNumber(answerType_); + return result == null + ? com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.UNRECOGNIZED + : result; + } + + public static final int ANSWER_SOURCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + answerSources_; + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public java.util.List + getAnswerSourcesList() { + return answerSources_; + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList() { + return answerSources_; + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public int getAnswerSourcesCount() { + return answerSources_.size(); + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource getAnswerSources( + int index) { + return answerSources_.get(index); + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index) { + return answerSources_.get(index); + } + + public static final int ANSWER_RECORD_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerRecord_ = ""; + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @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(answer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, answer_); + } + if (answerType_ + != com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.ANSWER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, answerType_); + } + for (int i = 0; i < answerSources_.size(); i++) { + output.writeMessage(3, answerSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, answerRecord_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, answer_); + } + if (answerType_ + != com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.ANSWER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, answerType_); + } + for (int i = 0; i < answerSources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, answerSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, answerRecord_); + } + size += getUnknownFields().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.v2.SearchKnowledgeAnswer)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer other = + (com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer) obj; + + if (!getAnswer().equals(other.getAnswer())) return false; + if (answerType_ != other.answerType_) return false; + if (!getAnswerSourcesList().equals(other.getAnswerSourcesList())) return false; + if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getAnswer().hashCode(); + hash = (37 * hash) + ANSWER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + answerType_; + if (getAnswerSourcesCount() > 0) { + hash = (37 * hash) + ANSWER_SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getAnswerSourcesList().hashCode(); + } + hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer 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.v2.SearchKnowledgeAnswer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer 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.v2.SearchKnowledgeAnswer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer 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.v2.SearchKnowledgeAnswer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer 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.v2.SearchKnowledgeAnswer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer 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.v2.SearchKnowledgeAnswer 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; + } + /** + * + * + *
+   * Represents a SearchKnowledge answer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeAnswer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SearchKnowledgeAnswer) + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answer_ = ""; + answerType_ = 0; + if (answerSourcesBuilder_ == null) { + answerSources_ = java.util.Collections.emptyList(); + } else { + answerSources_ = null; + answerSourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + answerRecord_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer build() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer buildPartial() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer result = + new com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer result) { + if (answerSourcesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + answerSources_ = java.util.Collections.unmodifiableList(answerSources_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.answerSources_ = answerSources_; + } else { + result.answerSources_ = answerSourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answer_ = answer_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.answerType_ = answerType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.answerRecord_ = answerRecord_; + } + } + + @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.v2.SearchKnowledgeAnswer) { + return mergeFrom((com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer other) { + if (other == com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.getDefaultInstance()) + return this; + if (!other.getAnswer().isEmpty()) { + answer_ = other.answer_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.answerType_ != 0) { + setAnswerTypeValue(other.getAnswerTypeValue()); + } + if (answerSourcesBuilder_ == null) { + if (!other.answerSources_.isEmpty()) { + if (answerSources_.isEmpty()) { + answerSources_ = other.answerSources_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAnswerSourcesIsMutable(); + answerSources_.addAll(other.answerSources_); + } + onChanged(); + } + } else { + if (!other.answerSources_.isEmpty()) { + if (answerSourcesBuilder_.isEmpty()) { + answerSourcesBuilder_.dispose(); + answerSourcesBuilder_ = null; + answerSources_ = other.answerSources_; + bitField0_ = (bitField0_ & ~0x00000004); + answerSourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnswerSourcesFieldBuilder() + : null; + } else { + answerSourcesBuilder_.addAllMessages(other.answerSources_); + } + } + } + if (!other.getAnswerRecord().isEmpty()) { + answerRecord_ = other.answerRecord_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + answer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + answerType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource m = + input.readMessage( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.parser(), + extensionRegistry); + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(m); + } else { + answerSourcesBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + answerRecord_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object answer_ = ""; + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return The answer. + */ + public java.lang.String getAnswer() { + java.lang.Object ref = answer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + public com.google.protobuf.ByteString getAnswerBytes() { + java.lang.Object ref = answer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @param value The answer to set. + * @return This builder for chaining. + */ + public Builder setAnswer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + answer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return This builder for chaining. + */ + public Builder clearAnswer() { + answer_ = getDefaultInstance().getAnswer(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @param value The bytes for answer to set. + * @return This builder for chaining. + */ + public Builder setAnswerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + answer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int answerType_ = 0; + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The enum numeric value on the wire for answerType. + */ + @java.lang.Override + public int getAnswerTypeValue() { + return answerType_; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @param value The enum numeric value on the wire for answerType to set. + * @return This builder for chaining. + */ + public Builder setAnswerTypeValue(int value) { + answerType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The answerType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType getAnswerType() { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType result = + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.forNumber(answerType_); + return result == null + ? com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @param value The answerType to set. + * @return This builder for chaining. + */ + public Builder setAnswerType( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + answerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnswerType() { + bitField0_ = (bitField0_ & ~0x00000002); + answerType_ = 0; + onChanged(); + return this; + } + + private java.util.List + answerSources_ = java.util.Collections.emptyList(); + + private void ensureAnswerSourcesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + answerSources_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource>(answerSources_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + answerSourcesBuilder_; + + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List + getAnswerSourcesList() { + if (answerSourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(answerSources_); + } else { + return answerSourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public int getAnswerSourcesCount() { + if (answerSourcesBuilder_ == null) { + return answerSources_.size(); + } else { + return answerSourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource getAnswerSources( + int index) { + if (answerSourcesBuilder_ == null) { + return answerSources_.get(index); + } else { + return answerSourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder setAnswerSources( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.set(index, value); + onChanged(); + } else { + answerSourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder setAnswerSources( + int index, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.set(index, builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.add(value); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.add(index, value); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + int index, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(index, builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAllAnswerSources( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource> + values) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, answerSources_); + onChanged(); + } else { + answerSourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder clearAnswerSources() { + if (answerSourcesBuilder_ == null) { + answerSources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + answerSourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder removeAnswerSources(int index) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.remove(index); + onChanged(); + } else { + answerSourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder + getAnswerSourcesBuilder(int index) { + return getAnswerSourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index) { + if (answerSourcesBuilder_ == null) { + return answerSources_.get(index); + } else { + return answerSourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList() { + if (answerSourcesBuilder_ != null) { + return answerSourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(answerSources_); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder + addAnswerSourcesBuilder() { + return getAnswerSourcesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder + addAnswerSourcesBuilder(int index) { + return getAnswerSourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List + getAnswerSourcesBuilderList() { + return getAnswerSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesFieldBuilder() { + if (answerSourcesBuilder_ == null) { + answerSourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder>( + answerSources_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + answerSources_ = null; + } + return answerSourcesBuilder_; + } + + private java.lang.Object answerRecord_ = ""; + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @return This builder for chaining. + */ + public Builder clearAnswerRecord() { + answerRecord_ = getDefaultInstance().getAnswerRecord(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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; + bitField0_ |= 0x00000008; + 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.v2.SearchKnowledgeAnswer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchKnowledgeAnswer) + private static final com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer(); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.SearchKnowledgeAnswer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswerOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswerOrBuilder.java new file mode 100644 index 000000000000..789446be366f --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeAnswerOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +public interface SearchKnowledgeAnswerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SearchKnowledgeAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The answer. + */ + java.lang.String getAnswer(); + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + com.google.protobuf.ByteString getAnswerBytes(); + + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The enum numeric value on the wire for answerType. + */ + int getAnswerTypeValue(); + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The answerType. + */ + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType getAnswerType(); + + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + java.util.List + getAnswerSourcesList(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource getAnswerSources(int index); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + int getAnswerSourcesCount(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index); + + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @return The answerRecord. + */ + java.lang.String getAnswerRecord(); + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @return The bytes for answerRecord. + */ + com.google.protobuf.ByteString getAnswerRecordBytes(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequest.java new file mode 100644 index 000000000000..9f22a39ee77b --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequest.java @@ -0,0 +1,1758 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * The request message for
+ * [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeRequest} + */ +public final class SearchKnowledgeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SearchKnowledgeRequest) + SearchKnowledgeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeRequest.newBuilder() to construct. + private SearchKnowledgeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeRequest() { + parent_ = ""; + conversationProfile_ = ""; + sessionId_ = ""; + conversation_ = ""; + latestMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.v2.TextInput query_; + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return query_ != null; + } + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.TextInput getQuery() { + return query_ == null ? com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance() : query_; + } + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.TextInputOrBuilder getQueryOrBuilder() { + return query_ == null ? com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance() : query_; + } + + public static final int CONVERSATION_PROFILE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversationProfile_ = ""; + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + @java.lang.Override + public java.lang.String getConversationProfile() { + java.lang.Object ref = conversationProfile_; + 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(); + conversationProfile_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationProfileBytes() { + java.lang.Object ref = conversationProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + 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(); + sessionId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversation_ = ""; + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object latestMessage_ = ""; + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.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 when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.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; + } + } + + 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 (query_ != null) { + output.writeMessage(1, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, conversationProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sessionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, latestMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (query_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, conversationProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sessionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, latestMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, parent_); + } + size += getUnknownFields().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.v2.SearchKnowledgeRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest other = + (com.google.cloud.dialogflow.v2.SearchKnowledgeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getConversationProfile().equals(other.getConversationProfile())) return false; + if (!getSessionId().equals(other.getSessionId())) return false; + if (!getConversation().equals(other.getConversation())) return false; + if (!getLatestMessage().equals(other.getLatestMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + CONVERSATION_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getConversationProfile().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest 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.v2.SearchKnowledgeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest 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.v2.SearchKnowledgeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest 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.v2.SearchKnowledgeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest 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.v2.SearchKnowledgeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest 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.v2.SearchKnowledgeRequest 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.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SearchKnowledgeRequest) + com.google.cloud.dialogflow.v2.SearchKnowledgeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + conversationProfile_ = ""; + sessionId_ = ""; + conversation_ = ""; + latestMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeRequest build() { + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeRequest buildPartial() { + com.google.cloud.dialogflow.v2.SearchKnowledgeRequest result = + new com.google.cloud.dialogflow.v2.SearchKnowledgeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.SearchKnowledgeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.conversationProfile_ = conversationProfile_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sessionId_ = sessionId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.conversation_ = conversation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.latestMessage_ = latestMessage_; + } + } + + @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.v2.SearchKnowledgeRequest) { + return mergeFrom((com.google.cloud.dialogflow.v2.SearchKnowledgeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.SearchKnowledgeRequest other) { + if (other == com.google.cloud.dialogflow.v2.SearchKnowledgeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getConversationProfile().isEmpty()) { + conversationProfile_ = other.conversationProfile_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getConversation().isEmpty()) { + conversation_ = other.conversation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getLatestMessage().isEmpty()) { + latestMessage_ = other.latestMessage_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + conversationProfile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + conversation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + latestMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.v2.TextInput query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.TextInput, + com.google.cloud.dialogflow.v2.TextInput.Builder, + com.google.cloud.dialogflow.v2.TextInputOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + public com.google.cloud.dialogflow.v2.TextInput getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.dialogflow.v2.TextInput value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.dialogflow.v2.TextInput.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQuery(com.google.cloud.dialogflow.v2.TextInput value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && query_ != null + && query_ != com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.v2.TextInput.Builder getQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.v2.TextInputOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance() + : query_; + } + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.TextInput, + com.google.cloud.dialogflow.v2.TextInput.Builder, + com.google.cloud.dialogflow.v2.TextInputOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.TextInput, + com.google.cloud.dialogflow.v2.TextInput.Builder, + com.google.cloud.dialogflow.v2.TextInputOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object conversationProfile_ = ""; + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + public java.lang.String getConversationProfile() { + java.lang.Object ref = conversationProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversationProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + public com.google.protobuf.ByteString getConversationProfileBytes() { + java.lang.Object ref = conversationProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The conversationProfile to set. + * @return This builder for chaining. + */ + public Builder setConversationProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversationProfile_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearConversationProfile() { + conversationProfile_ = getDefaultInstance().getConversationProfile(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for conversationProfile to set. + * @return This builder for chaining. + */ + public Builder setConversationProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversationProfile_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object conversation_ = ""; + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearConversation() { + conversation_ = getDefaultInstance().getConversation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object latestMessage_ = ""; + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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 when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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 when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearLatestMessage() { + latestMessage_ = getDefaultInstance().getLatestMessage(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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; + bitField0_ |= 0x00000020; + 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.v2.SearchKnowledgeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchKnowledgeRequest) + private static final com.google.cloud.dialogflow.v2.SearchKnowledgeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SearchKnowledgeRequest(); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.SearchKnowledgeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequestOrBuilder.java new file mode 100644 index 000000000000..602c0206cd94 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeRequestOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +public interface SearchKnowledgeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SearchKnowledgeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + com.google.cloud.dialogflow.v2.TextInput getQuery(); + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.v2.TextInputOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + java.lang.String getConversationProfile(); + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + com.google.protobuf.ByteString getConversationProfileBytes(); + + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return The conversation. + */ + java.lang.String getConversation(); + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for conversation. + */ + com.google.protobuf.ByteString getConversationBytes(); + + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + java.lang.String getLatestMessage(); + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + com.google.protobuf.ByteString getLatestMessageBytes(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponse.java new file mode 100644 index 000000000000..98a5d1f34b19 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponse.java @@ -0,0 +1,971 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * The response message for
+ * [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeResponse} + */ +public final class SearchKnowledgeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SearchKnowledgeResponse) + SearchKnowledgeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeResponse.newBuilder() to construct. + private SearchKnowledgeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeResponse() { + answers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.Builder.class); + } + + public static final int ANSWERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List answers_; + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public java.util.List getAnswersList() { + return answers_; + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public java.util.List + getAnswersOrBuilderList() { + return answers_; + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public int getAnswersCount() { + return answers_.size(); + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer getAnswers(int index) { + return answers_.get(index); + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder( + int index) { + return answers_.get(index); + } + + 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 { + for (int i = 0; i < answers_.size(); i++) { + output.writeMessage(2, answers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < answers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, answers_.get(i)); + } + size += getUnknownFields().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.v2.SearchKnowledgeResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse other = + (com.google.cloud.dialogflow.v2.SearchKnowledgeResponse) obj; + + if (!getAnswersList().equals(other.getAnswersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnswersCount() > 0) { + hash = (37 * hash) + ANSWERS_FIELD_NUMBER; + hash = (53 * hash) + getAnswersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse 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.v2.SearchKnowledgeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse 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.v2.SearchKnowledgeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse 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.v2.SearchKnowledgeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse 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.v2.SearchKnowledgeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse 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.v2.SearchKnowledgeResponse 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.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SearchKnowledgeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SearchKnowledgeResponse) + com.google.cloud.dialogflow.v2.SearchKnowledgeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.class, + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (answersBuilder_ == null) { + answers_ = java.util.Collections.emptyList(); + } else { + answers_ = null; + answersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ConversationProto + .internal_static_google_cloud_dialogflow_v2_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeResponse build() { + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SearchKnowledgeResponse buildPartial() { + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse result = + new com.google.cloud.dialogflow.v2.SearchKnowledgeResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.v2.SearchKnowledgeResponse result) { + if (answersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + answers_ = java.util.Collections.unmodifiableList(answers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.answers_ = answers_; + } else { + result.answers_ = answersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.SearchKnowledgeResponse result) { + int from_bitField0_ = bitField0_; + } + + @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.v2.SearchKnowledgeResponse) { + return mergeFrom((com.google.cloud.dialogflow.v2.SearchKnowledgeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.SearchKnowledgeResponse other) { + if (other == com.google.cloud.dialogflow.v2.SearchKnowledgeResponse.getDefaultInstance()) + return this; + if (answersBuilder_ == null) { + if (!other.answers_.isEmpty()) { + if (answers_.isEmpty()) { + answers_ = other.answers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnswersIsMutable(); + answers_.addAll(other.answers_); + } + onChanged(); + } + } else { + if (!other.answers_.isEmpty()) { + if (answersBuilder_.isEmpty()) { + answersBuilder_.dispose(); + answersBuilder_ = null; + answers_ = other.answers_; + bitField0_ = (bitField0_ & ~0x00000001); + answersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnswersFieldBuilder() + : null; + } else { + answersBuilder_.addAllMessages(other.answers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer m = + input.readMessage( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.parser(), + extensionRegistry); + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(m); + } else { + answersBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List answers_ = + java.util.Collections.emptyList(); + + private void ensureAnswersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + answers_ = + new java.util.ArrayList(answers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder> + answersBuilder_; + + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List getAnswersList() { + if (answersBuilder_ == null) { + return java.util.Collections.unmodifiableList(answers_); + } else { + return answersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public int getAnswersCount() { + if (answersBuilder_ == null) { + return answers_.size(); + } else { + return answersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer getAnswers(int index) { + if (answersBuilder_ == null) { + return answers_.get(index); + } else { + return answersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder setAnswers( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.set(index, value); + onChanged(); + } else { + answersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder setAnswers( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.set(index, builderForValue.build()); + onChanged(); + } else { + answersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers(com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.add(value); + onChanged(); + } else { + answersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.add(index, value); + onChanged(); + } else { + answersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(builderForValue.build()); + onChanged(); + } else { + answersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + int index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(index, builderForValue.build()); + onChanged(); + } else { + answersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAllAnswers( + java.lang.Iterable values) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, answers_); + onChanged(); + } else { + answersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder clearAnswers() { + if (answersBuilder_ == null) { + answers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + answersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public Builder removeAnswers(int index) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.remove(index); + onChanged(); + } else { + answersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder getAnswersBuilder( + int index) { + return getAnswersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder( + int index) { + if (answersBuilder_ == null) { + return answers_.get(index); + } else { + return answersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List + getAnswersOrBuilderList() { + if (answersBuilder_ != null) { + return answersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(answers_); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder addAnswersBuilder() { + return getAnswersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.getDefaultInstance()); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder addAnswersBuilder( + int index) { + return getAnswersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.getDefaultInstance()); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List + getAnswersBuilderList() { + return getAnswersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder> + getAnswersFieldBuilder() { + if (answersBuilder_ == null) { + answersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder>( + answers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + answers_ = null; + } + return answersBuilder_; + } + + @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.v2.SearchKnowledgeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchKnowledgeResponse) + private static final com.google.cloud.dialogflow.v2.SearchKnowledgeResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SearchKnowledgeResponse(); + } + + public static com.google.cloud.dialogflow.v2.SearchKnowledgeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.SearchKnowledgeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponseOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponseOrBuilder.java new file mode 100644 index 000000000000..5e1b120b6180 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchKnowledgeResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2023 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/v2/conversation.proto + +package com.google.cloud.dialogflow.v2; + +public interface SearchKnowledgeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SearchKnowledgeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + java.util.List getAnswersList(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswer getAnswers(int index); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + int getAnswersCount(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + java.util.List + getAnswersOrBuilderList(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.SearchKnowledgeAnswer answers = 2; + */ + com.google.cloud.dialogflow.v2.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder(int index); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java index cad5249fa21e..50c0defbe776 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java @@ -124,7 +124,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ult\022*\n\016webhook_status\030\003 \001(\0132\022.google.rpc" + ".Status\022\024\n\014output_audio\030\004 \001(\014\022J\n\023output_" + "audio_config\030\006 \001(\0132-.google.cloud.dialog" - + "flow.v2.OutputAudioConfig\"\215\004\n\017QueryParam" + + "flow.v2.OutputAudioConfig\"\237\004\n\017QueryParam" + "eters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location" + "\030\002 \001(\0132\023.google.type.LatLng\0225\n\010contexts\030" + "\003 \003(\0132#.google.cloud.dialogflow.v2.Conte" @@ -136,126 +136,128 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oud.dialogflow.v2.SentimentAnalysisReque" + "stConfig\022X\n\017webhook_headers\030\016 \003(\0132?.goog" + "le.cloud.dialogflow.v2.QueryParameters.W" - + "ebhookHeadersEntry\0325\n\023WebhookHeadersEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\313\001\n\nQu" - + "eryInput\022D\n\014audio_config\030\001 \001(\0132,.google." - + "cloud.dialogflow.v2.InputAudioConfigH\000\0225" - + "\n\004text\030\002 \001(\0132%.google.cloud.dialogflow.v" - + "2.TextInputH\000\0227\n\005event\030\003 \001(\0132&.google.cl" - + "oud.dialogflow.v2.EventInputH\000B\007\n\005input\"" - + "\256\005\n\013QueryResult\022\022\n\nquery_text\030\001 \001(\t\022\025\n\rl" - + "anguage_code\030\017 \001(\t\022%\n\035speech_recognition" - + "_confidence\030\002 \001(\002\022\016\n\006action\030\003 \001(\t\022+\n\npar" - + "ameters\030\004 \001(\0132\027.google.protobuf.Struct\022#" - + "\n\033all_required_params_present\030\005 \001(\010\022\034\n\024c" - + "ancels_slot_filling\030\025 \001(\010\022\030\n\020fulfillment" - + "_text\030\006 \001(\t\022H\n\024fulfillment_messages\030\007 \003(" - + "\0132*.google.cloud.dialogflow.v2.Intent.Me" - + "ssage\022\026\n\016webhook_source\030\010 \001(\t\0220\n\017webhook" - + "_payload\030\t \001(\0132\027.google.protobuf.Struct\022" - + "<\n\017output_contexts\030\n \003(\0132#.google.cloud." - + "dialogflow.v2.Context\0222\n\006intent\030\013 \001(\0132\"." - + "google.cloud.dialogflow.v2.Intent\022#\n\033int" - + "ent_detection_confidence\030\014 \001(\002\0220\n\017diagno" - + "stic_info\030\016 \001(\0132\027.google.protobuf.Struct" - + "\022V\n\031sentiment_analysis_result\030\021 \001(\01323.go" - + "ogle.cloud.dialogflow.v2.SentimentAnalys" - + "isResult\"\275\003\n\034StreamingDetectIntentReques" - + "t\022;\n\007session\030\001 \001(\tB*\342A\001\002\372A#\n!dialogflow." - + "googleapis.com/Session\022A\n\014query_params\030\002" - + " \001(\0132+.google.cloud.dialogflow.v2.QueryP" - + "arameters\022A\n\013query_input\030\003 \001(\0132&.google." - + "cloud.dialogflow.v2.QueryInputB\004\342A\001\002\022\034\n\020" - + "single_utterance\030\004 \001(\010B\002\030\001\022J\n\023output_aud" - + "io_config\030\005 \001(\0132-.google.cloud.dialogflo" - + "w.v2.OutputAudioConfig\022<\n\030output_audio_c" - + "onfig_mask\030\007 \001(\0132\032.google.protobuf.Field" - + "Mask\022\023\n\013input_audio\030\006 \001(\014\022\035\n\025enable_debu" - + "gging_info\030\010 \001(\010\"\370\006\n\036CloudConversationDe" - + "buggingInfo\022\031\n\021audio_data_chunks\030\001 \001(\005\0229" - + "\n\026result_end_time_offset\030\002 \001(\0132\031.google." - + "protobuf.Duration\0227\n\024first_audio_duratio" - + "n\030\003 \001(\0132\031.google.protobuf.Duration\022\030\n\020si" - + "ngle_utterance\030\005 \001(\010\022C\n speech_partial_r" - + "esults_end_times\030\006 \003(\0132\031.google.protobuf" - + ".Duration\022A\n\036speech_final_results_end_ti" - + "mes\030\007 \003(\0132\031.google.protobuf.Duration\022\031\n\021" - + "partial_responses\030\010 \001(\005\022,\n$speaker_id_pa" - + "ssive_latency_ms_offset\030\t \001(\005\022\037\n\027bargein" - + "_event_triggered\030\n \001(\010\022\037\n\027speech_single_" - + "utterance\030\013 \001(\010\022=\n\032dtmf_partial_results_" - + "times\030\014 \003(\0132\031.google.protobuf.Duration\022;" - + "\n\030dtmf_final_results_times\030\r \003(\0132\031.googl" - + "e.protobuf.Duration\022C\n single_utterance_" - + "end_time_offset\030\016 \001(\0132\031.google.protobuf." - + "Duration\0224\n\021no_speech_timeout\030\017 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\025\n\ris_input_text\030" - + "\020 \001(\010\022@\n\035client_half_close_time_offset\030\021" - + " \001(\0132\031.google.protobuf.Duration\022J\n\'clien" - + "t_half_close_streaming_time_offset\030\022 \001(\013" - + "2\031.google.protobuf.Duration\"\251\003\n\035Streamin" - + "gDetectIntentResponse\022\023\n\013response_id\030\001 \001" - + "(\t\022R\n\022recognition_result\030\002 \001(\01326.google." - + "cloud.dialogflow.v2.StreamingRecognition" - + "Result\022=\n\014query_result\030\003 \001(\0132\'.google.cl" - + "oud.dialogflow.v2.QueryResult\022*\n\016webhook" - + "_status\030\004 \001(\0132\022.google.rpc.Status\022\024\n\014out" - + "put_audio\030\005 \001(\014\022J\n\023output_audio_config\030\006" - + " \001(\0132-.google.cloud.dialogflow.v2.Output" - + "AudioConfig\022R\n\016debugging_info\030\010 \001(\0132:.go" - + "ogle.cloud.dialogflow.v2.CloudConversati" - + "onDebuggingInfo\"\235\003\n\032StreamingRecognition" - + "Result\022X\n\014message_type\030\001 \001(\0162B.google.cl" - + "oud.dialogflow.v2.StreamingRecognitionRe" - + "sult.MessageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010" - + "is_final\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022D\n\020sp" - + "eech_word_info\030\007 \003(\0132*.google.cloud.dial" - + "ogflow.v2.SpeechWordInfo\0224\n\021speech_end_o" - + "ffset\030\010 \001(\0132\031.google.protobuf.Duration\022\025" - + "\n\rlanguage_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030" - + "MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT" - + "\020\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"<\n\tTextI" - + "nput\022\022\n\004text\030\001 \001(\tB\004\342A\001\002\022\033\n\rlanguage_cod" - + "e\030\002 \001(\tB\004\342A\001\002\"j\n\nEventInput\022\022\n\004name\030\001 \001(" - + "\tB\004\342A\001\002\022+\n\nparameters\030\002 \001(\0132\027.google.pro" - + "tobuf.Struct\022\033\n\rlanguage_code\030\003 \001(\tB\004\342A\001" - + "\002\"F\n\036SentimentAnalysisRequestConfig\022$\n\034a" - + "nalyze_query_text_sentiment\030\001 \001(\010\"^\n\027Sen" - + "timentAnalysisResult\022C\n\024query_text_senti" - + "ment\030\001 \001(\0132%.google.cloud.dialogflow.v2." - + "Sentiment\"-\n\tSentiment\022\r\n\005score\030\001 \001(\002\022\021\n" - + "\tmagnitude\030\002 \001(\0022\345\005\n\010Sessions\022\311\003\n\014Detect" - + "Intent\022/.google.cloud.dialogflow.v2.Dete" - + "ctIntentRequest\0320.google.cloud.dialogflo" - + "w.v2.DetectIntentResponse\"\325\002\332A\023session,q" - + "uery_input\202\323\344\223\002\270\002\"6/v2/{session=projects" - + "/*/agent/sessions/*}:detectIntent:\001*ZR\"M" - + "/v2/{session=projects/*/agent/environmen" - + "ts/*/users/*/sessions/*}:detectIntent:\001*" - + "ZG\"B/v2/{session=projects/*/locations/*/" - + "agent/sessions/*}:detectIntent:\001*Z^\"Y/v2" - + "/{session=projects/*/locations/*/agent/e" - + "nvironments/*/users/*/sessions/*}:detect" - + "Intent:\001*\022\222\001\n\025StreamingDetectIntent\0228.go" - + "ogle.cloud.dialogflow.v2.StreamingDetect" - + "IntentRequest\0329.google.cloud.dialogflow." - + "v2.StreamingDetectIntentResponse\"\000(\0010\001\032x" - + "\312A\031dialogflow.googleapis.com\322AYhttps://w" - + "ww.googleapis.com/auth/cloud-platform,ht" - + "tps://www.googleapis.com/auth/dialogflow" - + "B\352\003\n\036com.google.cloud.dialogflow.v2B\014Ses" - + "sionProtoP\001Z>cloud.google.com/go/dialogf" - + "low/apiv2/dialogflowpb;dialogflowpb\370\001\001\242\002" - + "\002DF\252\002\032Google.Cloud.Dialogflow.V2\352A\321\002\n!di" - + "alogflow.googleapis.com/Session\022+project" - + "s/{project}/agent/sessions/{session}\022Spr" - + "ojects/{project}/agent/environments/{env" - + "ironment}/users/{user}/sessions/{session" - + "}\022@projects/{project}/locations/{locatio" - + "n}/agent/sessions/{session}\022hprojects/{p" - + "roject}/locations/{location}/agent/envir" - + "onments/{environment}/users/{user}/sessi" - + "ons/{session}b\006proto3" + + "ebhookHeadersEntry\022\020\n\010platform\030\022 \001(\t\0325\n\023" + + "WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\313\001\n\nQueryInput\022D\n\014audio_conf" + + "ig\030\001 \001(\0132,.google.cloud.dialogflow.v2.In" + + "putAudioConfigH\000\0225\n\004text\030\002 \001(\0132%.google." + + "cloud.dialogflow.v2.TextInputH\000\0227\n\005event" + + "\030\003 \001(\0132&.google.cloud.dialogflow.v2.Even" + + "tInputH\000B\007\n\005input\"\256\005\n\013QueryResult\022\022\n\nque" + + "ry_text\030\001 \001(\t\022\025\n\rlanguage_code\030\017 \001(\t\022%\n\035" + + "speech_recognition_confidence\030\002 \001(\002\022\016\n\006a" + + "ction\030\003 \001(\t\022+\n\nparameters\030\004 \001(\0132\027.google" + + ".protobuf.Struct\022#\n\033all_required_params_" + + "present\030\005 \001(\010\022\034\n\024cancels_slot_filling\030\025 " + + "\001(\010\022\030\n\020fulfillment_text\030\006 \001(\t\022H\n\024fulfill" + + "ment_messages\030\007 \003(\0132*.google.cloud.dialo" + + "gflow.v2.Intent.Message\022\026\n\016webhook_sourc" + + "e\030\010 \001(\t\0220\n\017webhook_payload\030\t \001(\0132\027.googl" + + "e.protobuf.Struct\022<\n\017output_contexts\030\n \003" + + "(\0132#.google.cloud.dialogflow.v2.Context\022" + + "2\n\006intent\030\013 \001(\0132\".google.cloud.dialogflo" + + "w.v2.Intent\022#\n\033intent_detection_confiden" + + "ce\030\014 \001(\002\0220\n\017diagnostic_info\030\016 \001(\0132\027.goog" + + "le.protobuf.Struct\022V\n\031sentiment_analysis" + + "_result\030\021 \001(\01323.google.cloud.dialogflow." + + "v2.SentimentAnalysisResult\"\275\003\n\034Streaming" + + "DetectIntentRequest\022;\n\007session\030\001 \001(\tB*\342A" + + "\001\002\372A#\n!dialogflow.googleapis.com/Session" + + "\022A\n\014query_params\030\002 \001(\0132+.google.cloud.di" + + "alogflow.v2.QueryParameters\022A\n\013query_inp" + + "ut\030\003 \001(\0132&.google.cloud.dialogflow.v2.Qu" + + "eryInputB\004\342A\001\002\022\034\n\020single_utterance\030\004 \001(\010" + + "B\002\030\001\022J\n\023output_audio_config\030\005 \001(\0132-.goog" + + "le.cloud.dialogflow.v2.OutputAudioConfig" + + "\022<\n\030output_audio_config_mask\030\007 \001(\0132\032.goo" + + "gle.protobuf.FieldMask\022\023\n\013input_audio\030\006 " + + "\001(\014\022\035\n\025enable_debugging_info\030\010 \001(\010\"\260\007\n\036C" + + "loudConversationDebuggingInfo\022\031\n\021audio_d" + + "ata_chunks\030\001 \001(\005\0229\n\026result_end_time_offs" + + "et\030\002 \001(\0132\031.google.protobuf.Duration\0227\n\024f" + + "irst_audio_duration\030\003 \001(\0132\031.google.proto" + + "buf.Duration\022\030\n\020single_utterance\030\005 \001(\010\022C" + + "\n speech_partial_results_end_times\030\006 \003(\013" + + "2\031.google.protobuf.Duration\022A\n\036speech_fi" + + "nal_results_end_times\030\007 \003(\0132\031.google.pro" + + "tobuf.Duration\022\031\n\021partial_responses\030\010 \001(" + + "\005\022,\n$speaker_id_passive_latency_ms_offse" + + "t\030\t \001(\005\022\037\n\027bargein_event_triggered\030\n \001(\010" + + "\022\037\n\027speech_single_utterance\030\013 \001(\010\022=\n\032dtm" + + "f_partial_results_times\030\014 \003(\0132\031.google.p" + + "rotobuf.Duration\022;\n\030dtmf_final_results_t" + + "imes\030\r \003(\0132\031.google.protobuf.Duration\022C\n" + + " single_utterance_end_time_offset\030\016 \001(\0132" + + "\031.google.protobuf.Duration\0224\n\021no_speech_" + + "timeout\030\017 \001(\0132\031.google.protobuf.Duration" + + "\0226\n\023endpointing_timeout\030\023 \001(\0132\031.google.p" + + "rotobuf.Duration\022\025\n\ris_input_text\030\020 \001(\010\022" + + "@\n\035client_half_close_time_offset\030\021 \001(\0132\031" + + ".google.protobuf.Duration\022J\n\'client_half" + + "_close_streaming_time_offset\030\022 \001(\0132\031.goo" + + "gle.protobuf.Duration\"\251\003\n\035StreamingDetec" + + "tIntentResponse\022\023\n\013response_id\030\001 \001(\t\022R\n\022" + + "recognition_result\030\002 \001(\01326.google.cloud." + + "dialogflow.v2.StreamingRecognitionResult" + + "\022=\n\014query_result\030\003 \001(\0132\'.google.cloud.di" + + "alogflow.v2.QueryResult\022*\n\016webhook_statu" + + "s\030\004 \001(\0132\022.google.rpc.Status\022\024\n\014output_au" + + "dio\030\005 \001(\014\022J\n\023output_audio_config\030\006 \001(\0132-" + + ".google.cloud.dialogflow.v2.OutputAudioC" + + "onfig\022R\n\016debugging_info\030\010 \001(\0132:.google.c" + + "loud.dialogflow.v2.CloudConversationDebu" + + "ggingInfo\"\235\003\n\032StreamingRecognitionResult" + + "\022X\n\014message_type\030\001 \001(\0162B.google.cloud.di" + + "alogflow.v2.StreamingRecognitionResult.M" + + "essageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_fin" + + "al\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022D\n\020speech_w" + + "ord_info\030\007 \003(\0132*.google.cloud.dialogflow" + + ".v2.SpeechWordInfo\0224\n\021speech_end_offset\030" + + "\010 \001(\0132\031.google.protobuf.Duration\022\025\n\rlang" + + "uage_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAG" + + "E_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027" + + "END_OF_SINGLE_UTTERANCE\020\002\"<\n\tTextInput\022\022" + + "\n\004text\030\001 \001(\tB\004\342A\001\002\022\033\n\rlanguage_code\030\002 \001(" + + "\tB\004\342A\001\002\"j\n\nEventInput\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\002\022+\n\nparameters\030\002 \001(\0132\027.google.protobuf." + + "Struct\022\033\n\rlanguage_code\030\003 \001(\tB\004\342A\001\002\"F\n\036S" + + "entimentAnalysisRequestConfig\022$\n\034analyze" + + "_query_text_sentiment\030\001 \001(\010\"^\n\027Sentiment" + + "AnalysisResult\022C\n\024query_text_sentiment\030\001" + + " \001(\0132%.google.cloud.dialogflow.v2.Sentim" + + "ent\"-\n\tSentiment\022\r\n\005score\030\001 \001(\002\022\021\n\tmagni" + + "tude\030\002 \001(\0022\345\005\n\010Sessions\022\311\003\n\014DetectIntent" + + "\022/.google.cloud.dialogflow.v2.DetectInte" + + "ntRequest\0320.google.cloud.dialogflow.v2.D" + + "etectIntentResponse\"\325\002\332A\023session,query_i" + + "nput\202\323\344\223\002\270\002\"6/v2/{session=projects/*/age" + + "nt/sessions/*}:detectIntent:\001*ZR\"M/v2/{s" + + "ession=projects/*/agent/environments/*/u" + + "sers/*/sessions/*}:detectIntent:\001*ZG\"B/v" + + "2/{session=projects/*/locations/*/agent/" + + "sessions/*}:detectIntent:\001*Z^\"Y/v2/{sess" + + "ion=projects/*/locations/*/agent/environ" + + "ments/*/users/*/sessions/*}:detectIntent" + + ":\001*\022\222\001\n\025StreamingDetectIntent\0228.google.c" + + "loud.dialogflow.v2.StreamingDetectIntent" + + "Request\0329.google.cloud.dialogflow.v2.Str" + + "eamingDetectIntentResponse\"\000(\0010\001\032x\312A\031dia" + + "logflow.googleapis.com\322AYhttps://www.goo" + + "gleapis.com/auth/cloud-platform,https://" + + "www.googleapis.com/auth/dialogflowB\352\003\n\036c" + + "om.google.cloud.dialogflow.v2B\014SessionPr" + + "otoP\001Z>cloud.google.com/go/dialogflow/ap" + + "iv2/dialogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032" + + "Google.Cloud.Dialogflow.V2\352A\321\002\n!dialogfl" + + "ow.googleapis.com/Session\022+projects/{pro" + + "ject}/agent/sessions/{session}\022Sprojects" + + "/{project}/agent/environments/{environme" + + "nt}/users/{user}/sessions/{session}\022@pro" + + "jects/{project}/locations/{location}/age" + + "nt/sessions/{session}\022hprojects/{project" + + "}/locations/{location}/agent/environment" + + "s/{environment}/users/{user}/sessions/{s" + + "ession}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -310,6 +312,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Payload", "SentimentAnalysisRequestConfig", "WebhookHeaders", + "Platform", }); internal_static_google_cloud_dialogflow_v2_QueryParameters_WebhookHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_v2_QueryParameters_descriptor @@ -387,6 +390,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DtmfFinalResultsTimes", "SingleUtteranceEndTimeOffset", "NoSpeechTimeout", + "EndpointingTimeout", "IsInputText", "ClientHalfCloseTimeOffset", "ClientHalfCloseStreamingTimeOffset", diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfig.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfig.java index c1f83baec131..8ade7a0021b8 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfig.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfig.java @@ -178,6 +178,25 @@ public com.google.protobuf.ByteString getModelBytes() { } } + public static final int USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER = 11; + private boolean useTimeoutBasedEndpointing_ = false; + /** + * + * + *
+   * Use timeout based endpointing, interpreting endpointer sensitivy as
+   * seconds of timeout value.
+   * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + @java.lang.Override + public boolean getUseTimeoutBasedEndpointing() { + return useTimeoutBasedEndpointing_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -200,6 +219,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } + if (useTimeoutBasedEndpointing_ != false) { + output.writeBool(11, useTimeoutBasedEndpointing_); + } getUnknownFields().writeTo(output); } @@ -217,6 +239,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } + if (useTimeoutBasedEndpointing_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(11, useTimeoutBasedEndpointing_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -235,6 +261,7 @@ public boolean equals(final java.lang.Object obj) { if (speechModelVariant_ != other.speechModelVariant_) return false; if (!getModel().equals(other.getModel())) return false; + if (getUseTimeoutBasedEndpointing() != other.getUseTimeoutBasedEndpointing()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -250,6 +277,8 @@ public int hashCode() { hash = (53 * hash) + speechModelVariant_; hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTimeoutBasedEndpointing()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -392,6 +421,7 @@ public Builder clear() { bitField0_ = 0; speechModelVariant_ = 0; model_ = ""; + useTimeoutBasedEndpointing_ = false; return this; } @@ -434,6 +464,9 @@ private void buildPartial0(com.google.cloud.dialogflow.v2.SpeechToTextConfig res if (((from_bitField0_ & 0x00000002) != 0)) { result.model_ = model_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.useTimeoutBasedEndpointing_ = useTimeoutBasedEndpointing_; + } } @java.lang.Override @@ -490,6 +523,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.SpeechToTextConfig other bitField0_ |= 0x00000002; onChanged(); } + if (other.getUseTimeoutBasedEndpointing() != false) { + setUseTimeoutBasedEndpointing(other.getUseTimeoutBasedEndpointing()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -528,6 +564,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 88: + { + useTimeoutBasedEndpointing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 88 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -815,6 +857,62 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { return this; } + private boolean useTimeoutBasedEndpointing_; + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + @java.lang.Override + public boolean getUseTimeoutBasedEndpointing() { + return useTimeoutBasedEndpointing_; + } + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @param value The useTimeoutBasedEndpointing to set. + * @return This builder for chaining. + */ + public Builder setUseTimeoutBasedEndpointing(boolean value) { + + useTimeoutBasedEndpointing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return This builder for chaining. + */ + public Builder clearUseTimeoutBasedEndpointing() { + bitField0_ = (bitField0_ & ~0x00000004); + useTimeoutBasedEndpointing_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfigOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfigOrBuilder.java index d315fbd9d77a..3e8d99eb5333 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfigOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SpeechToTextConfigOrBuilder.java @@ -100,4 +100,18 @@ public interface SpeechToTextConfigOrBuilder * @return The bytes for model. */ com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Use timeout based endpointing, interpreting endpointer sensitivy as
+   * seconds of timeout value.
+   * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + boolean getUseTimeoutBasedEndpointing(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java index b41a189c98a3..84d4cdc5a01d 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java @@ -472,7 +472,7 @@ public com.google.protobuf.ByteString getInputAudio() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -489,7 +489,7 @@ public boolean hasInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -519,7 +519,7 @@ public java.lang.String getInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2443,7 +2443,7 @@ public Builder clearInputAudio() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2461,7 +2461,7 @@ public boolean hasInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2492,7 +2492,7 @@ public java.lang.String getInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2523,7 +2523,7 @@ public com.google.protobuf.ByteString getInputTextBytes() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2547,7 +2547,7 @@ public Builder setInputText(java.lang.String value) { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2569,7 +2569,7 @@ public Builder clearInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java index 2ceba9af4ebe..e93c754f82c8 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java @@ -209,7 +209,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -224,7 +224,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -239,7 +239,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequest.java index 117b872c0784..9e2790e502cf 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequest.java @@ -330,7 +330,7 @@ public com.google.cloud.dialogflow.v2.QueryInputOrBuilder getQueryInputOrBuilder * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2/session.proto;l=462 + * deprecated. See google/cloud/dialogflow/v2/session.proto;l=469 * @return The singleUtterance. */ @java.lang.Override @@ -1745,7 +1745,7 @@ public com.google.cloud.dialogflow.v2.QueryInputOrBuilder getQueryInputOrBuilder * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2/session.proto;l=462 + * deprecated. See google/cloud/dialogflow/v2/session.proto;l=469 * @return The singleUtterance. */ @java.lang.Override @@ -1771,7 +1771,7 @@ public boolean getSingleUtterance() { * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2/session.proto;l=462 + * deprecated. See google/cloud/dialogflow/v2/session.proto;l=469 * @param value The singleUtterance to set. * @return This builder for chaining. */ @@ -1801,7 +1801,7 @@ public Builder setSingleUtterance(boolean value) { * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2/session.proto;l=462 + * deprecated. See google/cloud/dialogflow/v2/session.proto;l=469 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequestOrBuilder.java index 8dd644d12fb8..7479da441d08 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingDetectIntentRequestOrBuilder.java @@ -199,7 +199,7 @@ public interface StreamingDetectIntentRequestOrBuilder * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2/session.proto;l=462 + * deprecated. See google/cloud/dialogflow/v2/session.proto;l=469 * @return The singleUtterance. */ @java.lang.Deprecated diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestConversationSummaryResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestConversationSummaryResponse.java index 01cf7db8737c..9398f1d060ac 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestConversationSummaryResponse.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestConversationSummaryResponse.java @@ -188,6 +188,33 @@ java.lang.String getTextSectionsOrDefault( * @return The bytes for answerRecord. */ com.google.protobuf.ByteString getAnswerRecordBytes(); + + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + java.lang.String getBaselineModelVersion(); + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + com.google.protobuf.ByteString getBaselineModelVersionBytes(); } /** * @@ -211,6 +238,7 @@ private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Summary() { text_ = ""; answerRecord_ = ""; + baselineModelVersion_ = ""; } @java.lang.Override @@ -462,6 +490,59 @@ public com.google.protobuf.ByteString getAnswerRecordBytes() { } } + public static final int BASELINE_MODEL_VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + @java.lang.Override + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + 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(); + baselineModelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -484,6 +565,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, baselineModelVersion_); + } getUnknownFields().writeTo(output); } @@ -509,6 +593,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, textSections__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, baselineModelVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -529,6 +616,7 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getBaselineModelVersion().equals(other.getBaselineModelVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -548,6 +636,8 @@ public int hashCode() { } hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (37 * hash) + BASELINE_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBaselineModelVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -721,6 +811,7 @@ public Builder clear() { text_ = ""; internalGetMutableTextSections().clear(); answerRecord_ = ""; + baselineModelVersion_ = ""; return this; } @@ -772,6 +863,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.answerRecord_ = answerRecord_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.baselineModelVersion_ = baselineModelVersion_; + } } @java.lang.Override @@ -838,6 +932,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (!other.getBaselineModelVersion().isEmpty()) { + baselineModelVersion_ = other.baselineModelVersion_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -888,6 +987,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 34 + case 42: + { + baselineModelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1304,6 +1409,117 @@ public Builder setAnswerRecordBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineModelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @param value The baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baselineModelVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return This builder for chaining. + */ + public Builder clearBaselineModelVersion() { + baselineModelVersion_ = getDefaultInstance().getBaselineModelVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @param value The bytes for baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baselineModelVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionFeature.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionFeature.java index a9ecc1b56873..2a5d4f3bcbc8 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionFeature.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionFeature.java @@ -114,6 +114,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * SMART_REPLY = 3; */ SMART_REPLY(3), + /** + * + * + *
+     * Run knowledge search with text input from agent or text generated query.
+     * 
+ * + * KNOWLEDGE_SEARCH = 14; + */ + KNOWLEDGE_SEARCH(14), UNRECOGNIZED(-1), ; @@ -157,6 +167,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * SMART_REPLY = 3; */ public static final int SMART_REPLY_VALUE = 3; + /** + * + * + *
+     * Run knowledge search with text input from agent or text generated query.
+     * 
+ * + * KNOWLEDGE_SEARCH = 14; + */ + public static final int KNOWLEDGE_SEARCH_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -190,6 +210,8 @@ public static Type forNumber(int value) { return FAQ; case 3: return SMART_REPLY; + case 14: + return KNOWLEDGE_SEARCH; default: return null; } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInput.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInput.java new file mode 100644 index 000000000000..4c7f7a1f8182 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInput.java @@ -0,0 +1,658 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Represents the selection of a suggestion.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SuggestionInput} + */ +public final class SuggestionInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SuggestionInput) + SuggestionInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuggestionInput.newBuilder() to construct. + private SuggestionInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SuggestionInput() { + answerRecord_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SuggestionInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_SuggestionInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SuggestionInput.class, + com.google.cloud.dialogflow.v2.SuggestionInput.Builder.class); + } + + public static final int ANSWER_RECORD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerRecord_ = ""; + /** + * + * + *
+   * Required. The ID of a suggestion selected by the human agent.
+   * The suggestion(s) were generated in a previous call to
+   * request Dialogflow assist.
+   * The format is:
+   * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>` where <Answer Record ID> is an alphanumeric string.
+   * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The ID of a suggestion selected by the human agent.
+   * The suggestion(s) were generated in a previous call to
+   * request Dialogflow assist.
+   * The format is:
+   * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>` where <Answer Record ID> is an alphanumeric string.
+   * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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(answerRecord_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, answerRecord_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, answerRecord_); + } + size += getUnknownFields().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.v2.SuggestionInput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.SuggestionInput other = + (com.google.cloud.dialogflow.v2.SuggestionInput) obj; + + if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput 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.v2.SuggestionInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput 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.v2.SuggestionInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput 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.v2.SuggestionInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput 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.v2.SuggestionInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput 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.v2.SuggestionInput 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; + } + /** + * + * + *
+   * Represents the selection of a suggestion.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.SuggestionInput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SuggestionInput) + com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_SuggestionInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.SuggestionInput.class, + com.google.cloud.dialogflow.v2.SuggestionInput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.SuggestionInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answerRecord_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.ParticipantProto + .internal_static_google_cloud_dialogflow_v2_SuggestionInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInput getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInput build() { + com.google.cloud.dialogflow.v2.SuggestionInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.SuggestionInput buildPartial() { + com.google.cloud.dialogflow.v2.SuggestionInput result = + new com.google.cloud.dialogflow.v2.SuggestionInput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.v2.SuggestionInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answerRecord_ = answerRecord_; + } + } + + @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.v2.SuggestionInput) { + return mergeFrom((com.google.cloud.dialogflow.v2.SuggestionInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.SuggestionInput other) { + if (other == com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance()) return this; + if (!other.getAnswerRecord().isEmpty()) { + answerRecord_ = other.answerRecord_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + answerRecord_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object answerRecord_ = ""; + /** + * + * + *
+     * Required. The ID of a suggestion selected by the human agent.
+     * The suggestion(s) were generated in a previous call to
+     * request Dialogflow assist.
+     * The format is:
+     * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>` where <Answer Record ID> is an alphanumeric string.
+     * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The ID of a suggestion selected by the human agent.
+     * The suggestion(s) were generated in a previous call to
+     * request Dialogflow assist.
+     * The format is:
+     * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>` where <Answer Record ID> is an alphanumeric string.
+     * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The ID of a suggestion selected by the human agent.
+     * The suggestion(s) were generated in a previous call to
+     * request Dialogflow assist.
+     * The format is:
+     * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>` where <Answer Record ID> is an alphanumeric string.
+     * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of a suggestion selected by the human agent.
+     * The suggestion(s) were generated in a previous call to
+     * request Dialogflow assist.
+     * The format is:
+     * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>` where <Answer Record ID> is an alphanumeric string.
+     * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAnswerRecord() { + answerRecord_ = getDefaultInstance().getAnswerRecord(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of a suggestion selected by the human agent.
+     * The suggestion(s) were generated in a previous call to
+     * request Dialogflow assist.
+     * The format is:
+     * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+     * ID>` where <Answer Record ID> is an alphanumeric string.
+     * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + 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.v2.SuggestionInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SuggestionInput) + private static final com.google.cloud.dialogflow.v2.SuggestionInput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SuggestionInput(); + } + + public static com.google.cloud.dialogflow.v2.SuggestionInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuggestionInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.SuggestionInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInputOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInputOrBuilder.java new file mode 100644 index 000000000000..22f463b5620a --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SuggestionInputOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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/v2/participant.proto + +package com.google.cloud.dialogflow.v2; + +public interface SuggestionInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SuggestionInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ID of a suggestion selected by the human agent.
+   * The suggestion(s) were generated in a previous call to
+   * request Dialogflow assist.
+   * The format is:
+   * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>` where <Answer Record ID> is an alphanumeric string.
+   * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The answerRecord. + */ + java.lang.String getAnswerRecord(); + /** + * + * + *
+   * Required. The ID of a suggestion selected by the human agent.
+   * The suggestion(s) were generated in a previous call to
+   * request Dialogflow assist.
+   * The format is:
+   * `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
+   * ID>` where <Answer Record ID> is an alphanumeric string.
+   * 
+ * + * string answer_record = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for answerRecord. + */ + com.google.protobuf.ByteString getAnswerRecordBytes(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/answer_record.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/answer_record.proto index aa3c271ddf65..8463144ddba1 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/answer_record.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/answer_record.proto @@ -273,6 +273,22 @@ message AgentAssistantFeedback { string summary_text = 3; } + // Feedback for knowledge search. + message KnowledgeSearchFeedback { + // Whether the answer was copied by the human agent or not. + // If the value is set to be true, + // [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked] + // will be updated to be true. + bool answer_copied = 1; + + // The URIs clicked by the human agent. The value is appended for each + // [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest]. + // If the value is not empty, + // [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked] + // will be updated to be true. + repeated string clicked_uris = 2; + } + // Optional. Whether or not the suggested answer is relevant. // // For example: @@ -307,6 +323,10 @@ message AgentAssistantFeedback { // Optional. Feedback for conversation summarization. SummarizationFeedback summarization_feedback = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Feedback for knowledge search. + KnowledgeSearchFeedback knowledge_search_feedback = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Represents a record of a human agent assist answer. @@ -319,5 +339,9 @@ message AgentAssistantRecord { // Output only. The FAQ answer. FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dialogflow assist answer. + DialogflowAssistAnswer dialogflow_assist_answer = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto index 9cbde567b618..17ffde8a3748 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto @@ -279,6 +279,10 @@ message SpeechToTextConfig { // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. string model = 2; + + // Use timeout based endpointing, interpreting endpointer sensitivy as + // seconds of timeout value. + bool use_timeout_based_endpointing = 11; } // [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling) diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation.proto index 6c3a7e5a7ef9..ae6904f6af21 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/conversation_profile.proto"; import "google/cloud/dialogflow/v2/participant.proto"; +import "google/cloud/dialogflow/v2/session.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; @@ -154,6 +155,27 @@ service Conversations { } }; } + + // Get answers for the given query based on knowledge documents. + rpc SearchKnowledge(SearchKnowledgeRequest) + returns (SearchKnowledgeResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/suggestions:searchKnowledge" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/suggestions:searchKnowledge" + body: "*" + } + additional_bindings { + post: "/v2/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge" + body: "*" + } + additional_bindings { + post: "/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge" + body: "*" + } + }; + } } // Represents a conversation. @@ -456,6 +478,10 @@ message SuggestConversationSummaryResponse { string answer_record = 3 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/AnswerRecord" }]; + + // The baseline model version used to generate this summary. It is empty if + // a baseline model was not used to generate this summary. + string baseline_model_version = 5; } // Generated summary. @@ -537,6 +563,10 @@ message GenerateStatelessSummaryResponse { // section's name and the value is the section's content. There is no // specific format for the key or value. map text_sections = 2; + + // The baseline model version used to generate this summary. It is empty if + // a baseline model was not used to generate this summary. + string baseline_model_version = 4; } // Generated summary. @@ -555,3 +585,99 @@ message GenerateStatelessSummaryResponse { // the request if there weren't that many messages in the conversation. int32 context_size = 3; } + +// The request message for +// [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge]. +message SearchKnowledgeRequest { + // The parent resource contains the conversation profile + // Format: 'projects/' or `projects//locations/`. + string parent = 6; + + // Required. The natural language text query for knowledge search. + TextInput query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversation profile used to configure the search. + // Format: `projects//locations//conversationProfiles/`. + string conversation_profile = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ConversationProfile" + } + ]; + + // The ID of the search session. + // The session_id can be combined with Dialogflow V3 Agent ID retrieved from + // conversation profile or on its own to identify a search session. The search + // history of the same session will impact the search result. It's up to the + // API caller to choose an appropriate `Session ID`. It can be a random number + // or some type of session identifiers (preferably hashed). The length must + // not exceed 36 characters. + string session_id = 3; + + // The conversation (between human agent and end user) where the search + // request is triggered. Format: `projects//locations//conversations/`. + string conversation = 4 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Conversation" + }]; + + // The name of the latest conversation message when the request is + // triggered. + // Format: `projects//locations//conversations//messages/`. + string latest_message = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; +} + +// The response message for +// [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge]. +message SearchKnowledgeResponse { + // Most relevant snippets extracted from articles in the given knowledge base, + // ordered by confidence. + repeated SearchKnowledgeAnswer answers = 2; +} + +// Represents a SearchKnowledge answer. +message SearchKnowledgeAnswer { + // The type of the answer. + enum AnswerType { + // The answer has a unspecified type. + ANSWER_TYPE_UNSPECIFIED = 0; + + // The answer is from FAQ doucments. + FAQ = 1; + + // The answer is from generative model. + GENERATIVE = 2; + } + + // The sources of the answers. + message AnswerSource { + // The title of the article. + string title = 1; + + // The URI of the article. + string uri = 2; + + // The relevant snippet of the article. + string snippet = 3; + } + + // The piece of text from the knowledge base documents that answers + // the search query + string answer = 1; + + // The type of the answer. + AnswerType answer_type = 2; + + // All sources used to generate the answer. + repeated AnswerSource answer_sources = 3; + + // The name of the answer record. + // Format: `projects//locations//answer + // Records/` + string answer_record = 5; +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation_profile.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation_profile.proto index 79834832dbb9..e86798f20543 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation_profile.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/conversation_profile.proto @@ -411,9 +411,17 @@ message HumanAgentAssistantConfig { // Automatically iterates all participants and tries to compile // suggestions. // - // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, + // KNOWLEDGE_ASSIST. bool enable_event_based_suggestion = 3; + // Optional. Disable the logging of search queries sent by human agents. It + // can prevent those queries from being stored at answer records. + // + // Supported features: KNOWLEDGE_SEARCH. + bool disable_agent_query_logging = 14 + [(google.api.field_behavior) = OPTIONAL]; + // Settings of suggestion trigger. // // Currently, only ARTICLE_SUGGESTION and FAQ will use this field. @@ -486,6 +494,20 @@ message HumanAgentAssistantConfig { // // Supported feature: DIALOGFLOW_ASSIST. message DialogflowQuerySource { + // The configuration used for human agent side Dialogflow assist + // suggestion. + message HumanAgentSideConfig { + // Optional. The name of a dialogflow virtual agent used for intent + // detection and suggestion triggered by human agent. + // Format: `projects//locations//agent`. + string agent = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + } + // Required. The name of a Dialogflow virtual agent used for end user side // intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in @@ -496,6 +518,10 @@ message HumanAgentAssistantConfig { type: "dialogflow.googleapis.com/Agent" } ]; + + // Optional. The Dialogflow assist configuration for human agent. + HumanAgentSideConfig human_agent_side_config = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Settings that determine how to filter recent conversation context when @@ -738,6 +764,9 @@ message SuggestionFeature { // Run smart reply model for chat. SMART_REPLY = 3; + + // Run knowledge search with text input from agent or text generated query. + KNOWLEDGE_SEARCH = 14; } // Type of Human Agent Assistant API feature to request. diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto index 1abdde8523a5..97c2e1d4687a 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto @@ -409,6 +409,9 @@ message AnalyzeContentRequest { // An input event to send to Dialogflow. EventInput event_input = 8; + + // An input representing the selection of a suggestion. + SuggestionInput suggestion_input = 12; } // Speech synthesis configuration. @@ -578,7 +581,7 @@ message StreamingAnalyzeContentRequest { // The UTF-8 encoded natural language text to be processed. Must be sent if // `text_config` is set in the first message. Text length must not exceed // 256 bytes for virtual agent interactions. The `input_text` field can be - // only sent once. + // only sent once, and would cancel the speech recognition if any ongoing. string input_text = 6; // The DTMF digits used to invoke intent and fill in parameter value. @@ -980,6 +983,41 @@ message SmartReplyAnswer { }]; } +// Represents an intent suggestion. +message IntentSuggestion { + // The display name of the intent. + string display_name = 1; + + // The name of the intent. + oneof intent { + // The unique identifier of this + // [intent][google.cloud.dialogflow.v2.Intent]. Format: `projects//locations//agent/intents/`. + string intent_v2 = 2; + } + + // Human readable description for better understanding an intent like its + // scope, content, result etc. Maximum character limit: 140 characters. + string description = 5; +} + +// Represents a Dialogflow assist answer. +message DialogflowAssistAnswer { + // Result from DetectIntent for one matched intent. + oneof result { + // Result from v2 agent. + QueryResult query_result = 1; + + // An intent suggestion generated from conversation. + IntentSuggestion intent_suggestion = 5; + } + + // The name of answer record, in the format of + // "projects//locations//answerRecords/" + string answer_record = 2; +} + // One response of different type of suggestion response which is used in // the response of // [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] @@ -1049,6 +1087,17 @@ message MessageAnnotation { bool contain_entities = 2; } +// Represents the selection of a suggestion. +message SuggestionInput { + // Required. The ID of a suggestion selected by the human agent. + // The suggestion(s) were generated in a previous call to + // request Dialogflow assist. + // The format is: + // `projects//locations//answerRecords/` where is an alphanumeric string. + string answer_record = 1 [(google.api.field_behavior) = REQUIRED]; +} + // Represents the parameters of human assist query. message AssistQueryParameters { // Key-value filters on the metadata of documents returned by article diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto index 298f34df69f6..14ee524d100b 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto @@ -242,6 +242,13 @@ message QueryParameters { // "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", // etc. map webhook_headers = 14; + + // The platform of the virtual agent response messages. + // + // If not empty, only emits messages from this platform in the response. + // Valid values are the enum names of + // [platform][google.cloud.dialogflow.v2.Intent.Message.platform]. + string platform = 18; } // Represents the query input. It can contain either: @@ -538,9 +545,12 @@ message CloudConversationDebuggingInfo { // beginning of the stream. google.protobuf.Duration single_utterance_end_time_offset = 14; - // No speech timeout settings observed at runtime. + // No speech timeout settings for the stream. google.protobuf.Duration no_speech_timeout = 15; + // Speech endpointing timeout settings for the stream. + google.protobuf.Duration endpointing_timeout = 19; + // Whether the streaming terminates with an injected text query. bool is_input_text = 16; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedback.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedback.java index 0314041da306..186b479f2baf 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedback.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedback.java @@ -1828,6 +1828,995 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface KnowledgeSearchFeedbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Whether the answer was copied by the human agent or not.
+     * If the value is set to be true,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + boolean getAnswerCopied(); + + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + java.util.List getClickedUrisList(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + int getClickedUrisCount(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + java.lang.String getClickedUris(int index); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + com.google.protobuf.ByteString getClickedUrisBytes(int index); + } + /** + * + * + *
+   * Feedback for knowledge search.
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback} + */ + public static final class KnowledgeSearchFeedback extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) + KnowledgeSearchFeedbackOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeSearchFeedback.newBuilder() to construct. + private KnowledgeSearchFeedback(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeSearchFeedback() { + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeSearchFeedback(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .class, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder.class); + } + + public static final int ANSWER_COPIED_FIELD_NUMBER = 1; + private boolean answerCopied_ = false; + /** + * + * + *
+     * Whether the answer was copied by the human agent or not.
+     * If the value is set to be true,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + @java.lang.Override + public boolean getAnswerCopied() { + return answerCopied_; + } + + public static final int CLICKED_URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList clickedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + public com.google.protobuf.ProtocolStringList getClickedUrisList() { + return clickedUris_; + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + public int getClickedUrisCount() { + return clickedUris_.size(); + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + public java.lang.String getClickedUris(int index) { + return clickedUris_.get(index); + } + /** + * + * + *
+     * The URIs clicked by the human agent. The value is appended for each
+     * UpdateAnswerRecordRequest.
+     * If the value is not empty,
+     * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+     * will be updated to be true.
+     * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + public com.google.protobuf.ByteString getClickedUrisBytes(int index) { + return clickedUris_.getByteString(index); + } + + 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 (answerCopied_ != false) { + output.writeBool(1, answerCopied_); + } + for (int i = 0; i < clickedUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clickedUris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (answerCopied_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, answerCopied_); + } + { + int dataSize = 0; + for (int i = 0; i < clickedUris_.size(); i++) { + dataSize += computeStringSizeNoTag(clickedUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getClickedUrisList().size(); + } + size += getUnknownFields().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.AgentAssistantFeedback.KnowledgeSearchFeedback)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback other = + (com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) obj; + + if (getAnswerCopied() != other.getAnswerCopied()) return false; + if (!getClickedUrisList().equals(other.getClickedUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_COPIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnswerCopied()); + if (getClickedUrisCount() > 0) { + hash = (37 * hash) + CLICKED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getClickedUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + 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; + } + /** + * + * + *
+     * Feedback for knowledge search.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .class, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answerCopied_ = false; + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.AnswerRecordsProto + .internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + build() { + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + buildPartial() { + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback result = + new com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answerCopied_ = answerCopied_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + clickedUris_.makeImmutable(); + result.clickedUris_ = clickedUris_; + } + } + + @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.AgentAssistantFeedback.KnowledgeSearchFeedback) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + other) { + if (other + == com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance()) return this; + if (other.getAnswerCopied() != false) { + setAnswerCopied(other.getAnswerCopied()); + } + if (!other.clickedUris_.isEmpty()) { + if (clickedUris_.isEmpty()) { + clickedUris_ = other.clickedUris_; + bitField0_ |= 0x00000002; + } else { + ensureClickedUrisIsMutable(); + clickedUris_.addAll(other.clickedUris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + answerCopied_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureClickedUrisIsMutable(); + clickedUris_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean answerCopied_; + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @return The answerCopied. + */ + @java.lang.Override + public boolean getAnswerCopied() { + return answerCopied_; + } + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @param value The answerCopied to set. + * @return This builder for chaining. + */ + public Builder setAnswerCopied(boolean value) { + + answerCopied_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the answer was copied by the human agent or not.
+       * If the value is set to be true,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * bool answer_copied = 1; + * + * @return This builder for chaining. + */ + public Builder clearAnswerCopied() { + bitField0_ = (bitField0_ & ~0x00000001); + answerCopied_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList clickedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureClickedUrisIsMutable() { + if (!clickedUris_.isModifiable()) { + clickedUris_ = new com.google.protobuf.LazyStringArrayList(clickedUris_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return A list containing the clickedUris. + */ + public com.google.protobuf.ProtocolStringList getClickedUrisList() { + clickedUris_.makeImmutable(); + return clickedUris_; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return The count of clickedUris. + */ + public int getClickedUrisCount() { + return clickedUris_.size(); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the element to return. + * @return The clickedUris at the given index. + */ + public java.lang.String getClickedUris(int index) { + return clickedUris_.get(index); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the clickedUris at the given index. + */ + public com.google.protobuf.ByteString getClickedUrisBytes(int index) { + return clickedUris_.getByteString(index); + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param index The index to set the value at. + * @param value The clickedUris to set. + * @return This builder for chaining. + */ + public Builder setClickedUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClickedUrisIsMutable(); + clickedUris_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param value The clickedUris to add. + * @return This builder for chaining. + */ + public Builder addClickedUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClickedUrisIsMutable(); + clickedUris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param values The clickedUris to add. + * @return This builder for chaining. + */ + public Builder addAllClickedUris(java.lang.Iterable values) { + ensureClickedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clickedUris_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @return This builder for chaining. + */ + public Builder clearClickedUris() { + clickedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The URIs clicked by the human agent. The value is appended for each
+       * UpdateAnswerRecordRequest.
+       * If the value is not empty,
+       * [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked]
+       * will be updated to be true.
+       * 
+ * + * repeated string clicked_uris = 2; + * + * @param value The bytes of the clickedUris to add. + * @return This builder for chaining. + */ + public Builder addClickedUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClickedUrisIsMutable(); + clickedUris_.add(value); + bitField0_ |= 0x00000002; + 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.AgentAssistantFeedback.KnowledgeSearchFeedback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback) + private static final com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedback + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback(); + } + + public static com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeSearchFeedback parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.AgentAssistantFeedback.KnowledgeSearchFeedback + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int ANSWER_RELEVANCE_FIELD_NUMBER = 1; private int answerRelevance_ = 0; /** @@ -2059,6 +3048,67 @@ public boolean hasSummarizationFeedback() { : summarizationFeedback_; } + public static final int KNOWLEDGE_SEARCH_FEEDBACK_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + knowledgeSearchFeedback_; + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + @java.lang.Override + public boolean hasKnowledgeSearchFeedback() { + return knowledgeSearchFeedback_ != null; + } + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback() { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder() { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2094,6 +3144,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (summarizationFeedback_ != null) { output.writeMessage(4, getSummarizationFeedback()); } + if (knowledgeSearchFeedback_ != null) { + output.writeMessage(5, getKnowledgeSearchFeedback()); + } getUnknownFields().writeTo(output); } @@ -2125,6 +3178,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSummarizationFeedback()); } + if (knowledgeSearchFeedback_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKnowledgeSearchFeedback()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2148,6 +3205,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSummarizationFeedback()) { if (!getSummarizationFeedback().equals(other.getSummarizationFeedback())) return false; } + if (hasKnowledgeSearchFeedback() != other.hasKnowledgeSearchFeedback()) return false; + if (hasKnowledgeSearchFeedback()) { + if (!getKnowledgeSearchFeedback().equals(other.getKnowledgeSearchFeedback())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2169,6 +3230,10 @@ public int hashCode() { hash = (37 * hash) + SUMMARIZATION_FEEDBACK_FIELD_NUMBER; hash = (53 * hash) + getSummarizationFeedback().hashCode(); } + if (hasKnowledgeSearchFeedback()) { + hash = (37 * hash) + KNOWLEDGE_SEARCH_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeSearchFeedback().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2317,6 +3382,11 @@ public Builder clear() { summarizationFeedbackBuilder_.dispose(); summarizationFeedbackBuilder_ = null; } + knowledgeSearchFeedback_ = null; + if (knowledgeSearchFeedbackBuilder_ != null) { + knowledgeSearchFeedbackBuilder_.dispose(); + knowledgeSearchFeedbackBuilder_ = null; + } return this; } @@ -2368,6 +3438,12 @@ private void buildPartial0(com.google.cloud.dialogflow.v2beta1.AgentAssistantFee ? summarizationFeedback_ : summarizationFeedbackBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.knowledgeSearchFeedback_ = + knowledgeSearchFeedbackBuilder_ == null + ? knowledgeSearchFeedback_ + : knowledgeSearchFeedbackBuilder_.build(); + } } @java.lang.Override @@ -2428,6 +3504,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedb if (other.hasSummarizationFeedback()) { mergeSummarizationFeedback(other.getSummarizationFeedback()); } + if (other.hasKnowledgeSearchFeedback()) { + mergeKnowledgeSearchFeedback(other.getKnowledgeSearchFeedback()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2479,6 +3558,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 42: + { + input.readMessage( + getKnowledgeSearchFeedbackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3134,6 +4220,227 @@ public Builder clearSummarizationFeedback() { return summarizationFeedbackBuilder_; } + private com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + knowledgeSearchFeedback_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder> + knowledgeSearchFeedbackBuilder_; + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + public boolean hasKnowledgeSearchFeedback() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback() { + if (knowledgeSearchFeedbackBuilder_ == null) { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } else { + return knowledgeSearchFeedbackBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback value) { + if (knowledgeSearchFeedbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeSearchFeedback_ = value; + } else { + knowledgeSearchFeedbackBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback.Builder + builderForValue) { + if (knowledgeSearchFeedbackBuilder_ == null) { + knowledgeSearchFeedback_ = builderForValue.build(); + } else { + knowledgeSearchFeedbackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeSearchFeedback( + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback value) { + if (knowledgeSearchFeedbackBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && knowledgeSearchFeedback_ != null + && knowledgeSearchFeedback_ + != com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedback.getDefaultInstance()) { + getKnowledgeSearchFeedbackBuilder().mergeFrom(value); + } else { + knowledgeSearchFeedback_ = value; + } + } else { + knowledgeSearchFeedbackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeSearchFeedback() { + bitField0_ = (bitField0_ & ~0x00000010); + knowledgeSearchFeedback_ = null; + if (knowledgeSearchFeedbackBuilder_ != null) { + knowledgeSearchFeedbackBuilder_.dispose(); + knowledgeSearchFeedbackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder + getKnowledgeSearchFeedbackBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getKnowledgeSearchFeedbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder() { + if (knowledgeSearchFeedbackBuilder_ != null) { + return knowledgeSearchFeedbackBuilder_.getMessageOrBuilder(); + } else { + return knowledgeSearchFeedback_ == null + ? com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .getDefaultInstance() + : knowledgeSearchFeedback_; + } + } + /** + * + * + *
+     * Optional. Feedback for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder> + getKnowledgeSearchFeedbackFieldBuilder() { + if (knowledgeSearchFeedbackBuilder_ == null) { + knowledgeSearchFeedbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + .Builder, + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + .KnowledgeSearchFeedbackOrBuilder>( + getKnowledgeSearchFeedback(), getParentForChildren(), isClean()); + knowledgeSearchFeedback_ = null; + } + return knowledgeSearchFeedbackBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedbackOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedbackOrBuilder.java index 0f2e0369d1fc..ac521f38ff5a 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedbackOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentAssistantFeedbackOrBuilder.java @@ -194,4 +194,47 @@ public interface AgentAssistantFeedbackOrBuilder */ com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedbackOrBuilder getSummarizationFeedbackOrBuilder(); + + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeSearchFeedback field is set. + */ + boolean hasKnowledgeSearchFeedback(); + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeSearchFeedback. + */ + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback + getKnowledgeSearchFeedback(); + /** + * + * + *
+   * Optional. Feedback for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedback knowledge_search_feedback = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.KnowledgeSearchFeedbackOrBuilder + getKnowledgeSearchFeedbackOrBuilder(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnswerRecordsProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnswerRecordsProto.java index 6e3018ffcd75..dce6a82d68fd 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnswerRecordsProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnswerRecordsProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_SummarizationFeedback_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_SummarizationFeedback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2beta1_GetAnswerRecordRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -108,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "obuf.Timestamp\"p\n\020CorrectnessLevel\022!\n\035CO" + "RRECTNESS_LEVEL_UNSPECIFIED\020\000\022\017\n\013NOT_COR" + "RECT\020\001\022\025\n\021PARTIALLY_CORRECT\020\002\022\021\n\rFULLY_C" - + "ORRECT\020\003B\021\n\017detail_feedback\"\340\006\n\026AgentAss" + + "ORRECT\020\003B\021\n\017detail_feedback\"\242\010\n\026AgentAss" + "istantFeedback\022a\n\020answer_relevance\030\001 \001(\016" + "2G.google.cloud.dialogflow.v2beta1.Agent" + "AssistantFeedback.AnswerRelevance\022i\n\024doc" @@ -119,58 +123,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ta1.AgentAssistantFeedback.DocumentEffic" + "iency\022m\n\026summarization_feedback\030\004 \001(\0132M." + "google.cloud.dialogflow.v2beta1.AgentAss" - + "istantFeedback.SummarizationFeedback\032\230\001\n" - + "\025SummarizationFeedback\0223\n\017start_timestam" - + "p\030\001 \001(\0132\032.google.protobuf.Timestamp\0224\n\020s" - + "ubmit_timestamp\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\022\024\n\014summary_text\030\003 \001(\t\"Q\n\017Answe" - + "rRelevance\022 \n\034ANSWER_RELEVANCE_UNSPECIFI" - + "ED\020\000\022\016\n\nIRRELEVANT\020\001\022\014\n\010RELEVANT\020\002\"W\n\023Do" - + "cumentCorrectness\022$\n DOCUMENT_CORRECTNES" - + "S_UNSPECIFIED\020\000\022\r\n\tINCORRECT\020\001\022\013\n\007CORREC" - + "T\020\002\"Y\n\022DocumentEfficiency\022#\n\037DOCUMENT_EF" - + "FICIENCY_UNSPECIFIED\020\000\022\017\n\013INEFFICIENT\020\001\022" - + "\r\n\tEFFICIENT\020\002\"&\n\026GetAnswerRecordRequest" - + "\022\014\n\004name\030\001 \001(\t\"\226\001\n\030ListAnswerRecordsRequ" - + "est\022;\n\006parent\030\001 \001(\tB+\372A(\022&dialogflow.goo" - + "gleapis.com/AnswerRecord\022\026\n\006filter\030\002 \001(\t" - + "B\006\030\001\342A\001\001\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_toke" - + "n\030\004 \001(\t\"{\n\031ListAnswerRecordsResponse\022E\n\016" - + "answer_records\030\001 \003(\0132-.google.cloud.dial" - + "ogflow.v2beta1.AnswerRecord\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\230\001\n\031UpdateAnswerRecordReque" - + "st\022J\n\ranswer_record\030\001 \001(\0132-.google.cloud" - + ".dialogflow.v2beta1.AnswerRecordB\004\342A\001\002\022/" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMask2\302\007\n\rAnswerRecords\022\352\001\n\017GetAnswerR" - + "ecord\0227.google.cloud.dialogflow.v2beta1." - + "GetAnswerRecordRequest\032-.google.cloud.di" - + "alogflow.v2beta1.AnswerRecord\"o\210\002\001\202\323\344\223\002f" - + "\022*/v2beta1/{name=projects/*/answerRecord" - + "s/*}Z8\0226/v2beta1/{name=projects/*/locati" - + "ons/*/answerRecords/*}\022\201\002\n\021ListAnswerRec" - + "ords\0229.google.cloud.dialogflow.v2beta1.L" - + "istAnswerRecordsRequest\032:.google.cloud.d" - + "ialogflow.v2beta1.ListAnswerRecordsRespo" - + "nse\"u\332A\006parent\202\323\344\223\002f\022*/v2beta1/{parent=p" - + "rojects/*}/answerRecordsZ8\0226/v2beta1/{pa" - + "rent=projects/*/locations/*}/answerRecor" - + "ds\022\305\002\n\022UpdateAnswerRecord\022:.google.cloud" - + ".dialogflow.v2beta1.UpdateAnswerRecordRe" - + "quest\032-.google.cloud.dialogflow.v2beta1." - + "AnswerRecord\"\303\001\332A\031answer_record,update_m" - + "ask\202\323\344\223\002\240\00128/v2beta1/{answer_record.name" - + "=projects/*/answerRecords/*}:\ranswer_rec" - + "ordZU2D/v2beta1/{answer_record.name=proj" - + "ects/*/locations/*/answerRecords/*}:\rans" - + "wer_record\032x\312A\031dialogflow.googleapis.com" - + "\322AYhttps://www.googleapis.com/auth/cloud" - + "-platform,https://www.googleapis.com/aut" - + "h/dialogflowB\252\001\n#com.google.cloud.dialog" - + "flow.v2beta1B\022AnswerRecordsProtoP\001ZCclou" - + "d.google.com/go/dialogflow/apiv2beta1/di" - + "alogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\037Google" - + ".Cloud.Dialogflow.V2Beta1b\006proto3" + + "istantFeedback.SummarizationFeedback\022x\n\031" + + "knowledge_search_feedback\030\005 \001(\0132O.google" + + ".cloud.dialogflow.v2beta1.AgentAssistant" + + "Feedback.KnowledgeSearchFeedbackB\004\342A\001\001\032\230" + + "\001\n\025SummarizationFeedback\0223\n\017start_timest" + + "amp\030\001 \001(\0132\032.google.protobuf.Timestamp\0224\n" + + "\020submit_timestamp\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\022\024\n\014summary_text\030\003 \001(\t\032F\n\027Kno" + + "wledgeSearchFeedback\022\025\n\ranswer_copied\030\001 " + + "\001(\010\022\024\n\014clicked_uris\030\002 \003(\t\"Q\n\017AnswerRelev" + + "ance\022 \n\034ANSWER_RELEVANCE_UNSPECIFIED\020\000\022\016" + + "\n\nIRRELEVANT\020\001\022\014\n\010RELEVANT\020\002\"W\n\023Document" + + "Correctness\022$\n DOCUMENT_CORRECTNESS_UNSP" + + "ECIFIED\020\000\022\r\n\tINCORRECT\020\001\022\013\n\007CORRECT\020\002\"Y\n" + + "\022DocumentEfficiency\022#\n\037DOCUMENT_EFFICIEN" + + "CY_UNSPECIFIED\020\000\022\017\n\013INEFFICIENT\020\001\022\r\n\tEFF" + + "ICIENT\020\002\"&\n\026GetAnswerRecordRequest\022\014\n\004na" + + "me\030\001 \001(\t\"\226\001\n\030ListAnswerRecordsRequest\022;\n" + + "\006parent\030\001 \001(\tB+\372A(\022&dialogflow.googleapi" + + "s.com/AnswerRecord\022\026\n\006filter\030\002 \001(\tB\006\030\001\342A" + + "\001\001\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(" + + "\t\"{\n\031ListAnswerRecordsResponse\022E\n\016answer" + + "_records\030\001 \003(\0132-.google.cloud.dialogflow" + + ".v2beta1.AnswerRecord\022\027\n\017next_page_token" + + "\030\002 \001(\t\"\230\001\n\031UpdateAnswerRecordRequest\022J\n\r" + + "answer_record\030\001 \001(\0132-.google.cloud.dialo" + + "gflow.v2beta1.AnswerRecordB\004\342A\001\002\022/\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "k2\302\007\n\rAnswerRecords\022\352\001\n\017GetAnswerRecord\022" + + "7.google.cloud.dialogflow.v2beta1.GetAns" + + "werRecordRequest\032-.google.cloud.dialogfl" + + "ow.v2beta1.AnswerRecord\"o\210\002\001\202\323\344\223\002f\022*/v2b" + + "eta1/{name=projects/*/answerRecords/*}Z8" + + "\0226/v2beta1/{name=projects/*/locations/*/" + + "answerRecords/*}\022\201\002\n\021ListAnswerRecords\0229" + + ".google.cloud.dialogflow.v2beta1.ListAns" + + "werRecordsRequest\032:.google.cloud.dialogf" + + "low.v2beta1.ListAnswerRecordsResponse\"u\332" + + "A\006parent\202\323\344\223\002f\022*/v2beta1/{parent=project" + + "s/*}/answerRecordsZ8\0226/v2beta1/{parent=p" + + "rojects/*/locations/*}/answerRecords\022\305\002\n" + + "\022UpdateAnswerRecord\022:.google.cloud.dialo" + + "gflow.v2beta1.UpdateAnswerRecordRequest\032" + + "-.google.cloud.dialogflow.v2beta1.Answer" + + "Record\"\303\001\332A\031answer_record,update_mask\202\323\344" + + "\223\002\240\00128/v2beta1/{answer_record.name=proje" + + "cts/*/answerRecords/*}:\ranswer_recordZU2" + + "D/v2beta1/{answer_record.name=projects/*" + + "/locations/*/answerRecords/*}:\ranswer_re" + + "cord\032x\312A\031dialogflow.googleapis.com\322AYhtt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "orm,https://www.googleapis.com/auth/dial" + + "ogflowB\252\001\n#com.google.cloud.dialogflow.v" + + "2beta1B\022AnswerRecordsProtoP\001ZCcloud.goog" + + "le.com/go/dialogflow/apiv2beta1/dialogfl" + + "owpb;dialogflowpb\370\001\001\242\002\002DF\252\002\037Google.Cloud" + + ".Dialogflow.V2Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -224,6 +233,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DocumentCorrectness", "DocumentEfficiency", "SummarizationFeedback", + "KnowledgeSearchFeedback", }); internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_SummarizationFeedback_descriptor = internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_descriptor @@ -235,6 +245,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "StartTimestamp", "SubmitTimestamp", "SummaryText", }); + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_AgentAssistantFeedback_KnowledgeSearchFeedback_descriptor, + new java.lang.String[] { + "AnswerCopied", "ClickedUris", + }); internal_static_google_cloud_dialogflow_v2beta1_GetAnswerRecordRequest_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_dialogflow_v2beta1_GetAnswerRecordRequest_fieldAccessorTable = diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java index ac83ead960b3..56883e8b81b7 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java @@ -115,10 +115,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "w.v2beta1.SynthesizeSpeechConfig\"Z\n\023Tele" + "phonyDtmfEvents\022C\n\013dtmf_events\030\001 \003(\0162..g" + "oogle.cloud.dialogflow.v2beta1.Telephony" - + "Dtmf\"v\n\022SpeechToTextConfig\022Q\n\024speech_mod" - + "el_variant\030\001 \001(\01623.google.cloud.dialogfl" - + "ow.v2beta1.SpeechModelVariant\022\r\n\005model\030\002" - + " \001(\t*\224\002\n\rTelephonyDtmf\022\036\n\032TELEPHONY_DTMF" + + "Dtmf\"\235\001\n\022SpeechToTextConfig\022Q\n\024speech_mo" + + "del_variant\030\001 \001(\01623.google.cloud.dialogf" + + "low.v2beta1.SpeechModelVariant\022\r\n\005model\030" + + "\002 \001(\t\022%\n\035use_timeout_based_endpointing\030\013" + + " \001(\010*\224\002\n\rTelephonyDtmf\022\036\n\032TELEPHONY_DTMF" + "_UNSPECIFIED\020\000\022\014\n\010DTMF_ONE\020\001\022\014\n\010DTMF_TWO" + "\020\002\022\016\n\nDTMF_THREE\020\003\022\r\n\tDTMF_FOUR\020\004\022\r\n\tDTM" + "F_FIVE\020\005\022\014\n\010DTMF_SIX\020\006\022\016\n\nDTMF_SEVEN\020\007\022\016" @@ -244,7 +245,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SpeechToTextConfig_descriptor, new java.lang.String[] { - "SpeechModelVariant", "Model", + "SpeechModelVariant", "Model", "UseTimeoutBasedEndpointing", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfo.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfo.java index 6833d4bfbf9a..2a238f0cb1f3 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfo.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfo.java @@ -645,7 +645,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -660,7 +660,7 @@ public boolean hasNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -677,7 +677,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -689,6 +689,56 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { : noSpeechTimeout_; } + public static final int ENDPOINTING_TIMEOUT_FIELD_NUMBER = 19; + private com.google.protobuf.Duration endpointingTimeout_; + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + @java.lang.Override + public boolean hasEndpointingTimeout() { + return endpointingTimeout_ != null; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndpointingTimeout() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + public static final int IS_INPUT_TEXT_FIELD_NUMBER = 16; private boolean isInputText_ = false; /** @@ -872,6 +922,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clientHalfCloseStreamingTimeOffset_ != null) { output.writeMessage(18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + output.writeMessage(19, getEndpointingTimeout()); + } getUnknownFields().writeTo(output); } @@ -948,6 +1001,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEndpointingTimeout()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -995,6 +1051,10 @@ public boolean equals(final java.lang.Object obj) { if (hasNoSpeechTimeout()) { if (!getNoSpeechTimeout().equals(other.getNoSpeechTimeout())) return false; } + if (hasEndpointingTimeout() != other.hasEndpointingTimeout()) return false; + if (hasEndpointingTimeout()) { + if (!getEndpointingTimeout().equals(other.getEndpointingTimeout())) return false; + } if (getIsInputText() != other.getIsInputText()) return false; if (hasClientHalfCloseTimeOffset() != other.hasClientHalfCloseTimeOffset()) return false; if (hasClientHalfCloseTimeOffset()) { @@ -1062,6 +1122,10 @@ public int hashCode() { hash = (37 * hash) + NO_SPEECH_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getNoSpeechTimeout().hashCode(); } + if (hasEndpointingTimeout()) { + hash = (37 * hash) + ENDPOINTING_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getEndpointingTimeout().hashCode(); + } hash = (37 * hash) + IS_INPUT_TEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInputText()); if (hasClientHalfCloseTimeOffset()) { @@ -1271,6 +1335,11 @@ public Builder clear() { noSpeechTimeoutBuilder_.dispose(); noSpeechTimeoutBuilder_ = null; } + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } isInputText_ = false; clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { @@ -1406,15 +1475,21 @@ private void buildPartial0( noSpeechTimeoutBuilder_ == null ? noSpeechTimeout_ : noSpeechTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00004000) != 0)) { - result.isInputText_ = isInputText_; + result.endpointingTimeout_ = + endpointingTimeoutBuilder_ == null + ? endpointingTimeout_ + : endpointingTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00008000) != 0)) { + result.isInputText_ = isInputText_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { result.clientHalfCloseTimeOffset_ = clientHalfCloseTimeOffsetBuilder_ == null ? clientHalfCloseTimeOffset_ : clientHalfCloseTimeOffsetBuilder_.build(); } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.clientHalfCloseStreamingTimeOffset_ = clientHalfCloseStreamingTimeOffsetBuilder_ == null ? clientHalfCloseStreamingTimeOffset_ @@ -1610,6 +1685,9 @@ public Builder mergeFrom( if (other.hasNoSpeechTimeout()) { mergeNoSpeechTimeout(other.getNoSpeechTimeout()); } + if (other.hasEndpointingTimeout()) { + mergeEndpointingTimeout(other.getEndpointingTimeout()); + } if (other.getIsInputText() != false) { setIsInputText(other.getIsInputText()); } @@ -1759,14 +1837,14 @@ public Builder mergeFrom( case 128: { isInputText_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 128 case 138: { input.readMessage( getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 138 case 146: @@ -1774,9 +1852,16 @@ public Builder mergeFrom( input.readMessage( getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 146 + case 154: + { + input.readMessage( + getEndpointingTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4187,7 +4272,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4201,7 +4286,7 @@ public boolean hasNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4221,7 +4306,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4243,7 +4328,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4262,7 +4347,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration.Builder builderFo * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4287,7 +4372,7 @@ public Builder mergeNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4306,7 +4391,7 @@ public Builder clearNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4320,7 +4405,7 @@ public com.google.protobuf.Duration.Builder getNoSpeechTimeoutBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4338,7 +4423,7 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4360,6 +4445,189 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { return noSpeechTimeoutBuilder_; } + private com.google.protobuf.Duration endpointingTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endpointingTimeoutBuilder_; + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + public boolean hasEndpointingTimeout() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + public com.google.protobuf.Duration getEndpointingTimeout() { + if (endpointingTimeoutBuilder_ == null) { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } else { + return endpointingTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointingTimeout_ = value; + } else { + endpointingTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeout_ = builderForValue.build(); + } else { + endpointingTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder mergeEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && endpointingTimeout_ != null + && endpointingTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndpointingTimeoutBuilder().mergeFrom(value); + } else { + endpointingTimeout_ = value; + } + } else { + endpointingTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder clearEndpointingTimeout() { + bitField0_ = (bitField0_ & ~0x00004000); + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.Duration.Builder getEndpointingTimeoutBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getEndpointingTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + if (endpointingTimeoutBuilder_ != null) { + return endpointingTimeoutBuilder_.getMessageOrBuilder(); + } else { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndpointingTimeoutFieldBuilder() { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndpointingTimeout(), getParentForChildren(), isClean()); + endpointingTimeout_ = null; + } + return endpointingTimeoutBuilder_; + } + private boolean isInputText_; /** * @@ -4391,7 +4659,7 @@ public boolean getIsInputText() { public Builder setIsInputText(boolean value) { isInputText_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4407,7 +4675,7 @@ public Builder setIsInputText(boolean value) { * @return This builder for chaining. */ public Builder clearIsInputText() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); isInputText_ = false; onChanged(); return this; @@ -4431,7 +4699,7 @@ public Builder clearIsInputText() { * @return Whether the clientHalfCloseTimeOffset field is set. */ public boolean hasClientHalfCloseTimeOffset() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4471,7 +4739,7 @@ public Builder setClientHalfCloseTimeOffset(com.google.protobuf.Duration value) } else { clientHalfCloseTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4491,7 +4759,7 @@ public Builder setClientHalfCloseTimeOffset( } else { clientHalfCloseTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4506,7 +4774,7 @@ public Builder setClientHalfCloseTimeOffset( */ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && clientHalfCloseTimeOffset_ != null && clientHalfCloseTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { getClientHalfCloseTimeOffsetBuilder().mergeFrom(value); @@ -4516,7 +4784,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value } else { clientHalfCloseTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4530,7 +4798,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value * .google.protobuf.Duration client_half_close_time_offset = 17; */ public Builder clearClientHalfCloseTimeOffset() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { clientHalfCloseTimeOffsetBuilder_.dispose(); @@ -4549,7 +4817,7 @@ public Builder clearClientHalfCloseTimeOffset() { * .google.protobuf.Duration client_half_close_time_offset = 17; */ public com.google.protobuf.Duration.Builder getClientHalfCloseTimeOffsetBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(); } @@ -4615,7 +4883,7 @@ public com.google.protobuf.DurationOrBuilder getClientHalfCloseTimeOffsetOrBuild * @return Whether the clientHalfCloseStreamingTimeOffset field is set. */ public boolean hasClientHalfCloseStreamingTimeOffset() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4655,7 +4923,7 @@ public Builder setClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duratio } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4675,7 +4943,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4690,7 +4958,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( */ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseStreamingTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && clientHalfCloseStreamingTimeOffset_ != null && clientHalfCloseStreamingTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { @@ -4701,7 +4969,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat } else { clientHalfCloseStreamingTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4715,7 +4983,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public Builder clearClientHalfCloseStreamingTimeOffset() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); clientHalfCloseStreamingTimeOffset_ = null; if (clientHalfCloseStreamingTimeOffsetBuilder_ != null) { clientHalfCloseStreamingTimeOffsetBuilder_.dispose(); @@ -4734,7 +5002,7 @@ public Builder clearClientHalfCloseStreamingTimeOffset() { * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public com.google.protobuf.Duration.Builder getClientHalfCloseStreamingTimeOffsetBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfoOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfoOrBuilder.java index 4aaaada437bc..3b494346228a 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfoOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CloudConversationDebuggingInfoOrBuilder.java @@ -446,7 +446,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -458,7 +458,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -470,13 +470,48 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; */ com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + boolean hasEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + com.google.protobuf.Duration getEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder(); + /** * * diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProfileProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProfileProto.java index d06eecf79a10..94858f564abf 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProfileProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProfileProto.java @@ -200,7 +200,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "versation_profile}\"\205\001\n\024AutomatedAgentCon" + "fig\0227\n\005agent\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow." + "googleapis.com/Agent\0224\n\013session_ttl\030\003 \001(" - + "\0132\031.google.protobuf.DurationB\004\342A\001\001\"\274\026\n\031H" + + "\0132\031.google.protobuf.DurationB\004\342A\001\001\"\347\026\n\031H" + "umanAgentAssistantConfig\022P\n\023notification" + "_config\030\002 \001(\01323.google.cloud.dialogflow." + "v2beta1.NotificationConfig\022r\n\035human_agen" @@ -214,214 +214,215 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "a1.HumanAgentAssistantConfig.MessageAnal" + "ysisConfig\032I\n\031SuggestionTriggerSettings\022" + "\025\n\rno_small_talk\030\001 \001(\010\022\025\n\ronly_end_user\030" - + "\002 \001(\010\032\345\004\n\027SuggestionFeatureConfig\022N\n\022sug" + + "\002 \001(\010\032\220\005\n\027SuggestionFeatureConfig\022N\n\022sug" + "gestion_feature\030\005 \001(\01322.google.cloud.dia" + "logflow.v2beta1.SuggestionFeature\022%\n\035ena" - + "ble_event_based_suggestion\030\003 \001(\010\022y\n\033sugg" - + "estion_trigger_settings\030\n \001(\0132T.google.c" - + "loud.dialogflow.v2beta1.HumanAgentAssist" - + "antConfig.SuggestionTriggerSettings\022f\n\014q" - + "uery_config\030\006 \001(\0132P.google.cloud.dialogf" - + "low.v2beta1.HumanAgentAssistantConfig.Su" - + "ggestionQueryConfig\022u\n\031conversation_mode" - + "l_config\030\007 \001(\0132R.google.cloud.dialogflow" - + ".v2beta1.HumanAgentAssistantConfig.Conve" - + "rsationModelConfig\022y\n\033conversation_proce" - + "ss_config\030\010 \001(\0132T.google.cloud.dialogflo" - + "w.v2beta1.HumanAgentAssistantConfig.Conv" - + "ersationProcessConfig\032\243\001\n\020SuggestionConf" - + "ig\022k\n\017feature_configs\030\002 \003(\0132R.google.clo" - + "ud.dialogflow.v2beta1.HumanAgentAssistan" - + "tConfig.SuggestionFeatureConfig\022\"\n\032group" - + "_suggestion_responses\030\003 \001(\010\032\204\n\n\025Suggesti" - + "onQueryConfig\022\220\001\n\033knowledge_base_query_s" - + "ource\030\001 \001(\0132i.google.cloud.dialogflow.v2" - + "beta1.HumanAgentAssistantConfig.Suggesti" - + "onQueryConfig.KnowledgeBaseQuerySourceH\000" - + "\022\205\001\n\025document_query_source\030\002 \001(\0132d.googl" + + "ble_event_based_suggestion\030\003 \001(\010\022)\n\033disa" + + "ble_agent_query_logging\030\016 \001(\010B\004\342A\001\001\022y\n\033s" + + "uggestion_trigger_settings\030\n \001(\0132T.googl" + "e.cloud.dialogflow.v2beta1.HumanAgentAss" - + "istantConfig.SuggestionQueryConfig.Docum" - + "entQuerySourceH\000\022\211\001\n\027dialogflow_query_so" - + "urce\030\003 \001(\0132f.google.cloud.dialogflow.v2b" - + "eta1.HumanAgentAssistantConfig.Suggestio" - + "nQueryConfig.DialogflowQuerySourceH\000\022\023\n\013" - + "max_results\030\004 \001(\005\022\034\n\024confidence_threshol" - + "d\030\005 \001(\002\022\207\001\n\027context_filter_settings\030\007 \001(" - + "\0132f.google.cloud.dialogflow.v2beta1.Huma" - + "nAgentAssistantConfig.SuggestionQueryCon" - + "fig.ContextFilterSettings\032e\n\030KnowledgeBa" - + "seQuerySource\022I\n\017knowledge_bases\030\001 \003(\tB0" - + "\342A\001\002\372A)\n\'dialogflow.googleapis.com/Knowl" - + "edgeBase\032U\n\023DocumentQuerySource\022>\n\tdocum" - + "ents\030\001 \003(\tB+\342A\001\002\372A$\n\"dialogflow.googleap" - + "is.com/Document\032\300\002\n\025DialogflowQuerySourc" - + "e\0227\n\005agent\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.go" - + "ogleapis.com/Agent\022\234\001\n\027human_agent_side_" - + "config\030\003 \001(\0132{.google.cloud.dialogflow.v" - + "2beta1.HumanAgentAssistantConfig.Suggest" - + "ionQueryConfig.DialogflowQuerySource.Hum" - + "anAgentSideConfig\032O\n\024HumanAgentSideConfi" - + "g\0227\n\005agent\030\001 \001(\tB(\342A\001\001\372A!\n\037dialogflow.go" - + "ogleapis.com/Agent\032v\n\025ContextFilterSetti" - + "ngs\022\035\n\025drop_handoff_messages\030\001 \001(\010\022#\n\033dr" - + "op_virtual_agent_messages\030\002 \001(\010\022\031\n\021drop_" - + "ivr_messages\030\003 \001(\010B\016\n\014query_source\032z\n\027Co" - + "nversationModelConfig\022?\n\005model\030\001 \001(\tB0\372A" - + "-\n+dialogflow.googleapis.com/Conversatio" - + "nModel\022\036\n\026baseline_model_version\030\010 \001(\t\032;" - + "\n\031ConversationProcessConfig\022\036\n\026recent_se" - + "ntences_count\030\002 \001(\005\032\\\n\025MessageAnalysisCo" - + "nfig\022 \n\030enable_entity_extraction\030\002 \001(\010\022!" - + "\n\031enable_sentiment_analysis\030\003 \001(\010\"\323\003\n\027Hu" - + "manAgentHandoffConfig\022g\n\022live_person_con" - + "fig\030\001 \001(\0132I.google.cloud.dialogflow.v2be" - + "ta1.HumanAgentHandoffConfig.LivePersonCo" - + "nfigH\000\022z\n\034salesforce_live_agent_config\030\002" - + " \001(\0132R.google.cloud.dialogflow.v2beta1.H" - + "umanAgentHandoffConfig.SalesforceLiveAge" - + "ntConfigH\000\0320\n\020LivePersonConfig\022\034\n\016accoun" - + "t_number\030\001 \001(\tB\004\342A\001\002\032\217\001\n\031SalesforceLiveA" - + "gentConfig\022\035\n\017organization_id\030\001 \001(\tB\004\342A\001" - + "\002\022\033\n\rdeployment_id\030\002 \001(\tB\004\342A\001\002\022\027\n\tbutton" - + "_id\030\003 \001(\tB\004\342A\001\002\022\035\n\017endpoint_domain\030\004 \001(\t" - + "B\004\342A\001\002B\017\n\ragent_service\"\304\001\n\022Notification" - + "Config\022\r\n\005topic\030\001 \001(\t\022Y\n\016message_format\030" - + "\002 \001(\0162A.google.cloud.dialogflow.v2beta1." - + "NotificationConfig.MessageFormat\"D\n\rMess" - + "ageFormat\022\036\n\032MESSAGE_FORMAT_UNSPECIFIED\020" - + "\000\022\t\n\005PROTO\020\001\022\010\n\004JSON\020\002\"3\n\rLoggingConfig\022" - + "\"\n\032enable_stackdriver_logging\030\003 \001(\010\"\220\001\n\037" - + "ListConversationProfilesRequest\022F\n\006paren" - + "t\030\001 \001(\tB6\342A\001\002\372A/\022-dialogflow.googleapis." - + "com/ConversationProfile\022\021\n\tpage_size\030\002 \001" - + "(\005\022\022\n\npage_token\030\003 \001(\t\"\220\001\n ListConversat" - + "ionProfilesResponse\022S\n\025conversation_prof" - + "iles\030\001 \003(\01324.google.cloud.dialogflow.v2b" - + "eta1.ConversationProfile\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"e\n\035GetConversationProfileReque" - + "st\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-dialogflow.go" - + "ogleapis.com/ConversationProfile\"\304\001\n Cre" - + "ateConversationProfileRequest\022F\n\006parent\030" - + "\001 \001(\tB6\342A\001\002\372A/\022-dialogflow.googleapis.co" - + "m/ConversationProfile\022X\n\024conversation_pr" - + "ofile\030\002 \001(\01324.google.cloud.dialogflow.v2" - + "beta1.ConversationProfileB\004\342A\001\002\"\263\001\n Upda" - + "teConversationProfileRequest\022X\n\024conversa" - + "tion_profile\030\001 \001(\01324.google.cloud.dialog" - + "flow.v2beta1.ConversationProfileB\004\342A\001\002\0225" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMaskB\004\342A\001\002\"h\n DeleteConversationProfi" - + "leRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-dialog" - + "flow.googleapis.com/ConversationProfile\"" - + "\227\002\n!SetSuggestionFeatureConfigRequest\022\"\n" - + "\024conversation_profile\030\001 \001(\tB\004\342A\001\002\022Q\n\020par" - + "ticipant_role\030\002 \001(\01621.google.cloud.dialo" - + "gflow.v2beta1.Participant.RoleB\004\342A\001\002\022{\n\031" - + "suggestion_feature_config\030\003 \001(\0132R.google" - + ".cloud.dialogflow.v2beta1.HumanAgentAssi" - + "stantConfig.SuggestionFeatureConfigB\004\342A\001" - + "\002\"\374\001\n#ClearSuggestionFeatureConfigReques" - + "t\022\"\n\024conversation_profile\030\001 \001(\tB\004\342A\001\002\022Q\n" - + "\020participant_role\030\002 \001(\01621.google.cloud.d" - + "ialogflow.v2beta1.Participant.RoleB\004\342A\001\002" - + "\022^\n\027suggestion_feature_type\030\003 \001(\01627.goog" - + "le.cloud.dialogflow.v2beta1.SuggestionFe" - + "ature.TypeB\004\342A\001\002\"\257\002\n+SetSuggestionFeatur" - + "eConfigOperationMetadata\022\034\n\024conversation" - + "_profile\030\001 \001(\t\022Q\n\020participant_role\030\002 \001(\016" - + "21.google.cloud.dialogflow.v2beta1.Parti" - + "cipant.RoleB\004\342A\001\002\022^\n\027suggestion_feature_" - + "type\030\003 \001(\01627.google.cloud.dialogflow.v2b" - + "eta1.SuggestionFeature.TypeB\004\342A\001\002\022/\n\013cre" - + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" - + "mp\"\261\002\n-ClearSuggestionFeatureConfigOpera" - + "tionMetadata\022\034\n\024conversation_profile\030\001 \001" - + "(\t\022Q\n\020participant_role\030\002 \001(\01621.google.cl" - + "oud.dialogflow.v2beta1.Participant.RoleB" - + "\004\342A\001\002\022^\n\027suggestion_feature_type\030\003 \001(\01627" - + ".google.cloud.dialogflow.v2beta1.Suggest" - + "ionFeature.TypeB\004\342A\001\002\022/\n\013create_time\030\004 \001" - + "(\0132\032.google.protobuf.Timestamp2\263\025\n\024Conve" - + "rsationProfiles\022\245\002\n\030ListConversationProf" - + "iles\022@.google.cloud.dialogflow.v2beta1.L" - + "istConversationProfilesRequest\032A.google." - + "cloud.dialogflow.v2beta1.ListConversatio" - + "nProfilesResponse\"\203\001\332A\006parent\202\323\344\223\002t\0221/v2" - + "beta1/{parent=projects/*}/conversationPr" - + "ofilesZ?\022=/v2beta1/{parent=projects/*/lo" - + "cations/*}/conversationProfiles\022\222\002\n\026GetC" - + "onversationProfile\022>.google.cloud.dialog" - + "flow.v2beta1.GetConversationProfileReque" - + "st\0324.google.cloud.dialogflow.v2beta1.Con" - + "versationProfile\"\201\001\332A\004name\202\323\344\223\002t\0221/v2bet" - + "a1/{name=projects/*/conversationProfiles" - + "/*}Z?\022=/v2beta1/{name=projects/*/locatio" - + "ns/*/conversationProfiles/*}\022\334\002\n\031CreateC" - + "onversationProfile\022A.google.cloud.dialog" - + "flow.v2beta1.CreateConversationProfileRe" + + "istantConfig.SuggestionTriggerSettings\022f" + + "\n\014query_config\030\006 \001(\0132P.google.cloud.dial" + + "ogflow.v2beta1.HumanAgentAssistantConfig" + + ".SuggestionQueryConfig\022u\n\031conversation_m" + + "odel_config\030\007 \001(\0132R.google.cloud.dialogf" + + "low.v2beta1.HumanAgentAssistantConfig.Co" + + "nversationModelConfig\022y\n\033conversation_pr" + + "ocess_config\030\010 \001(\0132T.google.cloud.dialog" + + "flow.v2beta1.HumanAgentAssistantConfig.C" + + "onversationProcessConfig\032\243\001\n\020SuggestionC" + + "onfig\022k\n\017feature_configs\030\002 \003(\0132R.google." + + "cloud.dialogflow.v2beta1.HumanAgentAssis" + + "tantConfig.SuggestionFeatureConfig\022\"\n\032gr" + + "oup_suggestion_responses\030\003 \001(\010\032\204\n\n\025Sugge" + + "stionQueryConfig\022\220\001\n\033knowledge_base_quer" + + "y_source\030\001 \001(\0132i.google.cloud.dialogflow" + + ".v2beta1.HumanAgentAssistantConfig.Sugge" + + "stionQueryConfig.KnowledgeBaseQuerySourc" + + "eH\000\022\205\001\n\025document_query_source\030\002 \001(\0132d.go" + + "ogle.cloud.dialogflow.v2beta1.HumanAgent" + + "AssistantConfig.SuggestionQueryConfig.Do" + + "cumentQuerySourceH\000\022\211\001\n\027dialogflow_query" + + "_source\030\003 \001(\0132f.google.cloud.dialogflow." + + "v2beta1.HumanAgentAssistantConfig.Sugges" + + "tionQueryConfig.DialogflowQuerySourceH\000\022" + + "\023\n\013max_results\030\004 \001(\005\022\034\n\024confidence_thres" + + "hold\030\005 \001(\002\022\207\001\n\027context_filter_settings\030\007" + + " \001(\0132f.google.cloud.dialogflow.v2beta1.H" + + "umanAgentAssistantConfig.SuggestionQuery" + + "Config.ContextFilterSettings\032e\n\030Knowledg" + + "eBaseQuerySource\022I\n\017knowledge_bases\030\001 \003(" + + "\tB0\342A\001\002\372A)\n\'dialogflow.googleapis.com/Kn" + + "owledgeBase\032U\n\023DocumentQuerySource\022>\n\tdo" + + "cuments\030\001 \003(\tB+\342A\001\002\372A$\n\"dialogflow.googl" + + "eapis.com/Document\032\300\002\n\025DialogflowQuerySo" + + "urce\0227\n\005agent\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow" + + ".googleapis.com/Agent\022\234\001\n\027human_agent_si" + + "de_config\030\003 \001(\0132{.google.cloud.dialogflo" + + "w.v2beta1.HumanAgentAssistantConfig.Sugg" + + "estionQueryConfig.DialogflowQuerySource." + + "HumanAgentSideConfig\032O\n\024HumanAgentSideCo" + + "nfig\0227\n\005agent\030\001 \001(\tB(\342A\001\001\372A!\n\037dialogflow" + + ".googleapis.com/Agent\032v\n\025ContextFilterSe" + + "ttings\022\035\n\025drop_handoff_messages\030\001 \001(\010\022#\n" + + "\033drop_virtual_agent_messages\030\002 \001(\010\022\031\n\021dr" + + "op_ivr_messages\030\003 \001(\010B\016\n\014query_source\032z\n" + + "\027ConversationModelConfig\022?\n\005model\030\001 \001(\tB" + + "0\372A-\n+dialogflow.googleapis.com/Conversa" + + "tionModel\022\036\n\026baseline_model_version\030\010 \001(" + + "\t\032;\n\031ConversationProcessConfig\022\036\n\026recent" + + "_sentences_count\030\002 \001(\005\032\\\n\025MessageAnalysi" + + "sConfig\022 \n\030enable_entity_extraction\030\002 \001(" + + "\010\022!\n\031enable_sentiment_analysis\030\003 \001(\010\"\323\003\n" + + "\027HumanAgentHandoffConfig\022g\n\022live_person_" + + "config\030\001 \001(\0132I.google.cloud.dialogflow.v" + + "2beta1.HumanAgentHandoffConfig.LivePerso" + + "nConfigH\000\022z\n\034salesforce_live_agent_confi" + + "g\030\002 \001(\0132R.google.cloud.dialogflow.v2beta" + + "1.HumanAgentHandoffConfig.SalesforceLive" + + "AgentConfigH\000\0320\n\020LivePersonConfig\022\034\n\016acc" + + "ount_number\030\001 \001(\tB\004\342A\001\002\032\217\001\n\031SalesforceLi" + + "veAgentConfig\022\035\n\017organization_id\030\001 \001(\tB\004" + + "\342A\001\002\022\033\n\rdeployment_id\030\002 \001(\tB\004\342A\001\002\022\027\n\tbut" + + "ton_id\030\003 \001(\tB\004\342A\001\002\022\035\n\017endpoint_domain\030\004 " + + "\001(\tB\004\342A\001\002B\017\n\ragent_service\"\304\001\n\022Notificat" + + "ionConfig\022\r\n\005topic\030\001 \001(\t\022Y\n\016message_form" + + "at\030\002 \001(\0162A.google.cloud.dialogflow.v2bet" + + "a1.NotificationConfig.MessageFormat\"D\n\rM" + + "essageFormat\022\036\n\032MESSAGE_FORMAT_UNSPECIFI" + + "ED\020\000\022\t\n\005PROTO\020\001\022\010\n\004JSON\020\002\"3\n\rLoggingConf" + + "ig\022\"\n\032enable_stackdriver_logging\030\003 \001(\010\"\220" + + "\001\n\037ListConversationProfilesRequest\022F\n\006pa" + + "rent\030\001 \001(\tB6\342A\001\002\372A/\022-dialogflow.googleap" + + "is.com/ConversationProfile\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\220\001\n ListConver" + + "sationProfilesResponse\022S\n\025conversation_p" + + "rofiles\030\001 \003(\01324.google.cloud.dialogflow." + + "v2beta1.ConversationProfile\022\027\n\017next_page" + + "_token\030\002 \001(\t\"e\n\035GetConversationProfileRe" + + "quest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-dialogflow" + + ".googleapis.com/ConversationProfile\"\304\001\n " + + "CreateConversationProfileRequest\022F\n\006pare" + + "nt\030\001 \001(\tB6\342A\001\002\372A/\022-dialogflow.googleapis" + + ".com/ConversationProfile\022X\n\024conversation" + + "_profile\030\002 \001(\01324.google.cloud.dialogflow" + + ".v2beta1.ConversationProfileB\004\342A\001\002\"\263\001\n U" + + "pdateConversationProfileRequest\022X\n\024conve" + + "rsation_profile\030\001 \001(\01324.google.cloud.dia" + + "logflow.v2beta1.ConversationProfileB\004\342A\001" + + "\002\0225\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + + ".FieldMaskB\004\342A\001\002\"h\n DeleteConversationPr" + + "ofileRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-dia" + + "logflow.googleapis.com/ConversationProfi" + + "le\"\227\002\n!SetSuggestionFeatureConfigRequest" + + "\022\"\n\024conversation_profile\030\001 \001(\tB\004\342A\001\002\022Q\n\020" + + "participant_role\030\002 \001(\01621.google.cloud.di" + + "alogflow.v2beta1.Participant.RoleB\004\342A\001\002\022" + + "{\n\031suggestion_feature_config\030\003 \001(\0132R.goo" + + "gle.cloud.dialogflow.v2beta1.HumanAgentA" + + "ssistantConfig.SuggestionFeatureConfigB\004" + + "\342A\001\002\"\374\001\n#ClearSuggestionFeatureConfigReq" + + "uest\022\"\n\024conversation_profile\030\001 \001(\tB\004\342A\001\002" + + "\022Q\n\020participant_role\030\002 \001(\01621.google.clou" + + "d.dialogflow.v2beta1.Participant.RoleB\004\342" + + "A\001\002\022^\n\027suggestion_feature_type\030\003 \001(\01627.g" + + "oogle.cloud.dialogflow.v2beta1.Suggestio" + + "nFeature.TypeB\004\342A\001\002\"\257\002\n+SetSuggestionFea" + + "tureConfigOperationMetadata\022\034\n\024conversat" + + "ion_profile\030\001 \001(\t\022Q\n\020participant_role\030\002 " + + "\001(\01621.google.cloud.dialogflow.v2beta1.Pa" + + "rticipant.RoleB\004\342A\001\002\022^\n\027suggestion_featu" + + "re_type\030\003 \001(\01627.google.cloud.dialogflow." + + "v2beta1.SuggestionFeature.TypeB\004\342A\001\002\022/\n\013" + + "create_time\030\004 \001(\0132\032.google.protobuf.Time" + + "stamp\"\261\002\n-ClearSuggestionFeatureConfigOp" + + "erationMetadata\022\034\n\024conversation_profile\030" + + "\001 \001(\t\022Q\n\020participant_role\030\002 \001(\01621.google" + + ".cloud.dialogflow.v2beta1.Participant.Ro" + + "leB\004\342A\001\002\022^\n\027suggestion_feature_type\030\003 \001(" + + "\01627.google.cloud.dialogflow.v2beta1.Sugg" + + "estionFeature.TypeB\004\342A\001\002\022/\n\013create_time\030" + + "\004 \001(\0132\032.google.protobuf.Timestamp2\263\025\n\024Co" + + "nversationProfiles\022\245\002\n\030ListConversationP" + + "rofiles\022@.google.cloud.dialogflow.v2beta" + + "1.ListConversationProfilesRequest\032A.goog" + + "le.cloud.dialogflow.v2beta1.ListConversa" + + "tionProfilesResponse\"\203\001\332A\006parent\202\323\344\223\002t\0221" + + "/v2beta1/{parent=projects/*}/conversatio" + + "nProfilesZ?\022=/v2beta1/{parent=projects/*" + + "/locations/*}/conversationProfiles\022\222\002\n\026G" + + "etConversationProfile\022>.google.cloud.dia" + + "logflow.v2beta1.GetConversationProfileRe" + "quest\0324.google.cloud.dialogflow.v2beta1." - + "ConversationProfile\"\305\001\332A\033parent,conversa" - + "tion_profile\202\323\344\223\002\240\001\"1/v2beta1/{parent=pr" - + "ojects/*}/conversationProfiles:\024conversa" - + "tion_profileZU\"=/v2beta1/{parent=project" - + "s/*/locations/*}/conversationProfiles:\024c" - + "onversation_profile\022\213\003\n\031UpdateConversati" - + "onProfile\022A.google.cloud.dialogflow.v2be" - + "ta1.UpdateConversationProfileRequest\0324.g" - + "oogle.cloud.dialogflow.v2beta1.Conversat" - + "ionProfile\"\364\001\332A conversation_profile,upd" - + "ate_mask\202\323\344\223\002\312\0012F/v2beta1/{conversation_" - + "profile.name=projects/*/conversationProf" - + "iles/*}:\024conversation_profileZj2R/v2beta" - + "1/{conversation_profile.name=projects/*/" - + "locations/*/conversationProfiles/*}:\024con" - + "versation_profile\022\372\001\n\031DeleteConversation" - + "Profile\022A.google.cloud.dialogflow.v2beta" - + "1.DeleteConversationProfileRequest\032\026.goo" - + "gle.protobuf.Empty\"\201\001\332A\004name\202\323\344\223\002t*1/v2b" - + "eta1/{name=projects/*/conversationProfil" - + "es/*}Z?*=/v2beta1/{name=projects/*/locat" - + "ions/*/conversationProfiles/*}\022\367\003\n\032SetSu" - + "ggestionFeatureConfig\022B.google.cloud.dia" - + "logflow.v2beta1.SetSuggestionFeatureConf" - + "igRequest\032\035.google.longrunning.Operation" - + "\"\365\002\312AB\n\023ConversationProfile\022+SetSuggesti" - + "onFeatureConfigOperationMetadata\332A\024conve" - + "rsation_profile\332A?conversation_profile,p" - + "articipant_role,suggestion_feature_confi" - + "g\202\323\344\223\002\320\001\"\\/v2beta1/{conversation_profile" - + "=projects/*/conversationProfiles/*}:setS" - + "uggestionFeatureConfig:\001*Zm\"h/v2beta1/{c" - + "onversation_profile=projects/*/locations" - + "/*/conversationProfiles/*}:setSuggestion" - + "FeatureConfig:\001*\022\377\003\n\034ClearSuggestionFeat" - + "ureConfig\022D.google.cloud.dialogflow.v2be" - + "ta1.ClearSuggestionFeatureConfigRequest\032" - + "\035.google.longrunning.Operation\"\371\002\312AD\n\023Co" - + "nversationProfile\022-ClearSuggestionFeatur" - + "eConfigOperationMetadata\332A\024conversation_" - + "profile\332A=conversation_profile,participa" - + "nt_role,suggestion_feature_type\202\323\344\223\002\324\001\"^" - + "/v2beta1/{conversation_profile=projects/" - + "*/conversationProfiles/*}:clearSuggestio" - + "nFeatureConfig:\001*Zo\"j/v2beta1/{conversat" - + "ion_profile=projects/*/locations/*/conve" - + "rsationProfiles/*}:clearSuggestionFeatur" - + "eConfig:\001*\032x\312A\031dialogflow.googleapis.com" - + "\322AYhttps://www.googleapis.com/auth/cloud" - + "-platform,https://www.googleapis.com/aut" - + "h/dialogflowB\260\003\n#com.google.cloud.dialog" - + "flow.v2beta1B\030ConversationProfileProtoP\001" - + "ZCcloud.google.com/go/dialogflow/apiv2be" - + "ta1/dialogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\037" - + "Google.Cloud.Dialogflow.V2Beta1\352A|\n,dial" - + "ogflow.googleapis.com/CXSecuritySettings" - + "\022Lprojects/{project}/locations/{location" - + "}/securitySettings/{security_settings}\352A" - + "~\n+dialogflow.googleapis.com/Conversatio" - + "nModel\022Oprojects/{project}/locations/{lo" - + "cation}/conversationModels/{conversation" - + "_model}b\006proto3" + + "ConversationProfile\"\201\001\332A\004name\202\323\344\223\002t\0221/v2" + + "beta1/{name=projects/*/conversationProfi" + + "les/*}Z?\022=/v2beta1/{name=projects/*/loca" + + "tions/*/conversationProfiles/*}\022\334\002\n\031Crea" + + "teConversationProfile\022A.google.cloud.dia" + + "logflow.v2beta1.CreateConversationProfil" + + "eRequest\0324.google.cloud.dialogflow.v2bet" + + "a1.ConversationProfile\"\305\001\332A\033parent,conve" + + "rsation_profile\202\323\344\223\002\240\001\"1/v2beta1/{parent" + + "=projects/*}/conversationProfiles:\024conve" + + "rsation_profileZU\"=/v2beta1/{parent=proj" + + "ects/*/locations/*}/conversationProfiles" + + ":\024conversation_profile\022\213\003\n\031UpdateConvers" + + "ationProfile\022A.google.cloud.dialogflow.v" + + "2beta1.UpdateConversationProfileRequest\032" + + "4.google.cloud.dialogflow.v2beta1.Conver" + + "sationProfile\"\364\001\332A conversation_profile," + + "update_mask\202\323\344\223\002\312\0012F/v2beta1/{conversati" + + "on_profile.name=projects/*/conversationP" + + "rofiles/*}:\024conversation_profileZj2R/v2b" + + "eta1/{conversation_profile.name=projects" + + "/*/locations/*/conversationProfiles/*}:\024" + + "conversation_profile\022\372\001\n\031DeleteConversat" + + "ionProfile\022A.google.cloud.dialogflow.v2b" + + "eta1.DeleteConversationProfileRequest\032\026." + + "google.protobuf.Empty\"\201\001\332A\004name\202\323\344\223\002t*1/" + + "v2beta1/{name=projects/*/conversationPro" + + "files/*}Z?*=/v2beta1/{name=projects/*/lo" + + "cations/*/conversationProfiles/*}\022\367\003\n\032Se" + + "tSuggestionFeatureConfig\022B.google.cloud." + + "dialogflow.v2beta1.SetSuggestionFeatureC" + + "onfigRequest\032\035.google.longrunning.Operat" + + "ion\"\365\002\312AB\n\023ConversationProfile\022+SetSugge" + + "stionFeatureConfigOperationMetadata\332A\024co" + + "nversation_profile\332A?conversation_profil" + + "e,participant_role,suggestion_feature_co" + + "nfig\202\323\344\223\002\320\001\"\\/v2beta1/{conversation_prof" + + "ile=projects/*/conversationProfiles/*}:s" + + "etSuggestionFeatureConfig:\001*Zm\"h/v2beta1" + + "/{conversation_profile=projects/*/locati" + + "ons/*/conversationProfiles/*}:setSuggest" + + "ionFeatureConfig:\001*\022\377\003\n\034ClearSuggestionF" + + "eatureConfig\022D.google.cloud.dialogflow.v" + + "2beta1.ClearSuggestionFeatureConfigReque" + + "st\032\035.google.longrunning.Operation\"\371\002\312AD\n" + + "\023ConversationProfile\022-ClearSuggestionFea" + + "tureConfigOperationMetadata\332A\024conversati" + + "on_profile\332A=conversation_profile,partic" + + "ipant_role,suggestion_feature_type\202\323\344\223\002\324" + + "\001\"^/v2beta1/{conversation_profile=projec" + + "ts/*/conversationProfiles/*}:clearSugges" + + "tionFeatureConfig:\001*Zo\"j/v2beta1/{conver" + + "sation_profile=projects/*/locations/*/co" + + "nversationProfiles/*}:clearSuggestionFea" + + "tureConfig:\001*\032x\312A\031dialogflow.googleapis." + + "com\322AYhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/" + + "auth/dialogflowB\260\003\n#com.google.cloud.dia" + + "logflow.v2beta1B\030ConversationProfileProt" + + "oP\001ZCcloud.google.com/go/dialogflow/apiv" + + "2beta1/dialogflowpb;dialogflowpb\370\001\001\242\002\002DF" + + "\252\002\037Google.Cloud.Dialogflow.V2Beta1\352A|\n,d" + + "ialogflow.googleapis.com/CXSecuritySetti" + + "ngs\022Lprojects/{project}/locations/{locat" + + "ion}/securitySettings/{security_settings" + + "}\352A~\n+dialogflow.googleapis.com/Conversa" + + "tionModel\022Oprojects/{project}/locations/" + + "{location}/conversationModels/{conversat" + + "ion_model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -500,6 +501,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SuggestionFeature", "EnableEventBasedSuggestion", + "DisableAgentQueryLogging", "SuggestionTriggerSettings", "QueryConfig", "ConversationModelConfig", diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java index 417decfc03d3..33db24ace5c2 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java @@ -111,6 +111,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2beta1_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2beta1_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -127,174 +143,209 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ehavior.proto\032\031google/api/resource.proto" + "\032:google/cloud/dialogflow/v2beta1/conver" + "sation_profile.proto\0321google/cloud/dialo" - + "gflow/v2beta1/participant.proto\032\037google/" - + "protobuf/timestamp.proto\"\325\006\n\014Conversatio" - + "n\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022[\n\017lifecycle_state" - + "\030\002 \001(\0162<.google.cloud.dialogflow.v2beta1" - + ".Conversation.LifecycleStateB\004\342A\001\003\022T\n\024co" - + "nversation_profile\030\003 \001(\tB6\342A\001\002\372A/\n-dialo" - + "gflow.googleapis.com/ConversationProfile" - + "\022T\n\014phone_number\030\004 \001(\01328.google.cloud.di" - + "alogflow.v2beta1.ConversationPhoneNumber" - + "B\004\342A\001\003\022[\n\022conversation_stage\030\007 \001(\0162?.goo" - + "gle.cloud.dialogflow.v2beta1.Conversatio" - + "n.ConversationStage\0224\n\nstart_time\030\005 \001(\0132" - + "\032.google.protobuf.TimestampB\004\342A\001\003\0222\n\010end" - + "_time\030\006 \001(\0132\032.google.protobuf.TimestampB" - + "\004\342A\001\003\"Q\n\016LifecycleState\022\037\n\033LIFECYCLE_STA" - + "TE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\r\n\tCOM" - + "PLETED\020\002\"h\n\021ConversationStage\022\"\n\036CONVERS" - + "ATION_STAGE_UNSPECIFIED\020\000\022\027\n\023VIRTUAL_AGE" - + "NT_STAGE\020\001\022\026\n\022HUMAN_ASSIST_STAGE\020\002:\243\001\352A\237" - + "\001\n&dialogflow.googleapis.com/Conversatio" - + "n\022/projects/{project}/conversations/{con" - + "versation}\022Dprojects/{project}/locations" - + "/{location}/conversations/{conversation}" - + "\"5\n\027ConversationPhoneNumber\022\032\n\014phone_num" - + "ber\030\003 \001(\tB\004\342A\001\003\"\306\001\n\031CreateConversationRe" - + "quest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&dialogfl" - + "ow.googleapis.com/Conversation\022I\n\014conver" - + "sation\030\002 \001(\0132-.google.cloud.dialogflow.v" - + "2beta1.ConversationB\004\342A\001\002\022\035\n\017conversatio" - + "n_id\030\003 \001(\tB\004\342A\001\001\"\222\001\n\030ListConversationsRe" - + "quest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&dialogfl" - + "ow.googleapis.com/Conversation\022\021\n\tpage_s" - + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" - + "\004 \001(\t\"z\n\031ListConversationsResponse\022D\n\rco" - + "nversations\030\001 \003(\0132-.google.cloud.dialogf" - + "low.v2beta1.Conversation\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"W\n\026GetConversationRequest\022=\n\004n" - + "ame\030\001 \001(\tB/\342A\001\002\372A(\n&dialogflow.googleapi" - + "s.com/Conversation\"\\\n\033CompleteConversati" - + "onRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&dialog" - + "flow.googleapis.com/Conversation\"\230\001\n\024Cre" - + "ateMessageRequest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372" - + "A(\n&dialogflow.googleapis.com/Conversati" - + "on\022?\n\007message\030\002 \001(\0132(.google.cloud.dialo" - + "gflow.v2beta1.MessageB\004\342A\001\002\"\254\001\n\032BatchCre" - + "ateMessagesRequest\022?\n\006parent\030\001 \001(\tB/\342A\001\002" - + "\372A(\n&dialogflow.googleapis.com/Conversat" - + "ion\022M\n\010requests\030\002 \003(\01325.google.cloud.dia" - + "logflow.v2beta1.CreateMessageRequestB\004\342A" - + "\001\002\"Y\n\033BatchCreateMessagesResponse\022:\n\010mes" - + "sages\030\001 \003(\0132(.google.cloud.dialogflow.v2" - + "beta1.Message\"\210\001\n\023ListMessagesRequest\022:\n" - + "\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!dialogflow.googl" - + "eapis.com/Message\022\016\n\006filter\030\004 \001(\t\022\021\n\tpag" - + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\024List" - + "MessagesResponse\022:\n\010messages\030\001 \003(\0132(.goo" - + "gle.cloud.dialogflow.v2beta1.Message\022\027\n\017" - + "next_page_token\030\002 \001(\t\"\225\002\n!SuggestConvers" - + "ationSummaryRequest\022E\n\014conversation\030\001 \001(" + + "gflow/v2beta1/participant.proto\032-google/" + + "cloud/dialogflow/v2beta1/session.proto\032\037" + + "google/protobuf/timestamp.proto\"\325\006\n\014Conv" + + "ersation\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022[\n\017lifecycl" + + "e_state\030\002 \001(\0162<.google.cloud.dialogflow." + + "v2beta1.Conversation.LifecycleStateB\004\342A\001" + + "\003\022T\n\024conversation_profile\030\003 \001(\tB6\342A\001\002\372A/" + + "\n-dialogflow.googleapis.com/Conversation" + + "Profile\022T\n\014phone_number\030\004 \001(\01328.google.c" + + "loud.dialogflow.v2beta1.ConversationPhon" + + "eNumberB\004\342A\001\003\022[\n\022conversation_stage\030\007 \001(" + + "\0162?.google.cloud.dialogflow.v2beta1.Conv" + + "ersation.ConversationStage\0224\n\nstart_time" + + "\030\005 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\0222\n\010end_time\030\006 \001(\0132\032.google.protobuf.Tim" + + "estampB\004\342A\001\003\"Q\n\016LifecycleState\022\037\n\033LIFECY" + + "CLE_STATE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001" + + "\022\r\n\tCOMPLETED\020\002\"h\n\021ConversationStage\022\"\n\036" + + "CONVERSATION_STAGE_UNSPECIFIED\020\000\022\027\n\023VIRT" + + "UAL_AGENT_STAGE\020\001\022\026\n\022HUMAN_ASSIST_STAGE\020" + + "\002:\243\001\352A\237\001\n&dialogflow.googleapis.com/Conv" + + "ersation\022/projects/{project}/conversatio" + + "ns/{conversation}\022Dprojects/{project}/lo" + + "cations/{location}/conversations/{conver" + + "sation}\"5\n\027ConversationPhoneNumber\022\032\n\014ph" + + "one_number\030\003 \001(\tB\004\342A\001\003\"\306\001\n\031CreateConvers" + + "ationRequest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&d" + + "ialogflow.googleapis.com/Conversation\022I\n" + + "\014conversation\030\002 \001(\0132-.google.cloud.dialo" + + "gflow.v2beta1.ConversationB\004\342A\001\002\022\035\n\017conv" + + "ersation_id\030\003 \001(\tB\004\342A\001\001\"\222\001\n\030ListConversa" + + "tionsRequest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&d" + + "ialogflow.googleapis.com/Conversation\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006" + + "filter\030\004 \001(\t\"z\n\031ListConversationsRespons" + + "e\022D\n\rconversations\030\001 \003(\0132-.google.cloud." + + "dialogflow.v2beta1.Conversation\022\027\n\017next_" + + "page_token\030\002 \001(\t\"W\n\026GetConversationReque" + + "st\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&dialogflow.go" + + "ogleapis.com/Conversation\"\\\n\033CompleteCon" + + "versationRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n" + + "&dialogflow.googleapis.com/Conversation\"" + + "\230\001\n\024CreateMessageRequest\022?\n\006parent\030\001 \001(\t" + + "B/\342A\001\002\372A(\n&dialogflow.googleapis.com/Con" + + "versation\022?\n\007message\030\002 \001(\0132(.google.clou" + + "d.dialogflow.v2beta1.MessageB\004\342A\001\002\"\254\001\n\032B" + + "atchCreateMessagesRequest\022?\n\006parent\030\001 \001(" + "\tB/\342A\001\002\372A(\n&dialogflow.googleapis.com/Co" - + "nversation\022>\n\016latest_message\030\003 \001(\tB&\372A#\n" - + "!dialogflow.googleapis.com/Message\022\024\n\014co" - + "ntext_size\030\004 \001(\005\022S\n\023assist_query_params\030" - + "\005 \001(\01326.google.cloud.dialogflow.v2beta1." - + "AssistQueryParameters\"\341\003\n\"SuggestConvers" - + "ationSummaryResponse\022\\\n\007summary\030\001 \001(\0132K." - + "google.cloud.dialogflow.v2beta1.SuggestC" - + "onversationSummaryResponse.Summary\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" - + "\032\206\002\n\007Summary\022\014\n\004text\030\001 \001(\t\022t\n\rtext_secti" - + "ons\030\004 \003(\0132].google.cloud.dialogflow.v2be" - + "ta1.SuggestConversationSummaryResponse.S" - + "ummary.TextSectionsEntry\022B\n\ranswer_recor" - + "d\030\003 \001(\tB+\372A(\n&dialogflow.googleapis.com/" - + "AnswerRecord\0323\n\021TextSectionsEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\347\003\n\037GenerateSt" - + "atelessSummaryRequest\022z\n\026stateless_conve" - + "rsation\030\001 \001(\0132T.google.cloud.dialogflow." - + "v2beta1.GenerateStatelessSummaryRequest." - + "MinimalConversationB\004\342A\001\002\022X\n\024conversatio" - + "n_profile\030\002 \001(\01324.google.cloud.dialogflo" - + "w.v2beta1.ConversationProfileB\004\342A\001\002\022>\n\016l" - + "atest_message\030\003 \001(\tB&\372A#\n!dialogflow.goo" - + "gleapis.com/Message\022\030\n\020max_context_size\030" - + "\004 \001(\005\032\223\001\n\023MinimalConversation\022@\n\010message" - + "s\030\001 \003(\0132(.google.cloud.dialogflow.v2beta" - + "1.MessageB\004\342A\001\002\022:\n\006parent\030\002 \001(\tB*\342A\001\002\372A#" - + "\n!locations.googleapis.com/Location\"\227\003\n " - + "GenerateStatelessSummaryResponse\022Z\n\007summ" - + "ary\030\001 \001(\0132I.google.cloud.dialogflow.v2be" - + "ta1.GenerateStatelessSummaryResponse.Sum" - + "mary\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialo" - + "gflow.googleapis.com/Message\022\024\n\014context_" - + "size\030\003 \001(\005\032\300\001\n\007Summary\022\014\n\004text\030\001 \001(\t\022r\n\r" - + "text_sections\030\002 \003(\0132[.google.cloud.dialo" - + "gflow.v2beta1.GenerateStatelessSummaryRe" - + "sponse.Summary.TextSectionsEntry\0323\n\021Text" - + "SectionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\0012\201\024\n\rConversations\022\241\002\n\022CreateConver" - + "sation\022:.google.cloud.dialogflow.v2beta1" - + ".CreateConversationRequest\032-.google.clou" - + "d.dialogflow.v2beta1.Conversation\"\237\001\332A\023p" - + "arent,conversation\202\323\344\223\002\202\001\"*/v2beta1/{par" - + "ent=projects/*}/conversations:\014conversat" - + "ionZF\"6/v2beta1/{parent=projects/*/locat" - + "ions/*}/conversations:\014conversation\022\201\002\n\021" - + "ListConversations\0229.google.cloud.dialogf" - + "low.v2beta1.ListConversationsRequest\032:.g" - + "oogle.cloud.dialogflow.v2beta1.ListConve" - + "rsationsResponse\"u\332A\006parent\202\323\344\223\002f\022*/v2be" - + "ta1/{parent=projects/*}/conversationsZ8\022" - + "6/v2beta1/{parent=projects/*/locations/*" - + "}/conversations\022\356\001\n\017GetConversation\0227.go" - + "ogle.cloud.dialogflow.v2beta1.GetConvers" - + "ationRequest\032-.google.cloud.dialogflow.v" - + "2beta1.Conversation\"s\332A\004name\202\323\344\223\002f\022*/v2b" - + "eta1/{name=projects/*/conversations/*}Z8" - + "\0226/v2beta1/{name=projects/*/locations/*/" - + "conversations/*}\022\221\002\n\024CompleteConversatio" - + "n\022<.google.cloud.dialogflow.v2beta1.Comp" - + "leteConversationRequest\032-.google.cloud.d" - + "ialogflow.v2beta1.Conversation\"\213\001\332A\004name" - + "\202\323\344\223\002~\"3/v2beta1/{name=projects/*/conver" - + "sations/*}:complete:\001*ZD\"?/v2beta1/{name" - + "=projects/*/locations/*/conversations/*}" - + ":complete:\001*\022\275\002\n\023BatchCreateMessages\022;.g" - + "oogle.cloud.dialogflow.v2beta1.BatchCrea" - + "teMessagesRequest\032<.google.cloud.dialogf" - + "low.v2beta1.BatchCreateMessagesResponse\"" - + "\252\001\332A\006parent\202\323\344\223\002\232\001\"A/v2beta1/{parent=pro" - + "jects/*/conversations/*}/messages:batchC" - + "reate:\001*ZR\"M/v2beta1/{parent=projects/*/" - + "locations/*/conversations/*}/messages:ba" - + "tchCreate:\001*\022\211\002\n\014ListMessages\0224.google.c" - + "loud.dialogflow.v2beta1.ListMessagesRequ" - + "est\0325.google.cloud.dialogflow.v2beta1.Li" - + "stMessagesResponse\"\213\001\332A\006parent\202\323\344\223\002|\0225/v" - + "2beta1/{parent=projects/*/conversations/" - + "*}/messagesZC\022A/v2beta1/{parent=projects" - + "/*/locations/*/conversations/*}/messages" - + "\022\210\003\n\032SuggestConversationSummary\022B.google" - + ".cloud.dialogflow.v2beta1.SuggestConvers" - + "ationSummaryRequest\032C.google.cloud.dialo" - + "gflow.v2beta1.SuggestConversationSummary" - + "Response\"\340\001\332A\014conversation\202\323\344\223\002\312\001\"Y/v2be" - + "ta1/{conversation=projects/*/conversatio" - + "ns/*}/suggestions:suggestConversationSum" - + "mary:\001*Zj\"e/v2beta1/{conversation=projec" - + "ts/*/locations/*/conversations/*}/sugges" - + "tions:suggestConversationSummary:\001*\022\361\002\n\030" - + "GenerateStatelessSummary\022@.google.cloud." - + "dialogflow.v2beta1.GenerateStatelessSumm" - + "aryRequest\032A.google.cloud.dialogflow.v2b" - + "eta1.GenerateStatelessSummaryResponse\"\317\001" - + "\202\323\344\223\002\310\001\"X/v2beta1/{stateless_conversatio" - + "n.parent=projects/*}/suggestions:generat" - + "eStatelessSummary:\001*Zi\"d/v2beta1/{statel" - + "ess_conversation.parent=projects/*/locat" - + "ions/*}/suggestions:generateStatelessSum" - + "mary:\001*\032x\312A\031dialogflow.googleapis.com\322AY" - + "https://www.googleapis.com/auth/cloud-pl" - + "atform,https://www.googleapis.com/auth/d" - + "ialogflowB\251\001\n#com.google.cloud.dialogflo" - + "w.v2beta1B\021ConversationProtoP\001ZCcloud.go" - + "ogle.com/go/dialogflow/apiv2beta1/dialog" - + "flowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\037Google.Clo" - + "ud.Dialogflow.V2Beta1b\006proto3" + + "nversation\022M\n\010requests\030\002 \003(\01325.google.cl" + + "oud.dialogflow.v2beta1.CreateMessageRequ" + + "estB\004\342A\001\002\"Y\n\033BatchCreateMessagesResponse" + + "\022:\n\010messages\030\001 \003(\0132(.google.cloud.dialog" + + "flow.v2beta1.Message\"\210\001\n\023ListMessagesReq" + + "uest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!dialogflo" + + "w.googleapis.com/Message\022\016\n\006filter\030\004 \001(\t" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "k\n\024ListMessagesResponse\022:\n\010messages\030\001 \003(" + + "\0132(.google.cloud.dialogflow.v2beta1.Mess" + + "age\022\027\n\017next_page_token\030\002 \001(\t\"\225\002\n!Suggest" + + "ConversationSummaryRequest\022E\n\014conversati" + + "on\030\001 \001(\tB/\342A\001\002\372A(\n&dialogflow.googleapis" + + ".com/Conversation\022>\n\016latest_message\030\003 \001(" + + "\tB&\372A#\n!dialogflow.googleapis.com/Messag" + + "e\022\024\n\014context_size\030\004 \001(\005\022S\n\023assist_query_" + + "params\030\005 \001(\01326.google.cloud.dialogflow.v" + + "2beta1.AssistQueryParameters\"\201\004\n\"Suggest" + + "ConversationSummaryResponse\022\\\n\007summary\030\001" + + " \001(\0132K.google.cloud.dialogflow.v2beta1.S" + + "uggestConversationSummaryResponse.Summar" + + "y\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialogfl" + + "ow.googleapis.com/Message\022\024\n\014context_siz" + + "e\030\003 \001(\005\032\246\002\n\007Summary\022\014\n\004text\030\001 \001(\t\022t\n\rtex" + + "t_sections\030\004 \003(\0132].google.cloud.dialogfl" + + "ow.v2beta1.SuggestConversationSummaryRes" + + "ponse.Summary.TextSectionsEntry\022B\n\ranswe" + + "r_record\030\003 \001(\tB+\372A(\n&dialogflow.googleap" + + "is.com/AnswerRecord\022\036\n\026baseline_model_ve" + + "rsion\030\005 \001(\t\0323\n\021TextSectionsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\347\003\n\037GenerateSta" + + "telessSummaryRequest\022z\n\026stateless_conver" + + "sation\030\001 \001(\0132T.google.cloud.dialogflow.v" + + "2beta1.GenerateStatelessSummaryRequest.M" + + "inimalConversationB\004\342A\001\002\022X\n\024conversation" + + "_profile\030\002 \001(\01324.google.cloud.dialogflow" + + ".v2beta1.ConversationProfileB\004\342A\001\002\022>\n\016la" + + "test_message\030\003 \001(\tB&\372A#\n!dialogflow.goog" + + "leapis.com/Message\022\030\n\020max_context_size\030\004" + + " \001(\005\032\223\001\n\023MinimalConversation\022@\n\010messages" + + "\030\001 \003(\0132(.google.cloud.dialogflow.v2beta1" + + ".MessageB\004\342A\001\002\022:\n\006parent\030\002 \001(\tB*\342A\001\002\372A#\n" + + "!locations.googleapis.com/Location\"\267\003\n G" + + "enerateStatelessSummaryResponse\022Z\n\007summa" + + "ry\030\001 \001(\0132I.google.cloud.dialogflow.v2bet" + + "a1.GenerateStatelessSummaryResponse.Summ" + + "ary\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialog" + + "flow.googleapis.com/Message\022\024\n\014context_s" + + "ize\030\003 \001(\005\032\340\001\n\007Summary\022\014\n\004text\030\001 \001(\t\022r\n\rt" + + "ext_sections\030\002 \003(\0132[.google.cloud.dialog" + + "flow.v2beta1.GenerateStatelessSummaryRes" + + "ponse.Summary.TextSectionsEntry\022\036\n\026basel" + + "ine_model_version\030\004 \001(\t\0323\n\021TextSectionsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\326\002\n" + + "\026SearchKnowledgeRequest\022\016\n\006parent\030\006 \001(\t\022" + + "?\n\005query\030\001 \001(\0132*.google.cloud.dialogflow" + + ".v2beta1.TextInputB\004\342A\001\002\022T\n\024conversation" + + "_profile\030\002 \001(\tB6\342A\001\002\372A/\n-dialogflow.goog" + + "leapis.com/ConversationProfile\022\022\n\nsessio" + + "n_id\030\003 \001(\t\022A\n\014conversation\030\004 \001(\tB+\372A(\n&d" + + "ialogflow.googleapis.com/Conversation\022>\n" + + "\016latest_message\030\005 \001(\tB&\372A#\n!dialogflow.g" + + "oogleapis.com/Message\"b\n\027SearchKnowledge" + + "Response\022G\n\007answers\030\002 \003(\01326.google.cloud" + + ".dialogflow.v2beta1.SearchKnowledgeAnswe" + + "r\"\364\002\n\025SearchKnowledgeAnswer\022\016\n\006answer\030\001 " + + "\001(\t\022V\n\013answer_type\030\002 \001(\0162A.google.cloud." + + "dialogflow.v2beta1.SearchKnowledgeAnswer" + + ".AnswerType\022[\n\016answer_sources\030\003 \003(\0132C.go" + + "ogle.cloud.dialogflow.v2beta1.SearchKnow" + + "ledgeAnswer.AnswerSource\022\025\n\ranswer_recor" + + "d\030\005 \001(\t\032;\n\014AnswerSource\022\r\n\005title\030\001 \001(\t\022\013" + + "\n\003uri\030\002 \001(\t\022\017\n\007snippet\030\003 \001(\t\"B\n\nAnswerTy" + + "pe\022\033\n\027ANSWER_TYPE_UNSPECIFIED\020\000\022\007\n\003FAQ\020\001" + + "\022\016\n\nGENERATIVE\020\0022\320\027\n\rConversations\022\241\002\n\022C" + + "reateConversation\022:.google.cloud.dialogf" + + "low.v2beta1.CreateConversationRequest\032-." + + "google.cloud.dialogflow.v2beta1.Conversa" + + "tion\"\237\001\332A\023parent,conversation\202\323\344\223\002\202\001\"*/v" + + "2beta1/{parent=projects/*}/conversations" + + ":\014conversationZF\"6/v2beta1/{parent=proje" + + "cts/*/locations/*}/conversations:\014conver" + + "sation\022\201\002\n\021ListConversations\0229.google.cl" + + "oud.dialogflow.v2beta1.ListConversations" + + "Request\032:.google.cloud.dialogflow.v2beta" + + "1.ListConversationsResponse\"u\332A\006parent\202\323" + + "\344\223\002f\022*/v2beta1/{parent=projects/*}/conve" + + "rsationsZ8\0226/v2beta1/{parent=projects/*/" + + "locations/*}/conversations\022\356\001\n\017GetConver" + + "sation\0227.google.cloud.dialogflow.v2beta1" + + ".GetConversationRequest\032-.google.cloud.d" + + "ialogflow.v2beta1.Conversation\"s\332A\004name\202" + + "\323\344\223\002f\022*/v2beta1/{name=projects/*/convers" + + "ations/*}Z8\0226/v2beta1/{name=projects/*/l" + + "ocations/*/conversations/*}\022\221\002\n\024Complete" + + "Conversation\022<.google.cloud.dialogflow.v" + + "2beta1.CompleteConversationRequest\032-.goo" + + "gle.cloud.dialogflow.v2beta1.Conversatio" + + "n\"\213\001\332A\004name\202\323\344\223\002~\"3/v2beta1/{name=projec" + + "ts/*/conversations/*}:complete:\001*ZD\"?/v2" + + "beta1/{name=projects/*/locations/*/conve" + + "rsations/*}:complete:\001*\022\275\002\n\023BatchCreateM" + + "essages\022;.google.cloud.dialogflow.v2beta" + + "1.BatchCreateMessagesRequest\032<.google.cl" + + "oud.dialogflow.v2beta1.BatchCreateMessag" + + "esResponse\"\252\001\332A\006parent\202\323\344\223\002\232\001\"A/v2beta1/" + + "{parent=projects/*/conversations/*}/mess" + + "ages:batchCreate:\001*ZR\"M/v2beta1/{parent=" + + "projects/*/locations/*/conversations/*}/" + + "messages:batchCreate:\001*\022\211\002\n\014ListMessages" + + "\0224.google.cloud.dialogflow.v2beta1.ListM" + + "essagesRequest\0325.google.cloud.dialogflow" + + ".v2beta1.ListMessagesResponse\"\213\001\332A\006paren" + + "t\202\323\344\223\002|\0225/v2beta1/{parent=projects/*/con" + + "versations/*}/messagesZC\022A/v2beta1/{pare" + + "nt=projects/*/locations/*/conversations/" + + "*}/messages\022\210\003\n\032SuggestConversationSumma" + + "ry\022B.google.cloud.dialogflow.v2beta1.Sug" + + "gestConversationSummaryRequest\032C.google." + + "cloud.dialogflow.v2beta1.SuggestConversa" + + "tionSummaryResponse\"\340\001\332A\014conversation\202\323\344" + + "\223\002\312\001\"Y/v2beta1/{conversation=projects/*/" + + "conversations/*}/suggestions:suggestConv" + + "ersationSummary:\001*Zj\"e/v2beta1/{conversa" + + "tion=projects/*/locations/*/conversation" + + "s/*}/suggestions:suggestConversationSumm" + + "ary:\001*\022\361\002\n\030GenerateStatelessSummary\022@.go" + + "ogle.cloud.dialogflow.v2beta1.GenerateSt" + + "atelessSummaryRequest\032A.google.cloud.dia" + + "logflow.v2beta1.GenerateStatelessSummary" + + "Response\"\317\001\202\323\344\223\002\310\001\"X/v2beta1/{stateless_" + + "conversation.parent=projects/*}/suggesti" + + "ons:generateStatelessSummary:\001*Zi\"d/v2be" + + "ta1/{stateless_conversation.parent=proje" + + "cts/*/locations/*}/suggestions:generateS" + + "tatelessSummary:\001*\022\314\003\n\017SearchKnowledge\0227" + + ".google.cloud.dialogflow.v2beta1.SearchK" + + "nowledgeRequest\0328.google.cloud.dialogflo" + + "w.v2beta1.SearchKnowledgeResponse\"\305\002\202\323\344\223" + + "\002\276\002\"8/v2beta1/{parent=projects/*}/sugges" + + "tions:searchKnowledge:\001*ZI\"D/v2beta1/{pa" + + "rent=projects/*/locations/*}/suggestions" + + ":searchKnowledge:\001*ZS\"N/v2beta1/{convers" + + "ation=projects/*/conversations/*}/sugges" + + "tions:searchKnowledge:\001*Z_\"Z/v2beta1/{co" + + "nversation=projects/*/locations/*/conver" + + "sations/*}/suggestions:searchKnowledge:\001" + + "*\032x\312A\031dialogflow.googleapis.com\322AYhttps:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/dialogf" + + "lowB\251\001\n#com.google.cloud.dialogflow.v2be" + + "ta1B\021ConversationProtoP\001ZCcloud.google.c" + + "om/go/dialogflow/apiv2beta1/dialogflowpb" + + ";dialogflowpb\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dia" + + "logflow.V2Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -306,6 +357,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.v2beta1.ConversationProfileProto.getDescriptor(), com.google.cloud.dialogflow.v2beta1.ParticipantProto.getDescriptor(), + com.google.cloud.dialogflow.v2beta1.SessionProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_dialogflow_v2beta1_Conversation_descriptor = @@ -434,7 +486,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor, new java.lang.String[] { - "Text", "TextSections", "AnswerRecord", + "Text", "TextSections", "AnswerRecord", "BaselineModelVersion", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor = internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor @@ -480,7 +532,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_GenerateStatelessSummaryResponse_Summary_descriptor, new java.lang.String[] { - "Text", "TextSections", + "Text", "TextSections", "BaselineModelVersion", }); internal_static_google_cloud_dialogflow_v2beta1_GenerateStatelessSummaryResponse_Summary_TextSectionsEntry_descriptor = internal_static_google_cloud_dialogflow_v2beta1_GenerateStatelessSummaryResponse_Summary_descriptor @@ -492,6 +544,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_descriptor, + new java.lang.String[] { + "Parent", + "Query", + "ConversationProfile", + "SessionId", + "Conversation", + "LatestMessage", + }); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_descriptor, + new java.lang.String[] { + "Answers", + }); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor, + new java.lang.String[] { + "Answer", "AnswerType", "AnswerSources", "AnswerRecord", + }); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_descriptor, + new java.lang.String[] { + "Title", "Uri", "Snippet", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -509,6 +600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.v2beta1.ConversationProfileProto.getDescriptor(); com.google.cloud.dialogflow.v2beta1.ParticipantProto.getDescriptor(); + com.google.cloud.dialogflow.v2beta1.SessionProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GenerateStatelessSummaryResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GenerateStatelessSummaryResponse.java index 6fa7a5b80161..425352d88657 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GenerateStatelessSummaryResponse.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GenerateStatelessSummaryResponse.java @@ -161,6 +161,33 @@ java.lang.String getTextSectionsOrDefault( * map<string, string> text_sections = 2; */ java.lang.String getTextSectionsOrThrow(java.lang.String key); + + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + java.lang.String getBaselineModelVersion(); + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + com.google.protobuf.ByteString getBaselineModelVersionBytes(); } /** * @@ -183,6 +210,7 @@ private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Summary() { text_ = ""; + baselineModelVersion_ = ""; } @java.lang.Override @@ -381,6 +409,59 @@ public java.lang.String getTextSectionsOrThrow(java.lang.String key) { return map.get(key); } + public static final int BASELINE_MODEL_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + @java.lang.Override + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + 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(); + baselineModelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -400,6 +481,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 2); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baselineModelVersion_); + } getUnknownFields().writeTo(output); } @@ -422,6 +506,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, textSections__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baselineModelVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -442,6 +529,7 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; + if (!getBaselineModelVersion().equals(other.getBaselineModelVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -459,6 +547,8 @@ public int hashCode() { hash = (37 * hash) + TEXT_SECTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetTextSections().hashCode(); } + hash = (37 * hash) + BASELINE_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBaselineModelVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -632,6 +722,7 @@ public Builder clear() { bitField0_ = 0; text_ = ""; internalGetMutableTextSections().clear(); + baselineModelVersion_ = ""; return this; } @@ -680,6 +771,9 @@ private void buildPartial0( result.textSections_ = internalGetTextSections(); result.textSections_.makeImmutable(); } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baselineModelVersion_ = baselineModelVersion_; + } } @java.lang.Override @@ -742,6 +836,11 @@ public Builder mergeFrom( } internalGetMutableTextSections().mergeFrom(other.internalGetTextSections()); bitField0_ |= 0x00000002; + if (!other.getBaselineModelVersion().isEmpty()) { + baselineModelVersion_ = other.baselineModelVersion_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -786,6 +885,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 34: + { + baselineModelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1091,6 +1196,117 @@ public Builder putAllTextSections(java.util.Map + * The baseline model version used to generate this summary. It is empty if + * a baseline model was not used to generate this summary. + * + * + * string baseline_model_version = 4; + * + * @return The baselineModelVersion. + */ + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineModelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @return The bytes for baselineModelVersion. + */ + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @param value The baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baselineModelVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @return This builder for chaining. + */ + public Builder clearBaselineModelVersion() { + baselineModelVersion_ = getDefaultInstance().getBaselineModelVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 4; + * + * @param value The bytes for baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baselineModelVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/HumanAgentAssistantConfig.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/HumanAgentAssistantConfig.java index bb81a345f930..d4a9a547c758 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/HumanAgentAssistantConfig.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/HumanAgentAssistantConfig.java @@ -817,7 +817,7 @@ public interface SuggestionFeatureConfigOrBuilder * suggestions. * * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - * ENTITY_EXTRACTION. + * ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -826,6 +826,22 @@ public interface SuggestionFeatureConfigOrBuilder */ boolean getEnableEventBasedSuggestion(); + /** + * + * + *
+     * Optional. Disable the logging of search queries sent by human agents. It
+     * can prevent those queries from being stored at answer records.
+     *
+     * Supported features: KNOWLEDGE_SEARCH.
+     * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAgentQueryLogging. + */ + boolean getDisableAgentQueryLogging(); + /** * * @@ -1113,7 +1129,7 @@ public com.google.cloud.dialogflow.v2beta1.SuggestionFeature getSuggestionFeatur * suggestions. * * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - * ENTITY_EXTRACTION. + * ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -1125,6 +1141,27 @@ public boolean getEnableEventBasedSuggestion() { return enableEventBasedSuggestion_; } + public static final int DISABLE_AGENT_QUERY_LOGGING_FIELD_NUMBER = 14; + private boolean disableAgentQueryLogging_ = false; + /** + * + * + *
+     * Optional. Disable the logging of search queries sent by human agents. It
+     * can prevent those queries from being stored at answer records.
+     *
+     * Supported features: KNOWLEDGE_SEARCH.
+     * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAgentQueryLogging. + */ + @java.lang.Override + public boolean getDisableAgentQueryLogging() { + return disableAgentQueryLogging_; + } + public static final int SUGGESTION_TRIGGER_SETTINGS_FIELD_NUMBER = 10; private com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings suggestionTriggerSettings_; @@ -1414,6 +1451,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (suggestionTriggerSettings_ != null) { output.writeMessage(10, getSuggestionTriggerSettings()); } + if (disableAgentQueryLogging_ != false) { + output.writeBool(14, disableAgentQueryLogging_); + } getUnknownFields().writeTo(output); } @@ -1448,6 +1488,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, getSuggestionTriggerSettings()); } + if (disableAgentQueryLogging_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(14, disableAgentQueryLogging_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1472,6 +1516,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSuggestionFeature().equals(other.getSuggestionFeature())) return false; } if (getEnableEventBasedSuggestion() != other.getEnableEventBasedSuggestion()) return false; + if (getDisableAgentQueryLogging() != other.getDisableAgentQueryLogging()) return false; if (hasSuggestionTriggerSettings() != other.hasSuggestionTriggerSettings()) return false; if (hasSuggestionTriggerSettings()) { if (!getSuggestionTriggerSettings().equals(other.getSuggestionTriggerSettings())) @@ -1508,6 +1553,8 @@ public int hashCode() { hash = (37 * hash) + ENABLE_EVENT_BASED_SUGGESTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableEventBasedSuggestion()); + hash = (37 * hash) + DISABLE_AGENT_QUERY_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAgentQueryLogging()); if (hasSuggestionTriggerSettings()) { hash = (37 * hash) + SUGGESTION_TRIGGER_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSuggestionTriggerSettings().hashCode(); @@ -1696,6 +1743,7 @@ public Builder clear() { suggestionFeatureBuilder_ = null; } enableEventBasedSuggestion_ = false; + disableAgentQueryLogging_ = false; suggestionTriggerSettings_ = null; if (suggestionTriggerSettingsBuilder_ != null) { suggestionTriggerSettingsBuilder_.dispose(); @@ -1771,22 +1819,25 @@ private void buildPartial0( result.enableEventBasedSuggestion_ = enableEventBasedSuggestion_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.disableAgentQueryLogging_ = disableAgentQueryLogging_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.suggestionTriggerSettings_ = suggestionTriggerSettingsBuilder_ == null ? suggestionTriggerSettings_ : suggestionTriggerSettingsBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.queryConfig_ = queryConfigBuilder_ == null ? queryConfig_ : queryConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.conversationModelConfig_ = conversationModelConfigBuilder_ == null ? conversationModelConfig_ : conversationModelConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.conversationProcessConfig_ = conversationProcessConfigBuilder_ == null ? conversationProcessConfig_ @@ -1856,6 +1907,9 @@ public Builder mergeFrom( if (other.getEnableEventBasedSuggestion() != false) { setEnableEventBasedSuggestion(other.getEnableEventBasedSuggestion()); } + if (other.getDisableAgentQueryLogging() != false) { + setDisableAgentQueryLogging(other.getDisableAgentQueryLogging()); + } if (other.hasSuggestionTriggerSettings()) { mergeSuggestionTriggerSettings(other.getSuggestionTriggerSettings()); } @@ -1910,30 +1964,36 @@ public Builder mergeFrom( case 50: { input.readMessage(getQueryConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 50 case 58: { input.readMessage( getConversationModelConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 58 case 66: { input.readMessage( getConversationProcessConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 66 case 82: { input.readMessage( getSuggestionTriggerSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 82 + case 112: + { + disableAgentQueryLogging_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 112 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2151,7 +2211,7 @@ public Builder clearSuggestionFeature() { * suggestions. * * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - * ENTITY_EXTRACTION. + * ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2170,7 +2230,7 @@ public boolean getEnableEventBasedSuggestion() { * suggestions. * * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - * ENTITY_EXTRACTION. + * ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2193,7 +2253,7 @@ public Builder setEnableEventBasedSuggestion(boolean value) { * suggestions. * * Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - * ENTITY_EXTRACTION. + * ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. * * * bool enable_event_based_suggestion = 3; @@ -2207,6 +2267,71 @@ public Builder clearEnableEventBasedSuggestion() { return this; } + private boolean disableAgentQueryLogging_; + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableAgentQueryLogging. + */ + @java.lang.Override + public boolean getDisableAgentQueryLogging() { + return disableAgentQueryLogging_; + } + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableAgentQueryLogging to set. + * @return This builder for chaining. + */ + public Builder setDisableAgentQueryLogging(boolean value) { + + disableAgentQueryLogging_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Disable the logging of search queries sent by human agents. It
+       * can prevent those queries from being stored at answer records.
+       *
+       * Supported features: KNOWLEDGE_SEARCH.
+       * 
+ * + * bool disable_agent_query_logging = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableAgentQueryLogging() { + bitField0_ = (bitField0_ & ~0x00000004); + disableAgentQueryLogging_ = false; + onChanged(); + return this; + } + private com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig .SuggestionTriggerSettings suggestionTriggerSettings_; @@ -2235,7 +2360,7 @@ public Builder clearEnableEventBasedSuggestion() { * @return Whether the suggestionTriggerSettings field is set. */ public boolean hasSuggestionTriggerSettings() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2289,7 +2414,7 @@ public Builder setSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2316,7 +2441,7 @@ public Builder setSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2338,7 +2463,7 @@ public Builder mergeSuggestionTriggerSettings( com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings value) { if (suggestionTriggerSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && suggestionTriggerSettings_ != null && suggestionTriggerSettings_ != com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig @@ -2350,7 +2475,7 @@ public Builder mergeSuggestionTriggerSettings( } else { suggestionTriggerSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2369,7 +2494,7 @@ public Builder mergeSuggestionTriggerSettings( * */ public Builder clearSuggestionTriggerSettings() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); suggestionTriggerSettings_ = null; if (suggestionTriggerSettingsBuilder_ != null) { suggestionTriggerSettingsBuilder_.dispose(); @@ -2395,7 +2520,7 @@ public Builder clearSuggestionTriggerSettings() { public com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings .Builder getSuggestionTriggerSettingsBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getSuggestionTriggerSettingsFieldBuilder().getBuilder(); } @@ -2485,7 +2610,7 @@ public Builder clearSuggestionTriggerSettings() { * @return Whether the queryConfig field is set. */ public boolean hasQueryConfig() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2533,7 +2658,7 @@ public Builder setQueryConfig( } else { queryConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2557,7 +2682,7 @@ public Builder setQueryConfig( } else { queryConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2576,7 +2701,7 @@ public Builder mergeQueryConfig( com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig value) { if (queryConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && queryConfig_ != null && queryConfig_ != com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig @@ -2588,7 +2713,7 @@ public Builder mergeQueryConfig( } else { queryConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2604,7 +2729,7 @@ public Builder mergeQueryConfig( * */ public Builder clearQueryConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); queryConfig_ = null; if (queryConfigBuilder_ != null) { queryConfigBuilder_.dispose(); @@ -2627,7 +2752,7 @@ public Builder clearQueryConfig() { public com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig .Builder getQueryConfigBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getQueryConfigFieldBuilder().getBuilder(); } @@ -2710,7 +2835,7 @@ public Builder clearQueryConfig() { * @return Whether the conversationModelConfig field is set. */ public boolean hasConversationModelConfig() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2758,7 +2883,7 @@ public Builder setConversationModelConfig( } else { conversationModelConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2782,7 +2907,7 @@ public Builder setConversationModelConfig( } else { conversationModelConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2801,7 +2926,7 @@ public Builder mergeConversationModelConfig( com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig value) { if (conversationModelConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && conversationModelConfig_ != null && conversationModelConfig_ != com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig @@ -2813,7 +2938,7 @@ public Builder mergeConversationModelConfig( } else { conversationModelConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2829,7 +2954,7 @@ public Builder mergeConversationModelConfig( * */ public Builder clearConversationModelConfig() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); conversationModelConfig_ = null; if (conversationModelConfigBuilder_ != null) { conversationModelConfigBuilder_.dispose(); @@ -2852,7 +2977,7 @@ public Builder clearConversationModelConfig() { public com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig .Builder getConversationModelConfigBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getConversationModelConfigFieldBuilder().getBuilder(); } @@ -2937,7 +3062,7 @@ public Builder clearConversationModelConfig() { * @return Whether the conversationProcessConfig field is set. */ public boolean hasConversationProcessConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2985,7 +3110,7 @@ public Builder setConversationProcessConfig( } else { conversationProcessConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3009,7 +3134,7 @@ public Builder setConversationProcessConfig( } else { conversationProcessConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3028,7 +3153,7 @@ public Builder mergeConversationProcessConfig( com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig value) { if (conversationProcessConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && conversationProcessConfig_ != null && conversationProcessConfig_ != com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig @@ -3040,7 +3165,7 @@ public Builder mergeConversationProcessConfig( } else { conversationProcessConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3056,7 +3181,7 @@ public Builder mergeConversationProcessConfig( * */ public Builder clearConversationProcessConfig() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); conversationProcessConfig_ = null; if (conversationProcessConfigBuilder_ != null) { conversationProcessConfigBuilder_.dispose(); @@ -3079,7 +3204,7 @@ public Builder clearConversationProcessConfig() { public com.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig .Builder getConversationProcessConfigBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getConversationProcessConfigFieldBuilder().getBuilder(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequest.java index af0f8d297b9f..c90fddcf0e66 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequest.java @@ -137,7 +137,7 @@ public com.google.protobuf.ByteString getParentBytes() { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. See - * google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The filter. */ @java.lang.Override @@ -166,7 +166,7 @@ public java.lang.String getFilter() { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. See - * google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The bytes for filter. */ @java.lang.Override @@ -807,7 +807,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. - * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The filter. */ @java.lang.Deprecated @@ -835,7 +835,7 @@ public java.lang.String getFilter() { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. - * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The bytes for filter. */ @java.lang.Deprecated @@ -863,7 +863,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. - * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @param value The filter to set. * @return This builder for chaining. */ @@ -890,7 +890,7 @@ public Builder setFilter(java.lang.String value) { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. - * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return This builder for chaining. */ @java.lang.Deprecated @@ -913,7 +913,7 @@ public Builder clearFilter() { * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. - * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * See google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @param value The bytes for filter to set. * @return This builder for chaining. */ diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequestOrBuilder.java index fa4cf0afbb9b..5ebfc6168176 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListAnswerRecordsRequestOrBuilder.java @@ -65,7 +65,7 @@ public interface ListAnswerRecordsRequestOrBuilder * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. See - * google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The filter. */ @java.lang.Deprecated @@ -83,7 +83,7 @@ public interface ListAnswerRecordsRequestOrBuilder * string filter = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.filter is deprecated. See - * google/cloud/dialogflow/v2beta1/answer_record.proto;l=303 + * google/cloud/dialogflow/v2beta1/answer_record.proto;l=323 * @return The bytes for filter. */ @java.lang.Deprecated diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java index 1eecd7000da8..9b54b87fde57 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java @@ -345,311 +345,312 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tent_input\030\006 \001(\0132,.google.cloud.dialogfl" + "ow.v2beta1.IntentInput\"@\n\013IntentInput\022\024\n" + "\006intent\030\001 \001(\tB\004\342A\001\002\022\033\n\rlanguage_code\030\003 \001" - + "(\tB\004\342A\001\002\"\342\001\n\021SuggestionFeature\022E\n\004type\030\001" + + "(\tB\004\342A\001\002\"\370\001\n\021SuggestionFeature\022E\n\004type\030\001" + " \001(\01627.google.cloud.dialogflow.v2beta1.S" - + "uggestionFeature.Type\"\205\001\n\004Type\022\024\n\020TYPE_U" + + "uggestionFeature.Type\"\233\001\n\004Type\022\024\n\020TYPE_U" + "NSPECIFIED\020\000\022\026\n\022ARTICLE_SUGGESTION\020\001\022\007\n\003" + "FAQ\020\002\022\017\n\013SMART_REPLY\020\003\022\025\n\021DIALOGFLOW_ASS" - + "IST\020\004\022\036\n\032CONVERSATION_SUMMARIZATION\020\010\"\322\001" - + "\n\025AssistQueryParameters\022x\n\032documents_met" - + "adata_filters\030\001 \003(\0132T.google.cloud.dialo" - + "gflow.v2beta1.AssistQueryParameters.Docu" - + "mentsMetadataFiltersEntry\032?\n\035DocumentsMe" - + "tadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"\376\005\n\025AnalyzeContentRequest\022C\n\013" - + "participant\030\001 \001(\tB.\342A\001\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\022L\n\020suggestio" - + "n_input\030\014 \001(\01320.google.cloud.dialogflow." - + "v2beta1.SuggestionInputH\000\022N\n\022reply_audio" - + "_config\030\005 \001(\01322.google.cloud.dialogflow." - + "v2beta1.OutputAudioConfig\022F\n\014query_param" - + "s\030\t \001(\01320.google.cloud.dialogflow.v2beta" - + "1.QueryParameters\022S\n\023assist_query_params" - + "\030\016 \001(\01326.google.cloud.dialogflow.v2beta1" - + ".AssistQueryParameters\022.\n\rcx_parameters\030" - + "\022 \001(\0132\027.google.protobuf.Struct\022\027\n\017cx_cur" - + "rent_page\030\024 \001(\t\0225\n\021message_send_time\030\n \001" - + "(\0132\032.google.protobuf.Timestamp\022\022\n\nreques" - + "t_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfParameters\022\032\n" - + "\022accepts_dtmf_input\030\001 \001(\010\"\374\003\n\026AnalyzeCon" - + "tentResponse\022\022\n\nreply_text\030\001 \001(\t\022A\n\013repl" - + "y_audio\030\002 \001(\0132,.google.cloud.dialogflow." - + "v2beta1.OutputAudio\022S\n\025automated_agent_r" - + "eply\030\003 \001(\01324.google.cloud.dialogflow.v2b" - + "eta1.AutomatedAgentReply\0229\n\007message\030\005 \001(" - + "\0132(.google.cloud.dialogflow.v2beta1.Mess" - + "age\022Y\n\036human_agent_suggestion_results\030\006 " - + "\003(\01321.google.cloud.dialogflow.v2beta1.Su" - + "ggestionResult\022V\n\033end_user_suggestion_re" - + "sults\030\007 \003(\01321.google.cloud.dialogflow.v2" - + "beta1.SuggestionResult\022H\n\017dtmf_parameter" - + "s\030\t \001(\0132/.google.cloud.dialogflow.v2beta" - + "1.DtmfParameters\"(\n\017InputTextConfig\022\025\n\rl" - + "anguage_code\030\001 \001(\t\"\210\006\n\036StreamingAnalyzeC" - + "ontentRequest\022C\n\013participant\030\001 \001(\tB.\342A\001\002" - + "\372A\'\n%dialogflow.googleapis.com/Participa" - + "nt\022I\n\014audio_config\030\002 \001(\01321.google.cloud." - + "dialogflow.v2beta1.InputAudioConfigH\000\022G\n" - + "\013text_config\030\003 \001(\01320.google.cloud.dialog" - + "flow.v2beta1.InputTextConfigH\000\022N\n\022reply_" - + "audio_config\030\004 \001(\01322.google.cloud.dialog" - + "flow.v2beta1.OutputAudioConfig\022\025\n\013input_" - + "audio\030\005 \001(\014H\001\022\024\n\ninput_text\030\006 \001(\tH\001\022J\n\ni" - + "nput_dtmf\030\t \001(\01324.google.cloud.dialogflo" - + "w.v2beta1.TelephonyDtmfEventsH\001\022F\n\014query" - + "_params\030\007 \001(\01320.google.cloud.dialogflow." - + "v2beta1.QueryParameters\022S\n\023assist_query_" - + "params\030\010 \001(\01326.google.cloud.dialogflow.v" - + "2beta1.AssistQueryParameters\022.\n\rcx_param" - + "eters\030\r \001(\0132\027.google.protobuf.Struct\022\027\n\017" - + "cx_current_page\030\017 \001(\t\022,\n$enable_partial_" - + "automated_agent_reply\030\014 \001(\010\022\035\n\025enable_de" - + "bugging_info\030\023 \001(\010B\010\n\006configB\007\n\005input\"\267\005" - + "\n\037StreamingAnalyzeContentResponse\022W\n\022rec" - + "ognition_result\030\001 \001(\0132;.google.cloud.dia" - + "logflow.v2beta1.StreamingRecognitionResu" - + "lt\022\022\n\nreply_text\030\002 \001(\t\022A\n\013reply_audio\030\003 " - + "\001(\0132,.google.cloud.dialogflow.v2beta1.Ou" - + "tputAudio\022S\n\025automated_agent_reply\030\004 \001(\013" - + "24.google.cloud.dialogflow.v2beta1.Autom" - + "atedAgentReply\0229\n\007message\030\006 \001(\0132(.google" - + ".cloud.dialogflow.v2beta1.Message\022Y\n\036hum" - + "an_agent_suggestion_results\030\007 \003(\01321.goog" - + "le.cloud.dialogflow.v2beta1.SuggestionRe" - + "sult\022V\n\033end_user_suggestion_results\030\010 \003(" - + "\01321.google.cloud.dialogflow.v2beta1.Sugg" - + "estionResult\022H\n\017dtmf_parameters\030\n \001(\0132/." - + "google.cloud.dialogflow.v2beta1.DtmfPara" - + "meters\022W\n\016debugging_info\030\013 \001(\0132?.google." - + "cloud.dialogflow.v2beta1.CloudConversati" - + "onDebuggingInfo\"j\n\024AnnotatedMessagePart\022" - + "\014\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017fo" - + "rmatted_value\030\003 \001(\0132\026.google.protobuf.Va" - + "lue\"s\n\021MessageAnnotation\022D\n\005parts\030\001 \003(\0132" - + "5.google.cloud.dialogflow.v2beta1.Annota" - + "tedMessagePart\022\030\n\020contain_entities\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\010metadata\030\005 \003" - + "(\0132<.google.cloud.dialogflow.v2beta1.Art" - + "icleAnswer.MetadataEntry\022\025\n\ranswer_recor" - + "d\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\010question\030\003" - + " \001(\t\022\016\n\006source\030\004 \001(\t\022J\n\010metadata\030\005 \003(\01328" - + ".google.cloud.dialogflow.v2beta1.FaqAnsw" - + "er.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_record" - + "\030\003 \001(\tB+\372A(\n&dialogflow.googleapis.com/A" - + "nswerRecord\"\\\n\020IntentSuggestion\022\024\n\014displ" - + "ay_name\030\001 \001(\t\022\023\n\tintent_v2\030\002 \001(\tH\000\022\023\n\013de" - + "scription\030\005 \001(\tB\010\n\006intent\"\317\001\n\026Dialogflow" - + "AssistAnswer\022D\n\014query_result\030\001 \001(\0132,.goo" - + "gle.cloud.dialogflow.v2beta1.QueryResult" - + "H\000\022N\n\021intent_suggestion\030\005 \001(\01321.google.c" - + "loud.dialogflow.v2beta1.IntentSuggestion" - + "H\000\022\025\n\ranswer_record\030\002 \001(\tB\010\n\006result\"\334\004\n\020" - + "SuggestionResult\022#\n\005error\030\001 \001(\0132\022.google" - + ".rpc.StatusH\000\022]\n\031suggest_articles_respon" - + "se\030\002 \001(\01328.google.cloud.dialogflow.v2bet" - + "a1.SuggestArticlesResponseH\000\022b\n\034suggest_" - + "faq_answers_response\030\003 \001(\0132:.google.clou" - + "d.dialogflow.v2beta1.SuggestFaqAnswersRe" - + "sponseH\000\022f\n\036suggest_smart_replies_respon" - + "se\030\004 \001(\0132<.google.cloud.dialogflow.v2bet" - + "a1.SuggestSmartRepliesResponseH\000\022p\n#sugg" - + "est_dialogflow_assists_response\030\005 \001(\0132A." - + "google.cloud.dialogflow.v2beta1.SuggestD" - + "ialogflowAssistsResponseH\000\022o\n\"suggest_en" - + "tity_extraction_response\030\007 \001(\0132A.google." - + "cloud.dialogflow.v2beta1.SuggestDialogfl" - + "owAssistsResponseH\000B\025\n\023suggestion_respon" - + "se\"\223\002\n\026SuggestArticlesRequest\022>\n\006parent\030" - + "\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.googleapis.co" - + "m/Participant\022B\n\016latest_message\030\002 \001(\tB*\342" - + "A\001\001\372A#\n!dialogflow.googleapis.com/Messag" - + "e\022\032\n\014context_size\030\003 \001(\005B\004\342A\001\001\022Y\n\023assist_" - + "query_params\030\004 \001(\01326.google.cloud.dialog" - + "flow.v2beta1.AssistQueryParametersB\004\342A\001\001" - + "\"\220\001\n\027SuggestArticlesResponse\022G\n\017article_" - + "answers\030\001 \003(\0132..google.cloud.dialogflow." - + "v2beta1.ArticleAnswer\022\026\n\016latest_message\030" - + "\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\225\002\n\030SuggestF" - + "aqAnswersRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A" - + "\'\n%dialogflow.googleapis.com/Participant" - + "\022B\n\016latest_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialo" - + "gflow.googleapis.com/Message\022\032\n\014context_" - + "size\030\003 \001(\005B\004\342A\001\001\022Y\n\023assist_query_params\030" - + "\004 \001(\01326.google.cloud.dialogflow.v2beta1." - + "AssistQueryParametersB\004\342A\001\001\"\212\001\n\031SuggestF" - + "aqAnswersResponse\022?\n\013faq_answers\030\001 \003(\0132*" - + ".google.cloud.dialogflow.v2beta1.FaqAnsw" - + "er\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_si" - + "ze\030\003 \001(\005\"\372\001\n\032SuggestSmartRepliesRequest\022" - + ">\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.goo" - + "gleapis.com/Participant\022F\n\022current_text_" - + "input\030\004 \001(\0132*.google.cloud.dialogflow.v2" - + "beta1.TextInput\022>\n\016latest_message\030\002 \001(\tB" - + "&\372A#\n!dialogflow.googleapis.com/Message\022" - + "\024\n\014context_size\030\003 \001(\005\"\303\001\n\033SuggestSmartRe" - + "pliesResponse\022N\n\023smart_reply_answers\030\001 \003" - + "(\01321.google.cloud.dialogflow.v2beta1.Sma" - + "rtReplyAnswer\022>\n\016latest_message\030\002 \001(\tB&\372" - + "A#\n!dialogflow.googleapis.com/Message\022\024\n" - + "\014context_size\030\003 \001(\005\"\254\001\n SuggestDialogflo" - + "wAssistsResponse\022Z\n\031dialogflow_assist_an" - + "swers\030\001 \003(\01327.google.cloud.dialogflow.v2" - + "beta1.DialogflowAssistAnswer\022\026\n\016latest_m" - + "essage\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\304\005\n\nS" - + "uggestion\022\014\n\004name\030\001 \001(\t\022E\n\010articles\030\002 \003(" - + "\01323.google.cloud.dialogflow.v2beta1.Sugg" - + "estion.Article\022J\n\013faq_answers\030\004 \003(\01325.go" + + "IST\020\004\022\036\n\032CONVERSATION_SUMMARIZATION\020\010\022\024\n" + + "\020KNOWLEDGE_SEARCH\020\016\"\322\001\n\025AssistQueryParam" + + "eters\022x\n\032documents_metadata_filters\030\001 \003(" + + "\0132T.google.cloud.dialogflow.v2beta1.Assi" + + "stQueryParameters.DocumentsMetadataFilte" + + "rsEntry\032?\n\035DocumentsMetadataFiltersEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\376\005\n\025Ana" + + "lyzeContentRequest\022C\n\013participant\030\001 \001(\tB" + + ".\342A\001\002\372A\'\n%dialogflow.googleapis.com/Part" + + "icipant\022@\n\ntext_input\030\006 \001(\0132*.google.clo" + + "ud.dialogflow.v2beta1.TextInputH\000\022B\n\013aud" + + "io_input\030\007 \001(\0132+.google.cloud.dialogflow" + + ".v2beta1.AudioInputH\000\022B\n\013event_input\030\010 \001" + + "(\0132+.google.cloud.dialogflow.v2beta1.Eve" + + "ntInputH\000\022L\n\020suggestion_input\030\014 \001(\01320.go" + "ogle.cloud.dialogflow.v2beta1.Suggestion" - + ".FaqAnswer\022/\n\013create_time\030\005 \001(\0132\032.google" - + ".protobuf.Timestamp\022\026\n\016latest_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\010metadata\030\005 \003(\0132" - + "A.google.cloud.dialogflow.v2beta1.Sugges" - + "tion.Article.MetadataEntry\022\025\n\ranswer_rec" - + "ord\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\006answ" - + "er\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\010metadata\030\005 \003(\013" - + "2C.google.cloud.dialogflow.v2beta1.Sugge" - + "stion.FaqAnswer.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:\002\030\001\"c\n\026ListSuggest" - + "ionsRequest\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\027ListSuggestionsResponse\022@\n\013sug" - + "gestions\030\001 \003(\0132+.google.cloud.dialogflow" - + ".v2beta1.Suggestion\022\027\n\017next_page_token\030\002" - + " \001(\t:\002\030\001\"\\\n\030CompileSuggestionRequest\022\016\n\006" - + "parent\030\001 \001(\t\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014" - + "context_size\030\003 \001(\005:\002\030\001\"\216\001\n\031CompileSugges" - + "tionResponse\022?\n\nsuggestion\030\001 \001(\0132+.googl" - + "e.cloud.dialogflow.v2beta1.Suggestion\022\026\n" - + "\016latest_message\030\002 \001(\t\022\024\n\014context_size\030\003 " - + "\001(\005:\002\030\001\"\203\007\n\017ResponseMessage\022E\n\004text\030\001 \001(" - + "\01325.google.cloud.dialogflow.v2beta1.Resp" - + "onseMessage.TextH\000\022*\n\007payload\030\002 \001(\0132\027.go" - + "ogle.protobuf.StructH\000\022_\n\022live_agent_han" - + "doff\030\003 \001(\0132A.google.cloud.dialogflow.v2b" - + "eta1.ResponseMessage.LiveAgentHandoffH\000\022" - + "Z\n\017end_interaction\030\004 \001(\0132?.google.cloud." - + "dialogflow.v2beta1.ResponseMessage.EndIn" - + "teractionH\000\022R\n\013mixed_audio\030\005 \001(\0132;.googl" + + "InputH\000\022N\n\022reply_audio_config\030\005 \001(\01322.go" + + "ogle.cloud.dialogflow.v2beta1.OutputAudi" + + "oConfig\022F\n\014query_params\030\t \001(\01320.google.c" + + "loud.dialogflow.v2beta1.QueryParameters\022" + + "S\n\023assist_query_params\030\016 \001(\01326.google.cl" + + "oud.dialogflow.v2beta1.AssistQueryParame" + + "ters\022.\n\rcx_parameters\030\022 \001(\0132\027.google.pro" + + "tobuf.Struct\022\027\n\017cx_current_page\030\024 \001(\t\0225\n" + + "\021message_send_time\030\n \001(\0132\032.google.protob" + + "uf.Timestamp\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005inpu" + + "t\",\n\016DtmfParameters\022\032\n\022accepts_dtmf_inpu" + + "t\030\001 \001(\010\"\374\003\n\026AnalyzeContentResponse\022\022\n\nre" + + "ply_text\030\001 \001(\t\022A\n\013reply_audio\030\002 \001(\0132,.go" + + "ogle.cloud.dialogflow.v2beta1.OutputAudi" + + "o\022S\n\025automated_agent_reply\030\003 \001(\01324.googl" + + "e.cloud.dialogflow.v2beta1.AutomatedAgen" + + "tReply\0229\n\007message\030\005 \001(\0132(.google.cloud.d" + + "ialogflow.v2beta1.Message\022Y\n\036human_agent" + + "_suggestion_results\030\006 \003(\01321.google.cloud" + + ".dialogflow.v2beta1.SuggestionResult\022V\n\033" + + "end_user_suggestion_results\030\007 \003(\01321.goog" + + "le.cloud.dialogflow.v2beta1.SuggestionRe" + + "sult\022H\n\017dtmf_parameters\030\t \001(\0132/.google.c" + + "loud.dialogflow.v2beta1.DtmfParameters\"(" + + "\n\017InputTextConfig\022\025\n\rlanguage_code\030\001 \001(\t" + + "\"\210\006\n\036StreamingAnalyzeContentRequest\022C\n\013p" + + "articipant\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.go" + + "ogleapis.com/Participant\022I\n\014audio_config" + + "\030\002 \001(\01321.google.cloud.dialogflow.v2beta1" + + ".InputAudioConfigH\000\022G\n\013text_config\030\003 \001(\013" + + "20.google.cloud.dialogflow.v2beta1.Input" + + "TextConfigH\000\022N\n\022reply_audio_config\030\004 \001(\013" + + "22.google.cloud.dialogflow.v2beta1.Outpu" + + "tAudioConfig\022\025\n\013input_audio\030\005 \001(\014H\001\022\024\n\ni" + + "nput_text\030\006 \001(\tH\001\022J\n\ninput_dtmf\030\t \001(\01324." + + "google.cloud.dialogflow.v2beta1.Telephon" + + "yDtmfEventsH\001\022F\n\014query_params\030\007 \001(\01320.go" + + "ogle.cloud.dialogflow.v2beta1.QueryParam" + + "eters\022S\n\023assist_query_params\030\010 \001(\01326.goo" + + "gle.cloud.dialogflow.v2beta1.AssistQuery" + + "Parameters\022.\n\rcx_parameters\030\r \001(\0132\027.goog" + + "le.protobuf.Struct\022\027\n\017cx_current_page\030\017 " + + "\001(\t\022,\n$enable_partial_automated_agent_re" + + "ply\030\014 \001(\010\022\035\n\025enable_debugging_info\030\023 \001(\010" + + "B\010\n\006configB\007\n\005input\"\267\005\n\037StreamingAnalyze" + + "ContentResponse\022W\n\022recognition_result\030\001 " + + "\001(\0132;.google.cloud.dialogflow.v2beta1.St" + + "reamingRecognitionResult\022\022\n\nreply_text\030\002" + + " \001(\t\022A\n\013reply_audio\030\003 \001(\0132,.google.cloud" + + ".dialogflow.v2beta1.OutputAudio\022S\n\025autom" + + "ated_agent_reply\030\004 \001(\01324.google.cloud.di" + + "alogflow.v2beta1.AutomatedAgentReply\0229\n\007" + + "message\030\006 \001(\0132(.google.cloud.dialogflow." + + "v2beta1.Message\022Y\n\036human_agent_suggestio" + + "n_results\030\007 \003(\01321.google.cloud.dialogflo" + + "w.v2beta1.SuggestionResult\022V\n\033end_user_s" + + "uggestion_results\030\010 \003(\01321.google.cloud.d" + + "ialogflow.v2beta1.SuggestionResult\022H\n\017dt" + + "mf_parameters\030\n \001(\0132/.google.cloud.dialo" + + "gflow.v2beta1.DtmfParameters\022W\n\016debuggin" + + "g_info\030\013 \001(\0132?.google.cloud.dialogflow.v" + + "2beta1.CloudConversationDebuggingInfo\"j\n" + + "\024AnnotatedMessagePart\022\014\n\004text\030\001 \001(\t\022\023\n\013e" + + "ntity_type\030\002 \001(\t\022/\n\017formatted_value\030\003 \001(" + + "\0132\026.google.protobuf.Value\"s\n\021MessageAnno" + + "tation\022D\n\005parts\030\001 \003(\01325.google.cloud.dia" + + "logflow.v2beta1.AnnotatedMessagePart\022\030\n\020" + + "contain_entities\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\010metadata\030\005 \003(\0132<.google.cloud." + + "dialogflow.v2beta1.ArticleAnswer.Metadat" + + "aEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadat" + + "aEntry\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\nconfiden" + + "ce\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(\01328.google.cloud.dial" + + "ogflow.v2beta1.FaqAnswer.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\020SmartR" + + "eplyAnswer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030" + + "\002 \001(\002\022B\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialo" + + "gflow.googleapis.com/AnswerRecord\"\\\n\020Int" + + "entSuggestion\022\024\n\014display_name\030\001 \001(\t\022\023\n\ti" + + "ntent_v2\030\002 \001(\tH\000\022\023\n\013description\030\005 \001(\tB\010\n" + + "\006intent\"\317\001\n\026DialogflowAssistAnswer\022D\n\014qu" + + "ery_result\030\001 \001(\0132,.google.cloud.dialogfl" + + "ow.v2beta1.QueryResultH\000\022N\n\021intent_sugge" + + "stion\030\005 \001(\01321.google.cloud.dialogflow.v2" + + "beta1.IntentSuggestionH\000\022\025\n\ranswer_recor" + + "d\030\002 \001(\tB\010\n\006result\"\334\004\n\020SuggestionResult\022#" + + "\n\005error\030\001 \001(\0132\022.google.rpc.StatusH\000\022]\n\031s" + + "uggest_articles_response\030\002 \001(\01328.google." + + "cloud.dialogflow.v2beta1.SuggestArticles" + + "ResponseH\000\022b\n\034suggest_faq_answers_respon" + + "se\030\003 \001(\0132:.google.cloud.dialogflow.v2bet" + + "a1.SuggestFaqAnswersResponseH\000\022f\n\036sugges" + + "t_smart_replies_response\030\004 \001(\0132<.google." + + "cloud.dialogflow.v2beta1.SuggestSmartRep" + + "liesResponseH\000\022p\n#suggest_dialogflow_ass" + + "ists_response\030\005 \001(\0132A.google.cloud.dialo" + + "gflow.v2beta1.SuggestDialogflowAssistsRe" + + "sponseH\000\022o\n\"suggest_entity_extraction_re" + + "sponse\030\007 \001(\0132A.google.cloud.dialogflow.v" + + "2beta1.SuggestDialogflowAssistsResponseH" + + "\000B\025\n\023suggestion_response\"\223\002\n\026SuggestArti" + + "clesRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%di" + + "alogflow.googleapis.com/Participant\022B\n\016l" + + "atest_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow" + + ".googleapis.com/Message\022\032\n\014context_size\030" + + "\003 \001(\005B\004\342A\001\001\022Y\n\023assist_query_params\030\004 \001(\013" + + "26.google.cloud.dialogflow.v2beta1.Assis" + + "tQueryParametersB\004\342A\001\001\"\220\001\n\027SuggestArticl" + + "esResponse\022G\n\017article_answers\030\001 \003(\0132..go" + + "ogle.cloud.dialogflow.v2beta1.ArticleAns" + + "wer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_s" + + "ize\030\003 \001(\005\"\225\002\n\030SuggestFaqAnswersRequest\022>" + + "\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.goog" + + "leapis.com/Participant\022B\n\016latest_message" + + "\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow.googleapis.c" + + "om/Message\022\032\n\014context_size\030\003 \001(\005B\004\342A\001\001\022Y" + + "\n\023assist_query_params\030\004 \001(\01326.google.clo" + + "ud.dialogflow.v2beta1.AssistQueryParamet" + + "ersB\004\342A\001\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\"\372\001\n\032Sugge" + + "stSmartRepliesRequest\022>\n\006parent\030\001 \001(\tB.\342" + + "A\001\002\372A\'\n%dialogflow.googleapis.com/Partic" + + "ipant\022F\n\022current_text_input\030\004 \001(\0132*.goog" + + "le.cloud.dialogflow.v2beta1.TextInput\022>\n" + + "\016latest_message\030\002 \001(\tB&\372A#\n!dialogflow.g" + + "oogleapis.com/Message\022\024\n\014context_size\030\003 " + + "\001(\005\"\303\001\n\033SuggestSmartRepliesResponse\022N\n\023s" + + "mart_reply_answers\030\001 \003(\01321.google.cloud." + + "dialogflow.v2beta1.SmartReplyAnswer\022>\n\016l" + + "atest_message\030\002 \001(\tB&\372A#\n!dialogflow.goo" + + "gleapis.com/Message\022\024\n\014context_size\030\003 \001(" + + "\005\"\254\001\n SuggestDialogflowAssistsResponse\022Z" + + "\n\031dialogflow_assist_answers\030\001 \003(\01327.goog" + + "le.cloud.dialogflow.v2beta1.DialogflowAs" + + "sistAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014co" + + "ntext_size\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.d" + + "ialogflow.v2beta1.Suggestion.Article\022J\n\013" + + "faq_answers\030\004 \003(\01325.google.cloud.dialogf" + + "low.v2beta1.Suggestion.FaqAnswer\022/\n\013crea" + + "te_time\030\005 \001(\0132\032.google.protobuf.Timestam" + + "p\022\026\n\016latest_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\010metadata\030\005 \003(\0132A.google.cloud.dia" + + "logflow.v2beta1.Suggestion.Article.Metad" + + "ataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetad" + + "ataEntry\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\nconfid" + + "ence\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004" + + " \001(\t\022U\n\010metadata\030\005 \003(\0132C.google.cloud.di" + + "alogflow.v2beta1.Suggestion.FaqAnswer.Me" + + "tadataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMe" + + "tadataEntry\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\006par" + + "ent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" + + "en\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t:\002\030\001\"x\n\027ListSugg" + + "estionsResponse\022@\n\013suggestions\030\001 \003(\0132+.g" + + "oogle.cloud.dialogflow.v2beta1.Suggestio" + + "n\022\027\n\017next_page_token\030\002 \001(\t:\002\030\001\"\\\n\030Compil" + + "eSuggestionRequest\022\016\n\006parent\030\001 \001(\t\022\026\n\016la" + + "test_message\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005" + + ":\002\030\001\"\216\001\n\031CompileSuggestionResponse\022?\n\nsu" + + "ggestion\030\001 \001(\0132+.google.cloud.dialogflow" + + ".v2beta1.Suggestion\022\026\n\016latest_message\030\002 " + + "\001(\t\022\024\n\014context_size\030\003 \001(\005:\002\030\001\"\203\007\n\017Respon" + + "seMessage\022E\n\004text\030\001 \001(\01325.google.cloud.d" + + "ialogflow.v2beta1.ResponseMessage.TextH\000" + + "\022*\n\007payload\030\002 \001(\0132\027.google.protobuf.Stru" + + "ctH\000\022_\n\022live_agent_handoff\030\003 \001(\0132A.googl" + "e.cloud.dialogflow.v2beta1.ResponseMessa" - + "ge.MixedAudioH\000\022i\n\027telephony_transfer_ca" - + "ll\030\006 \001(\0132F.google.cloud.dialogflow.v2bet" - + "a1.ResponseMessage.TelephonyTransferCall" - + "H\000\032\024\n\004Text\022\014\n\004text\030\001 \003(\t\032=\n\020LiveAgentHan" - + "doff\022)\n\010metadata\030\001 \001(\0132\027.google.protobuf" - + ".Struct\032\020\n\016EndInteraction\032\276\001\n\nMixedAudio" - + "\022U\n\010segments\030\001 \003(\0132C.google.cloud.dialog" - + "flow.v2beta1.ResponseMessage.MixedAudio." - + "Segment\032Y\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003u" - + "ri\030\002 \001(\tH\000\022#\n\033allow_playback_interruptio" - + "n\030\003 \001(\010B\t\n\007content\032N\n\025TelephonyTransferC" - + "all\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\014Partic" - + "ipants\022\271\002\n\021CreateParticipant\0229.google.cl" - + "oud.dialogflow.v2beta1.CreateParticipant" - + "Request\032,.google.cloud.dialogflow.v2beta" - + "1.Participant\"\272\001\332A\022parent,participant\202\323\344" - + "\223\002\236\001\"9/v2beta1/{parent=projects/*/conver" - + "sations/*}/participants:\013participantZT\"E" - + "/v2beta1/{parent=projects/*/locations/*/" - + "conversations/*}/participants:\013participa" - + "nt\022\213\002\n\016GetParticipant\0226.google.cloud.dia" - + "logflow.v2beta1.GetParticipantRequest\032,." - + "google.cloud.dialogflow.v2beta1.Particip" - + "ant\"\222\001\332A\004name\202\323\344\223\002\204\001\0229/v2beta1/{name=pro" - + "jects/*/conversations/*/participants/*}Z" - + "G\022E/v2beta1/{name=projects/*/locations/*" - + "/conversations/*/participants/*}\022\236\002\n\020Lis" - + "tParticipants\0228.google.cloud.dialogflow." - + "v2beta1.ListParticipantsRequest\0329.google" - + ".cloud.dialogflow.v2beta1.ListParticipan" - + "tsResponse\"\224\001\332A\006parent\202\323\344\223\002\204\001\0229/v2beta1/" - + "{parent=projects/*/conversations/*}/part" - + "icipantsZG\022E/v2beta1/{parent=projects/*/" - + "locations/*/conversations/*}/participant" - + "s\022\326\002\n\021UpdateParticipant\0229.google.cloud.d" - + "ialogflow.v2beta1.UpdateParticipantReque" - + "st\032,.google.cloud.dialogflow.v2beta1.Par" - + "ticipant\"\327\001\332A\027participant,update_mask\202\323\344" - + "\223\002\266\0012E/v2beta1/{participant.name=project" + + "ge.LiveAgentHandoffH\000\022Z\n\017end_interaction" + + "\030\004 \001(\0132?.google.cloud.dialogflow.v2beta1" + + ".ResponseMessage.EndInteractionH\000\022R\n\013mix" + + "ed_audio\030\005 \001(\0132;.google.cloud.dialogflow" + + ".v2beta1.ResponseMessage.MixedAudioH\000\022i\n" + + "\027telephony_transfer_call\030\006 \001(\0132F.google." + + "cloud.dialogflow.v2beta1.ResponseMessage" + + ".TelephonyTransferCallH\000\032\024\n\004Text\022\014\n\004text" + + "\030\001 \003(\t\032=\n\020LiveAgentHandoff\022)\n\010metadata\030\001" + + " \001(\0132\027.google.protobuf.Struct\032\020\n\016EndInte" + + "raction\032\276\001\n\nMixedAudio\022U\n\010segments\030\001 \003(\013" + + "2C.google.cloud.dialogflow.v2beta1.Respo" + + "nseMessage.MixedAudio.Segment\032Y\n\007Segment" + + "\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022#\n\033allo" + + "w_playback_interruption\030\003 \001(\010B\t\n\007content" + + "\032N\n\025TelephonyTransferCall\022\026\n\014phone_numbe" + + "r\030\001 \001(\tH\000\022\021\n\007sip_uri\030\002 \001(\tH\000B\n\n\010endpoint" + + "B\t\n\007message2\207\033\n\014Participants\022\271\002\n\021CreateP" + + "articipant\0229.google.cloud.dialogflow.v2b" + + "eta1.CreateParticipantRequest\032,.google.c" + + "loud.dialogflow.v2beta1.Participant\"\272\001\332A" + + "\022parent,participant\202\323\344\223\002\236\001\"9/v2beta1/{pa" + + "rent=projects/*/conversations/*}/partici" + + "pants:\013participantZT\"E/v2beta1/{parent=p" + + "rojects/*/locations/*/conversations/*}/p" + + "articipants:\013participant\022\213\002\n\016GetParticip" + + "ant\0226.google.cloud.dialogflow.v2beta1.Ge" + + "tParticipantRequest\032,.google.cloud.dialo" + + "gflow.v2beta1.Participant\"\222\001\332A\004name\202\323\344\223\002" + + "\204\001\0229/v2beta1/{name=projects/*/conversati" + + "ons/*/participants/*}ZG\022E/v2beta1/{name=" + + "projects/*/locations/*/conversations/*/p" + + "articipants/*}\022\236\002\n\020ListParticipants\0228.go" + + "ogle.cloud.dialogflow.v2beta1.ListPartic" + + "ipantsRequest\0329.google.cloud.dialogflow." + + "v2beta1.ListParticipantsResponse\"\224\001\332A\006pa" + + "rent\202\323\344\223\002\204\001\0229/v2beta1/{parent=projects/*" + + "/conversations/*}/participantsZG\022E/v2bet" + + "a1/{parent=projects/*/locations/*/conver" + + "sations/*}/participants\022\326\002\n\021UpdatePartic" + + "ipant\0229.google.cloud.dialogflow.v2beta1." + + "UpdateParticipantRequest\032,.google.cloud." + + "dialogflow.v2beta1.Participant\"\327\001\332A\027part" + + "icipant,update_mask\202\323\344\223\002\266\0012E/v2beta1/{pa" + + "rticipant.name=projects/*/conversations/" + + "*/participants/*}:\013participantZ`2Q/v2bet" + + "a1/{participant.name=projects/*/location" + "s/*/conversations/*/participants/*}:\013par" - + "ticipantZ`2Q/v2beta1/{participant.name=p" - + "rojects/*/locations/*/conversations/*/pa" - + "rticipants/*}:\013participant\022\216\003\n\016AnalyzeCo" - + "ntent\0226.google.cloud.dialogflow.v2beta1." - + "AnalyzeContentRequest\0327.google.cloud.dia" - + "logflow.v2beta1.AnalyzeContentResponse\"\212" - + "\002\332A\026participant,text_input\332A\027participant" - + ",audio_input\332A\027participant,event_input\202\323" - + "\344\223\002\266\001\"O/v2beta1/{participant=projects/*/" + + "ticipant\022\216\003\n\016AnalyzeContent\0226.google.clo" + + "ud.dialogflow.v2beta1.AnalyzeContentRequ" + + "est\0327.google.cloud.dialogflow.v2beta1.An" + + "alyzeContentResponse\"\212\002\332A\026participant,te" + + "xt_input\332A\027participant,audio_input\332A\027par" + + "ticipant,event_input\202\323\344\223\002\266\001\"O/v2beta1/{p" + + "articipant=projects/*/conversations/*/pa" + + "rticipants/*}:analyzeContent:\001*Z`\"[/v2be" + + "ta1/{participant=projects/*/locations/*/" + "conversations/*/participants/*}:analyzeC" - + "ontent:\001*Z`\"[/v2beta1/{participant=proje" - + "cts/*/locations/*/conversations/*/partic" - + "ipants/*}:analyzeContent:\001*\022\242\001\n\027Streamin" - + "gAnalyzeContent\022?.google.cloud.dialogflo" - + "w.v2beta1.StreamingAnalyzeContentRequest" - + "\032@.google.cloud.dialogflow.v2beta1.Strea" - + "mingAnalyzeContentResponse\"\000(\0010\001\022\335\002\n\017Sug" - + "gestArticles\0227.google.cloud.dialogflow.v" - + "2beta1.SuggestArticlesRequest\0328.google.c" - + "loud.dialogflow.v2beta1.SuggestArticlesR" - + "esponse\"\326\001\332A\006parent\202\323\344\223\002\306\001\"W/v2beta1/{pa" - + "rent=projects/*/conversations/*/particip" - + "ants/*}/suggestions:suggestArticles:\001*Zh" - + "\"c/v2beta1/{parent=projects/*/locations/" - + "*/conversations/*/participants/*}/sugges" - + "tions:suggestArticles:\001*\022\347\002\n\021SuggestFaqA" - + "nswers\0229.google.cloud.dialogflow.v2beta1" - + ".SuggestFaqAnswersRequest\032:.google.cloud" - + ".dialogflow.v2beta1.SuggestFaqAnswersRes" - + "ponse\"\332\001\332A\006parent\202\323\344\223\002\312\001\"Y/v2beta1/{pare" - + "nt=projects/*/conversations/*/participan" - + "ts/*}/suggestions:suggestFaqAnswers:\001*Zj" - + "\"e/v2beta1/{parent=projects/*/locations/" - + "*/conversations/*/participants/*}/sugges" - + "tions:suggestFaqAnswers:\001*\022\361\002\n\023SuggestSm" - + "artReplies\022;.google.cloud.dialogflow.v2b" - + "eta1.SuggestSmartRepliesRequest\032<.google" - + ".cloud.dialogflow.v2beta1.SuggestSmartRe" - + "pliesResponse\"\336\001\332A\006parent\202\323\344\223\002\316\001\"[/v2bet" - + "a1/{parent=projects/*/conversations/*/pa" - + "rticipants/*}/suggestions:suggestSmartRe" - + "plies:\001*Zl\"g/v2beta1/{parent=projects/*/" - + "locations/*/conversations/*/participants" - + "/*}/suggestions:suggestSmartReplies:\001*\022\330" - + "\001\n\017ListSuggestions\0227.google.cloud.dialog" - + "flow.v2beta1.ListSuggestionsRequest\0328.go" - + "ogle.cloud.dialogflow.v2beta1.ListSugges" - + "tionsResponse\"R\210\002\001\202\323\344\223\002I\022G/v2beta1/{pare" - + "nt=projects/*/conversations/*/participan" - + "ts/*}/suggestions\022\351\001\n\021CompileSuggestion\022" - + "9.google.cloud.dialogflow.v2beta1.Compil" - + "eSuggestionRequest\032:.google.cloud.dialog" - + "flow.v2beta1.CompileSuggestionResponse\"]" - + "\210\002\001\202\323\344\223\002T\"O/v2beta1/{parent=projects/*/c" - + "onversations/*/participants/*}/suggestio" - + "ns:compile:\001*\032x\312A\031dialogflow.googleapis." - + "com\322AYhttps://www.googleapis.com/auth/cl" - + "oud-platform,https://www.googleapis.com/" - + "auth/dialogflowB\250\001\n#com.google.cloud.dia" - + "logflow.v2beta1B\020ParticipantProtoP\001ZCclo" - + "ud.google.com/go/dialogflow/apiv2beta1/d" - + "ialogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\037Googl" - + "e.Cloud.Dialogflow.V2Beta1b\006proto3" + + "ontent:\001*\022\242\001\n\027StreamingAnalyzeContent\022?." + + "google.cloud.dialogflow.v2beta1.Streamin" + + "gAnalyzeContentRequest\032@.google.cloud.di" + + "alogflow.v2beta1.StreamingAnalyzeContent" + + "Response\"\000(\0010\001\022\335\002\n\017SuggestArticles\0227.goo" + + "gle.cloud.dialogflow.v2beta1.SuggestArti" + + "clesRequest\0328.google.cloud.dialogflow.v2" + + "beta1.SuggestArticlesResponse\"\326\001\332A\006paren" + + "t\202\323\344\223\002\306\001\"W/v2beta1/{parent=projects/*/co" + + "nversations/*/participants/*}/suggestion" + + "s:suggestArticles:\001*Zh\"c/v2beta1/{parent" + + "=projects/*/locations/*/conversations/*/" + + "participants/*}/suggestions:suggestArtic" + + "les:\001*\022\347\002\n\021SuggestFaqAnswers\0229.google.cl" + + "oud.dialogflow.v2beta1.SuggestFaqAnswers" + + "Request\032:.google.cloud.dialogflow.v2beta" + + "1.SuggestFaqAnswersResponse\"\332\001\332A\006parent\202" + + "\323\344\223\002\312\001\"Y/v2beta1/{parent=projects/*/conv" + + "ersations/*/participants/*}/suggestions:" + + "suggestFaqAnswers:\001*Zj\"e/v2beta1/{parent" + + "=projects/*/locations/*/conversations/*/" + + "participants/*}/suggestions:suggestFaqAn" + + "swers:\001*\022\361\002\n\023SuggestSmartReplies\022;.googl" + + "e.cloud.dialogflow.v2beta1.SuggestSmartR" + + "epliesRequest\032<.google.cloud.dialogflow." + + "v2beta1.SuggestSmartRepliesResponse\"\336\001\332A" + + "\006parent\202\323\344\223\002\316\001\"[/v2beta1/{parent=project" + + "s/*/conversations/*/participants/*}/sugg" + + "estions:suggestSmartReplies:\001*Zl\"g/v2bet" + + "a1/{parent=projects/*/locations/*/conver" + + "sations/*/participants/*}/suggestions:su" + + "ggestSmartReplies:\001*\022\330\001\n\017ListSuggestions" + + "\0227.google.cloud.dialogflow.v2beta1.ListS" + + "uggestionsRequest\0328.google.cloud.dialogf" + + "low.v2beta1.ListSuggestionsResponse\"R\210\002\001" + + "\202\323\344\223\002I\022G/v2beta1/{parent=projects/*/conv" + + "ersations/*/participants/*}/suggestions\022" + + "\351\001\n\021CompileSuggestion\0229.google.cloud.dia" + + "logflow.v2beta1.CompileSuggestionRequest" + + "\032:.google.cloud.dialogflow.v2beta1.Compi" + + "leSuggestionResponse\"]\210\002\001\202\323\344\223\002T\"O/v2beta" + + "1/{parent=projects/*/conversations/*/par" + + "ticipants/*}/suggestions:compile:\001*\032x\312A\031" + + "dialogflow.googleapis.com\322AYhttps://www." + + "googleapis.com/auth/cloud-platform,https" + + "://www.googleapis.com/auth/dialogflowB\250\001" + + "\n#com.google.cloud.dialogflow.v2beta1B\020P" + + "articipantProtoP\001ZCcloud.google.com/go/d" + + "ialogflow/apiv2beta1/dialogflowpb;dialog" + + "flowpb\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow" + + ".V2Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java index 4f80719c5c65..5bc4d5b9b049 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java @@ -43,6 +43,7 @@ private QueryParameters() { sessionEntityTypes_ = java.util.Collections.emptyList(); knowledgeBaseNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); subAgents_ = java.util.Collections.emptyList(); + platform_ = ""; } @java.lang.Override @@ -779,6 +780,65 @@ public java.lang.String getWebhookHeadersOrThrow(java.lang.String key) { return map.get(key); } + public static final int PLATFORM_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object platform_ = ""; + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The platform. + */ + @java.lang.Override + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + 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(); + platform_ = s; + return s; + } + } + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -822,6 +882,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetWebhookHeaders(), WebhookHeadersDefaultEntryHolder.defaultEntry, 14); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(platform_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, platform_); + } getUnknownFields().writeTo(output); } @@ -876,6 +939,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, webhookHeaders__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(platform_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, platform_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -913,6 +979,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getSubAgentsList().equals(other.getSubAgentsList())) return false; if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false; + if (!getPlatform().equals(other.getPlatform())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -960,6 +1027,8 @@ public int hashCode() { hash = (37 * hash) + WEBHOOK_HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetWebhookHeaders().hashCode(); } + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1159,6 +1228,7 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableWebhookHeaders().clear(); + platform_ = ""; return this; } @@ -1254,6 +1324,9 @@ private void buildPartial0(com.google.cloud.dialogflow.v2beta1.QueryParameters r result.webhookHeaders_ = internalGetWebhookHeaders(); result.webhookHeaders_.makeImmutable(); } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.platform_ = platform_; + } } @java.lang.Override @@ -1412,6 +1485,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.QueryParameters oth } internalGetMutableWebhookHeaders().mergeFrom(other.internalGetWebhookHeaders()); bitField0_ |= 0x00000200; + if (!other.getPlatform().isEmpty()) { + platform_ = other.platform_; + bitField0_ |= 0x00000400; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1529,6 +1607,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000200; break; } // case 114 + case 146: + { + platform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3954,6 +4038,132 @@ public Builder putAllWebhookHeaders(java.util.Map + * The platform of the virtual agent response messages. + * + * If not empty, only emits messages from this platform in the response. + * Valid values are the enum names of + * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform]. + * + * + * string platform = 18; + * + * @return The platform. + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + public com.google.protobuf.ByteString getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + platform_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + platform_ = getDefaultInstance().getPlatform(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * The platform of the virtual agent response messages.
+     *
+     * If not empty, only emits messages from this platform in the response.
+     * Valid values are the enum names of
+     * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+     * 
+ * + * string platform = 18; + * + * @param value The bytes for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + platform_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java index b1eb2278c3f9..38616f0a627d 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java @@ -545,4 +545,37 @@ java.lang.String getWebhookHeadersOrDefault( * map<string, string> webhook_headers = 14; */ java.lang.String getWebhookHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The platform. + */ + java.lang.String getPlatform(); + /** + * + * + *
+   * The platform of the virtual agent response messages.
+   *
+   * If not empty, only emits messages from this platform in the response.
+   * Valid values are the enum names of
+   * [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform].
+   * 
+ * + * string platform = 18; + * + * @return The bytes for platform. + */ + com.google.protobuf.ByteString getPlatformBytes(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswer.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswer.java new file mode 100644 index 000000000000..bcfcca599c64 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswer.java @@ -0,0 +1,2801 @@ +/* + * Copyright 2023 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; + +/** + * + * + *
+ * Represents a SearchKnowledge answer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer} + */ +public final class SearchKnowledgeAnswer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) + SearchKnowledgeAnswerOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeAnswer.newBuilder() to construct. + private SearchKnowledgeAnswer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeAnswer() { + answer_ = ""; + answerType_ = 0; + answerSources_ = java.util.Collections.emptyList(); + answerRecord_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeAnswer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder.class); + } + + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType} + */ + public enum AnswerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The answer has a unspecified type.
+     * 
+ * + * ANSWER_TYPE_UNSPECIFIED = 0; + */ + ANSWER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The answer is from FAQ doucments.
+     * 
+ * + * FAQ = 1; + */ + FAQ(1), + /** + * + * + *
+     * The answer is from generative model.
+     * 
+ * + * GENERATIVE = 2; + */ + GENERATIVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The answer has a unspecified type.
+     * 
+ * + * ANSWER_TYPE_UNSPECIFIED = 0; + */ + public static final int ANSWER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The answer is from FAQ doucments.
+     * 
+ * + * FAQ = 1; + */ + public static final int FAQ_VALUE = 1; + /** + * + * + *
+     * The answer is from generative model.
+     * 
+ * + * GENERATIVE = 2; + */ + public static final int GENERATIVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AnswerType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AnswerType forNumber(int value) { + switch (value) { + case 0: + return ANSWER_TYPE_UNSPECIFIED; + case 1: + return FAQ; + case 2: + return GENERATIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnswerType findValueByNumber(int number) { + return AnswerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AnswerType[] VALUES = values(); + + public static AnswerType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnswerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType) + } + + public interface AnswerSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + java.lang.String getSnippet(); + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + com.google.protobuf.ByteString getSnippetBytes(); + } + /** + * + * + *
+   * The sources of the answers.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource} + */ + public static final class AnswerSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) + AnswerSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerSource.newBuilder() to construct. + private AnswerSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerSource() { + title_ = ""; + uri_ = ""; + snippet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+     * The title of the article.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * The URI of the article.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SNIPPET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object snippet_ = ""; + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + @java.lang.Override + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + 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(); + snippet_ = s; + return s; + } + } + /** + * + * + *
+     * The relevant snippet of the article.
+     * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = 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(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snippet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snippet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snippet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snippet_); + } + size += getUnknownFields().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.SearchKnowledgeAnswer.AnswerSource)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource other = + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getSnippet().equals(other.getSnippet())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getSnippet().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + 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.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource 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.SearchKnowledgeAnswer.AnswerSource 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 sources of the answers.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_AnswerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + uri_ = ""; + snippet_ = ""; + 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_SearchKnowledgeAnswer_AnswerSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource build() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource buildPartial() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource result = + new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.snippet_ = snippet_; + } + } + + @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.SearchKnowledgeAnswer.AnswerSource) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource other) { + if (other + == com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSnippet().isEmpty()) { + snippet_ = other.snippet_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + snippet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The title of the article.
+       * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the article.
+       * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object snippet_ = ""; + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return The snippet. + */ + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return The bytes for snippet. + */ + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @param value The snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snippet_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @return This builder for chaining. + */ + public Builder clearSnippet() { + snippet_ = getDefaultInstance().getSnippet(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The relevant snippet of the article.
+       * 
+ * + * string snippet = 3; + * + * @param value The bytes for snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snippet_ = value; + bitField0_ |= 0x00000004; + 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.SearchKnowledgeAnswer.AnswerSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource) + private static final com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource(); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.SearchKnowledgeAnswer.AnswerSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANSWER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object answer_ = ""; + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The answer. + */ + @java.lang.Override + public java.lang.String getAnswer() { + java.lang.Object ref = answer_; + 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(); + answer_ = s; + return s; + } + } + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerBytes() { + java.lang.Object ref = answer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANSWER_TYPE_FIELD_NUMBER = 2; + private int answerType_ = 0; + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The enum numeric value on the wire for answerType. + */ + @java.lang.Override + public int getAnswerTypeValue() { + return answerType_; + } + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The answerType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType getAnswerType() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType result = + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType.forNumber(answerType_); + return result == null + ? com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType.UNRECOGNIZED + : result; + } + + public static final int ANSWER_SOURCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + answerSources_; + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public java.util.List + getAnswerSourcesList() { + return answerSources_; + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList() { + return answerSources_; + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public int getAnswerSourcesCount() { + return answerSources_.size(); + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource getAnswerSources( + int index) { + return answerSources_.get(index); + } + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index) { + return answerSources_.get(index); + } + + public static final int ANSWER_RECORD_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerRecord_ = ""; + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @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(answer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, answer_); + } + if (answerType_ + != com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType + .ANSWER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, answerType_); + } + for (int i = 0; i < answerSources_.size(); i++) { + output.writeMessage(3, answerSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, answerRecord_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, answer_); + } + if (answerType_ + != com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType + .ANSWER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, answerType_); + } + for (int i = 0; i < answerSources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, answerSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, answerRecord_); + } + size += getUnknownFields().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.SearchKnowledgeAnswer)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer other = + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) obj; + + if (!getAnswer().equals(other.getAnswer())) return false; + if (answerType_ != other.answerType_) return false; + if (!getAnswerSourcesList().equals(other.getAnswerSourcesList())) return false; + if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getAnswer().hashCode(); + hash = (37 * hash) + ANSWER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + answerType_; + if (getAnswerSourcesCount() > 0) { + hash = (37 * hash) + ANSWER_SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getAnswerSourcesList().hashCode(); + } + hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer 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.SearchKnowledgeAnswer 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; + } + /** + * + * + *
+   * Represents a SearchKnowledge answer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answer_ = ""; + answerType_ = 0; + if (answerSourcesBuilder_ == null) { + answerSources_ = java.util.Collections.emptyList(); + } else { + answerSources_ = null; + answerSourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + 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_SearchKnowledgeAnswer_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer build() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer buildPartial() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer result = + new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer result) { + if (answerSourcesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + answerSources_ = java.util.Collections.unmodifiableList(answerSources_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.answerSources_ = answerSources_; + } else { + result.answerSources_ = answerSourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answer_ = answer_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.answerType_ = answerType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.answerRecord_ = answerRecord_; + } + } + + @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.SearchKnowledgeAnswer) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer other) { + if (other == com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.getDefaultInstance()) + return this; + if (!other.getAnswer().isEmpty()) { + answer_ = other.answer_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.answerType_ != 0) { + setAnswerTypeValue(other.getAnswerTypeValue()); + } + if (answerSourcesBuilder_ == null) { + if (!other.answerSources_.isEmpty()) { + if (answerSources_.isEmpty()) { + answerSources_ = other.answerSources_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAnswerSourcesIsMutable(); + answerSources_.addAll(other.answerSources_); + } + onChanged(); + } + } else { + if (!other.answerSources_.isEmpty()) { + if (answerSourcesBuilder_.isEmpty()) { + answerSourcesBuilder_.dispose(); + answerSourcesBuilder_ = null; + answerSources_ = other.answerSources_; + bitField0_ = (bitField0_ & ~0x00000004); + answerSourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnswerSourcesFieldBuilder() + : null; + } else { + answerSourcesBuilder_.addAllMessages(other.answerSources_); + } + } + } + if (!other.getAnswerRecord().isEmpty()) { + answerRecord_ = other.answerRecord_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + answer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + answerType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource m = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + .parser(), + extensionRegistry); + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(m); + } else { + answerSourcesBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + answerRecord_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object answer_ = ""; + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return The answer. + */ + public java.lang.String getAnswer() { + java.lang.Object ref = answer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + public com.google.protobuf.ByteString getAnswerBytes() { + java.lang.Object ref = answer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @param value The answer to set. + * @return This builder for chaining. + */ + public Builder setAnswer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + answer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @return This builder for chaining. + */ + public Builder clearAnswer() { + answer_ = getDefaultInstance().getAnswer(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The piece of text from the knowledge base documents that answers
+     * the search query
+     * 
+ * + * string answer = 1; + * + * @param value The bytes for answer to set. + * @return This builder for chaining. + */ + public Builder setAnswerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + answer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int answerType_ = 0; + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * + * @return The enum numeric value on the wire for answerType. + */ + @java.lang.Override + public int getAnswerTypeValue() { + return answerType_; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * + * @param value The enum numeric value on the wire for answerType to set. + * @return This builder for chaining. + */ + public Builder setAnswerTypeValue(int value) { + answerType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * + * @return The answerType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType getAnswerType() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType result = + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType.forNumber( + answerType_); + return result == null + ? com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * + * @param value The answerType to set. + * @return This builder for chaining. + */ + public Builder setAnswerType( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + answerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the answer.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearAnswerType() { + bitField0_ = (bitField0_ & ~0x00000002); + answerType_ = 0; + onChanged(); + return this; + } + + private java.util.List + answerSources_ = java.util.Collections.emptyList(); + + private void ensureAnswerSourcesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + answerSources_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource>( + answerSources_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + answerSourcesBuilder_; + + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List + getAnswerSourcesList() { + if (answerSourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(answerSources_); + } else { + return answerSourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public int getAnswerSourcesCount() { + if (answerSourcesBuilder_ == null) { + return answerSources_.size(); + } else { + return answerSourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource getAnswerSources( + int index) { + if (answerSourcesBuilder_ == null) { + return answerSources_.get(index); + } else { + return answerSourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder setAnswerSources( + int index, com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.set(index, value); + onChanged(); + } else { + answerSourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder setAnswerSources( + int index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.set(index, builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.add(value); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + int index, com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource value) { + if (answerSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSourcesIsMutable(); + answerSources_.add(index, value); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAnswerSources( + int index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + builderForValue) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.add(index, builderForValue.build()); + onChanged(); + } else { + answerSourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder addAllAnswerSources( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource> + values) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, answerSources_); + onChanged(); + } else { + answerSourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder clearAnswerSources() { + if (answerSourcesBuilder_ == null) { + answerSources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + answerSourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public Builder removeAnswerSources(int index) { + if (answerSourcesBuilder_ == null) { + ensureAnswerSourcesIsMutable(); + answerSources_.remove(index); + onChanged(); + } else { + answerSourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + getAnswerSourcesBuilder(int index) { + return getAnswerSourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index) { + if (answerSourcesBuilder_ == null) { + return answerSources_.get(index); + } else { + return answerSourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList() { + if (answerSourcesBuilder_ != null) { + return answerSourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(answerSources_); + } + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + addAnswerSourcesBuilder() { + return getAnswerSourcesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder + addAnswerSourcesBuilder(int index) { + return getAnswerSourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource + .getDefaultInstance()); + } + /** + * + * + *
+     * All sources used to generate the answer.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + public java.util.List< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder> + getAnswerSourcesBuilderList() { + return getAnswerSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesFieldBuilder() { + if (answerSourcesBuilder_ == null) { + answerSourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder>( + answerSources_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + answerSources_ = null; + } + return answerSourcesBuilder_; + } + + private java.lang.Object answerRecord_ = ""; + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @return This builder for chaining. + */ + public Builder clearAnswerRecord() { + answerRecord_ = getDefaultInstance().getAnswerRecord(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the answer record.
+     * Format: `projects/<Project ID>/locations/<location ID>/answer
+     * Records/<Answer Record ID>`
+     * 
+ * + * string answer_record = 5; + * + * @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; + bitField0_ |= 0x00000008; + 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.SearchKnowledgeAnswer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) + private static final com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer(); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.SearchKnowledgeAnswer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswerOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswerOrBuilder.java new file mode 100644 index 000000000000..3829ee781706 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeAnswerOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2023 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 SearchKnowledgeAnswerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The answer. + */ + java.lang.String getAnswer(); + /** + * + * + *
+   * The piece of text from the knowledge base documents that answers
+   * the search query
+   * 
+ * + * string answer = 1; + * + * @return The bytes for answer. + */ + com.google.protobuf.ByteString getAnswerBytes(); + + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The enum numeric value on the wire for answerType. + */ + int getAnswerTypeValue(); + /** + * + * + *
+   * The type of the answer.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType answer_type = 2; + * + * @return The answerType. + */ + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerType getAnswerType(); + + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + java.util.List + getAnswerSourcesList(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource getAnswerSources( + int index); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + int getAnswerSourcesCount(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder> + getAnswerSourcesOrBuilderList(); + /** + * + * + *
+   * All sources used to generate the answer.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSource answer_sources = 3; + * + */ + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.AnswerSourceOrBuilder + getAnswerSourcesOrBuilder(int index); + + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @return The answerRecord. + */ + java.lang.String getAnswerRecord(); + /** + * + * + *
+   * The name of the answer record.
+   * Format: `projects/<Project ID>/locations/<location ID>/answer
+   * Records/<Answer Record ID>`
+   * 
+ * + * string answer_record = 5; + * + * @return The bytes for answerRecord. + */ + com.google.protobuf.ByteString getAnswerRecordBytes(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequest.java new file mode 100644 index 000000000000..df92fcde9851 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequest.java @@ -0,0 +1,1762 @@ +/* + * Copyright 2023 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.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest} + */ +public final class SearchKnowledgeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) + SearchKnowledgeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeRequest.newBuilder() to construct. + private SearchKnowledgeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeRequest() { + parent_ = ""; + conversationProfile_ = ""; + sessionId_ = ""; + conversation_ = ""; + latestMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.v2beta1.TextInput query_; + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return query_ != null; + } + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TextInput getQuery() { + return query_ == null + ? com.google.cloud.dialogflow.v2beta1.TextInput.getDefaultInstance() + : query_; + } + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.cloud.dialogflow.v2beta1.TextInput.getDefaultInstance() + : query_; + } + + public static final int CONVERSATION_PROFILE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversationProfile_ = ""; + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + @java.lang.Override + public java.lang.String getConversationProfile() { + java.lang.Object ref = conversationProfile_; + 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(); + conversationProfile_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationProfileBytes() { + java.lang.Object ref = conversationProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + 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(); + sessionId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversation_ = ""; + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object latestMessage_ = ""; + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.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 when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.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; + } + } + + 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 (query_ != null) { + output.writeMessage(1, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, conversationProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sessionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, latestMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (query_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, conversationProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sessionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, latestMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, parent_); + } + size += getUnknownFields().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.SearchKnowledgeRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest other = + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getConversationProfile().equals(other.getConversationProfile())) return false; + if (!getSessionId().equals(other.getSessionId())) return false; + if (!getConversation().equals(other.getConversation())) return false; + if (!getLatestMessage().equals(other.getLatestMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + CONVERSATION_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getConversationProfile().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest 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.SearchKnowledgeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest 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.SearchKnowledgeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest 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.SearchKnowledgeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest 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.SearchKnowledgeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest 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.SearchKnowledgeRequest 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.SearchKnowledgeRequest 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.SearchKnowledgeRequest 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.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + conversationProfile_ = ""; + sessionId_ = ""; + conversation_ = ""; + latestMessage_ = ""; + 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_SearchKnowledgeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest build() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest buildPartial() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest result = + new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.conversationProfile_ = conversationProfile_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sessionId_ = sessionId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.conversation_ = conversation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.latestMessage_ = latestMessage_; + } + } + + @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.SearchKnowledgeRequest) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest other) { + if (other == com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getConversationProfile().isEmpty()) { + conversationProfile_ = other.conversationProfile_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getConversation().isEmpty()) { + conversation_ = other.conversation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getLatestMessage().isEmpty()) { + latestMessage_ = other.latestMessage_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + conversationProfile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + conversation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + latestMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent resource contains the conversation profile
+     * Format: 'projects/<Project ID>' or `projects/<Project
+     * ID>/locations/<Location ID>`.
+     * 
+ * + * string parent = 6; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.v2beta1.TextInput query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TextInput, + com.google.cloud.dialogflow.v2beta1.TextInput.Builder, + com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + public com.google.cloud.dialogflow.v2beta1.TextInput getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.dialogflow.v2beta1.TextInput.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.dialogflow.v2beta1.TextInput value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.dialogflow.v2beta1.TextInput.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQuery(com.google.cloud.dialogflow.v2beta1.TextInput value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && query_ != null + && query_ != com.google.cloud.dialogflow.v2beta1.TextInput.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.v2beta1.TextInput.Builder getQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.dialogflow.v2beta1.TextInput.getDefaultInstance() + : query_; + } + } + /** + * + * + *
+     * Required. The natural language text query for knowledge search.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TextInput, + com.google.cloud.dialogflow.v2beta1.TextInput.Builder, + com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TextInput, + com.google.cloud.dialogflow.v2beta1.TextInput.Builder, + com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object conversationProfile_ = ""; + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + public java.lang.String getConversationProfile() { + java.lang.Object ref = conversationProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversationProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + public com.google.protobuf.ByteString getConversationProfileBytes() { + java.lang.Object ref = conversationProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The conversationProfile to set. + * @return This builder for chaining. + */ + public Builder setConversationProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversationProfile_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearConversationProfile() { + conversationProfile_ = getDefaultInstance().getConversationProfile(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation profile used to configure the search.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversationProfiles/<Conversation Profile ID>`.
+     * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for conversationProfile to set. + * @return This builder for chaining. + */ + public Builder setConversationProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversationProfile_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the search session.
+     * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+     * conversation profile or on its own to identify a search session. The search
+     * history of the same session will impact the search result. It's up to the
+     * API caller to choose an appropriate `Session ID`. It can be a random number
+     * or some type of session identifiers (preferably hashed). The length must
+     * not exceed 36 characters.
+     * 
+ * + * string session_id = 3; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object conversation_ = ""; + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + } + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearConversation() { + conversation_ = getDefaultInstance().getConversation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation (between human agent and end user) where the search
+     * request is triggered. Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * string conversation = 4 [(.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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object latestMessage_ = ""; + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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 when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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 when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearLatestMessage() { + latestMessage_ = getDefaultInstance().getLatestMessage(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message when the request is
+     * triggered.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 5 [(.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; + bitField0_ |= 0x00000020; + 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.SearchKnowledgeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) + private static final com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest(); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.SearchKnowledgeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequestOrBuilder.java new file mode 100644 index 000000000000..40f9747ef066 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeRequestOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 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 SearchKnowledgeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The parent resource contains the conversation profile
+   * Format: 'projects/<Project ID>' or `projects/<Project
+   * ID>/locations/<Location ID>`.
+   * 
+ * + * string parent = 6; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + com.google.cloud.dialogflow.v2beta1.TextInput getQuery(); + /** + * + * + *
+   * Required. The natural language text query for knowledge search.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.v2beta1.TextInputOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversationProfile. + */ + java.lang.String getConversationProfile(); + /** + * + * + *
+   * Required. The conversation profile used to configure the search.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversationProfiles/<Conversation Profile ID>`.
+   * 
+ * + * + * string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversationProfile. + */ + com.google.protobuf.ByteString getConversationProfileBytes(); + + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + * + * + *
+   * The ID of the search session.
+   * The session_id can be combined with Dialogflow V3 Agent ID retrieved from
+   * conversation profile or on its own to identify a search session. The search
+   * history of the same session will impact the search result. It's up to the
+   * API caller to choose an appropriate `Session ID`. It can be a random number
+   * or some type of session identifiers (preferably hashed). The length must
+   * not exceed 36 characters.
+   * 
+ * + * string session_id = 3; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return The conversation. + */ + java.lang.String getConversation(); + /** + * + * + *
+   * The conversation (between human agent and end user) where the search
+   * request is triggered. Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * string conversation = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for conversation. + */ + com.google.protobuf.ByteString getConversationBytes(); + + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + java.lang.String getLatestMessage(); + /** + * + * + *
+   * The name of the latest conversation message when the request is
+   * triggered.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + com.google.protobuf.ByteString getLatestMessageBytes(); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponse.java new file mode 100644 index 000000000000..ab287facb857 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponse.java @@ -0,0 +1,981 @@ +/* + * Copyright 2023 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.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse} + */ +public final class SearchKnowledgeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) + SearchKnowledgeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchKnowledgeResponse.newBuilder() to construct. + private SearchKnowledgeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchKnowledgeResponse() { + answers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchKnowledgeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.Builder.class); + } + + public static final int ANSWERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List answers_; + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public java.util.List + getAnswersList() { + return answers_; + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder> + getAnswersOrBuilderList() { + return answers_; + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public int getAnswersCount() { + return answers_.size(); + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer getAnswers(int index) { + return answers_.get(index); + } + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder( + int index) { + return answers_.get(index); + } + + 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 { + for (int i = 0; i < answers_.size(); i++) { + output.writeMessage(2, answers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < answers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, answers_.get(i)); + } + size += getUnknownFields().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.SearchKnowledgeResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse other = + (com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) obj; + + if (!getAnswersList().equals(other.getAnswersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnswersCount() > 0) { + hash = (37 * hash) + ANSWERS_FIELD_NUMBER; + hash = (53 * hash) + getAnswersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse 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.SearchKnowledgeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse 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.SearchKnowledgeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse 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.SearchKnowledgeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse 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.SearchKnowledgeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse 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.SearchKnowledgeResponse 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.SearchKnowledgeResponse 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.SearchKnowledgeResponse 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.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SearchKnowledgeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.class, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (answersBuilder_ == null) { + answers_ = java.util.Collections.emptyList(); + } else { + answers_ = null; + answersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + 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_SearchKnowledgeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse build() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse buildPartial() { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse result = + new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse result) { + if (answersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + answers_ = java.util.Collections.unmodifiableList(answers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.answers_ = answers_; + } else { + result.answers_ = answersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse result) { + int from_bitField0_ = bitField0_; + } + + @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.SearchKnowledgeResponse) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse other) { + if (other == com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse.getDefaultInstance()) + return this; + if (answersBuilder_ == null) { + if (!other.answers_.isEmpty()) { + if (answers_.isEmpty()) { + answers_ = other.answers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnswersIsMutable(); + answers_.addAll(other.answers_); + } + onChanged(); + } + } else { + if (!other.answers_.isEmpty()) { + if (answersBuilder_.isEmpty()) { + answersBuilder_.dispose(); + answersBuilder_ = null; + answers_ = other.answers_; + bitField0_ = (bitField0_ & ~0x00000001); + answersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnswersFieldBuilder() + : null; + } else { + answersBuilder_.addAllMessages(other.answers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer m = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.parser(), + extensionRegistry); + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(m); + } else { + answersBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List answers_ = + java.util.Collections.emptyList(); + + private void ensureAnswersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + answers_ = + new java.util.ArrayList( + answers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder> + answersBuilder_; + + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List + getAnswersList() { + if (answersBuilder_ == null) { + return java.util.Collections.unmodifiableList(answers_); + } else { + return answersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public int getAnswersCount() { + if (answersBuilder_ == null) { + return answers_.size(); + } else { + return answersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer getAnswers(int index) { + if (answersBuilder_ == null) { + return answers_.get(index); + } else { + return answersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder setAnswers( + int index, com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.set(index, value); + onChanged(); + } else { + answersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder setAnswers( + int index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.set(index, builderForValue.build()); + onChanged(); + } else { + answersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers(com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.add(value); + onChanged(); + } else { + answersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + int index, com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer value) { + if (answersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswersIsMutable(); + answers_.add(index, value); + onChanged(); + } else { + answersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(builderForValue.build()); + onChanged(); + } else { + answersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAnswers( + int index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder builderForValue) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.add(index, builderForValue.build()); + onChanged(); + } else { + answersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder addAllAnswers( + java.lang.Iterable + values) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, answers_); + onChanged(); + } else { + answersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder clearAnswers() { + if (answersBuilder_ == null) { + answers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + answersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public Builder removeAnswers(int index) { + if (answersBuilder_ == null) { + ensureAnswersIsMutable(); + answers_.remove(index); + onChanged(); + } else { + answersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder getAnswersBuilder( + int index) { + return getAnswersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder( + int index) { + if (answersBuilder_ == null) { + return answers_.get(index); + } else { + return answersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder> + getAnswersOrBuilderList() { + if (answersBuilder_ != null) { + return answersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(answers_); + } + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder addAnswersBuilder() { + return getAnswersFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.getDefaultInstance()); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder addAnswersBuilder( + int index) { + return getAnswersFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.getDefaultInstance()); + } + /** + * + * + *
+     * Most relevant snippets extracted from articles in the given knowledge base,
+     * ordered by confidence.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + public java.util.List + getAnswersBuilderList() { + return getAnswersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder> + getAnswersFieldBuilder() { + if (answersBuilder_ == null) { + answersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer.Builder, + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder>( + answers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + answers_ = null; + } + return answersBuilder_; + } + + @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.SearchKnowledgeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) + private static final com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse(); + } + + public static com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchKnowledgeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.SearchKnowledgeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponseOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponseOrBuilder.java new file mode 100644 index 000000000000..8641476aeeb6 --- /dev/null +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SearchKnowledgeResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2023 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 SearchKnowledgeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + java.util.List getAnswersList(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer getAnswers(int index); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + int getAnswersCount(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + java.util.List + getAnswersOrBuilderList(); + /** + * + * + *
+   * Most relevant snippets extracted from articles in the given knowledge base,
+   * ordered by confidence.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswer answers = 2; + */ + com.google.cloud.dialogflow.v2beta1.SearchKnowledgeAnswerOrBuilder getAnswersOrBuilder(int index); +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionProto.java index 035af8c11fe4..ffd58268ff1b 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionProto.java @@ -137,7 +137,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\0132\022.google.rpc.Status\022\024\n\014output_audio\030" + "\004 \001(\014\022O\n\023output_audio_config\030\006 \001(\01322.goo" + "gle.cloud.dialogflow.v2beta1.OutputAudio" - + "Config\"\376\004\n\017QueryParameters\022\021\n\ttime_zone\030" + + "Config\"\220\005\n\017QueryParameters\022\021\n\ttime_zone\030" + "\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.google.typ" + "e.LatLng\022:\n\010contexts\030\003 \003(\0132(.google.clou" + "d.dialogflow.v2beta1.Context\022\026\n\016reset_co" @@ -151,149 +151,151 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "b_agents\030\r \003(\0132).google.cloud.dialogflow" + ".v2beta1.SubAgent\022]\n\017webhook_headers\030\016 \003" + "(\0132D.google.cloud.dialogflow.v2beta1.Que" - + "ryParameters.WebhookHeadersEntry\0325\n\023Webh" - + "ookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001\"\240\002\n\nQueryInput\022I\n\014audio_config\030\001" - + " \001(\01321.google.cloud.dialogflow.v2beta1.I" - + "nputAudioConfigH\000\022:\n\004text\030\002 \001(\0132*.google" - + ".cloud.dialogflow.v2beta1.TextInputH\000\022<\n" - + "\005event\030\003 \001(\0132+.google.cloud.dialogflow.v" - + "2beta1.EventInputH\000\022D\n\004dtmf\030\004 \001(\01324.goog" - + "le.cloud.dialogflow.v2beta1.TelephonyDtm" - + "fEventsH\000B\007\n\005input\"\220\006\n\013QueryResult\022\022\n\nqu" - + "ery_text\030\001 \001(\t\022\025\n\rlanguage_code\030\017 \001(\t\022%\n" - + "\035speech_recognition_confidence\030\002 \001(\002\022\016\n\006" - + "action\030\003 \001(\t\022+\n\nparameters\030\004 \001(\0132\027.googl" - + "e.protobuf.Struct\022#\n\033all_required_params" - + "_present\030\005 \001(\010\022\034\n\024cancels_slot_filling\030\025" - + " \001(\010\022\030\n\020fulfillment_text\030\006 \001(\t\022M\n\024fulfil" - + "lment_messages\030\007 \003(\0132/.google.cloud.dial" - + "ogflow.v2beta1.Intent.Message\022\026\n\016webhook" - + "_source\030\010 \001(\t\0220\n\017webhook_payload\030\t \001(\0132\027" - + ".google.protobuf.Struct\022A\n\017output_contex" - + "ts\030\n \003(\0132(.google.cloud.dialogflow.v2bet" - + "a1.Context\0227\n\006intent\030\013 \001(\0132\'.google.clou" - + "d.dialogflow.v2beta1.Intent\022#\n\033intent_de" - + "tection_confidence\030\014 \001(\002\0220\n\017diagnostic_i" - + "nfo\030\016 \001(\0132\027.google.protobuf.Struct\022[\n\031se" - + "ntiment_analysis_result\030\021 \001(\01328.google.c" - + "loud.dialogflow.v2beta1.SentimentAnalysi" - + "sResult\022L\n\021knowledge_answers\030\022 \001(\01321.goo" - + "gle.cloud.dialogflow.v2beta1.KnowledgeAn" - + "swers\"\257\003\n\020KnowledgeAnswers\022I\n\007answers\030\001 " - + "\003(\01328.google.cloud.dialogflow.v2beta1.Kn" - + "owledgeAnswers.Answer\032\317\002\n\006Answer\0227\n\006sour" - + "ce\030\001 \001(\tB\'\372A$\n\"dialogflow.googleapis.com" - + "/Document\022\024\n\014faq_question\030\002 \001(\t\022\016\n\006answe" - + "r\030\003 \001(\t\022m\n\026match_confidence_level\030\004 \001(\0162" - + "M.google.cloud.dialogflow.v2beta1.Knowle" - + "dgeAnswers.Answer.MatchConfidenceLevel\022\030" - + "\n\020match_confidence\030\005 \001(\002\"]\n\024MatchConfide" - + "nceLevel\022&\n\"MATCH_CONFIDENCE_LEVEL_UNSPE" - + "CIFIED\020\000\022\007\n\003LOW\020\001\022\n\n\006MEDIUM\020\002\022\010\n\004HIGH\020\003\"" - + "\314\003\n\034StreamingDetectIntentRequest\022;\n\007sess" - + "ion\030\001 \001(\tB*\342A\001\002\372A#\n!dialogflow.googleapi" - + "s.com/Session\022F\n\014query_params\030\002 \001(\01320.go" - + "ogle.cloud.dialogflow.v2beta1.QueryParam" - + "eters\022F\n\013query_input\030\003 \001(\0132+.google.clou" - + "d.dialogflow.v2beta1.QueryInputB\004\342A\001\002\022\034\n" - + "\020single_utterance\030\004 \001(\010B\002\030\001\022O\n\023output_au" - + "dio_config\030\005 \001(\01322.google.cloud.dialogfl" - + "ow.v2beta1.OutputAudioConfig\022<\n\030output_a" - + "udio_config_mask\030\007 \001(\0132\032.google.protobuf" - + ".FieldMask\022\023\n\013input_audio\030\006 \001(\014\022\035\n\025enabl" - + "e_debugging_info\030\010 \001(\010\"\370\006\n\036CloudConversa" - + "tionDebuggingInfo\022\031\n\021audio_data_chunks\030\001" - + " \001(\005\0229\n\026result_end_time_offset\030\002 \001(\0132\031.g" - + "oogle.protobuf.Duration\0227\n\024first_audio_d" - + "uration\030\003 \001(\0132\031.google.protobuf.Duration" - + "\022\030\n\020single_utterance\030\005 \001(\010\022C\n speech_par" - + "tial_results_end_times\030\006 \003(\0132\031.google.pr" - + "otobuf.Duration\022A\n\036speech_final_results_" - + "end_times\030\007 \003(\0132\031.google.protobuf.Durati" - + "on\022\031\n\021partial_responses\030\010 \001(\005\022,\n$speaker" - + "_id_passive_latency_ms_offset\030\t \001(\005\022\037\n\027b" - + "argein_event_triggered\030\n \001(\010\022\037\n\027speech_s" - + "ingle_utterance\030\013 \001(\010\022=\n\032dtmf_partial_re" - + "sults_times\030\014 \003(\0132\031.google.protobuf.Dura" - + "tion\022;\n\030dtmf_final_results_times\030\r \003(\0132\031" - + ".google.protobuf.Duration\022C\n single_utte" - + "rance_end_time_offset\030\016 \001(\0132\031.google.pro" - + "tobuf.Duration\0224\n\021no_speech_timeout\030\017 \001(" - + "\0132\031.google.protobuf.Duration\022\025\n\ris_input" - + "_text\030\020 \001(\010\022@\n\035client_half_close_time_of" - + "fset\030\021 \001(\0132\031.google.protobuf.Duration\022J\n" - + "\'client_half_close_streaming_time_offset" - + "\030\022 \001(\0132\031.google.protobuf.Duration\"\216\004\n\035St" - + "reamingDetectIntentResponse\022\023\n\013response_" - + "id\030\001 \001(\t\022W\n\022recognition_result\030\002 \001(\0132;.g" - + "oogle.cloud.dialogflow.v2beta1.Streaming" - + "RecognitionResult\022B\n\014query_result\030\003 \001(\0132" - + ",.google.cloud.dialogflow.v2beta1.QueryR" - + "esult\022O\n\031alternative_query_results\030\007 \003(\013" - + "2,.google.cloud.dialogflow.v2beta1.Query" - + "Result\022*\n\016webhook_status\030\004 \001(\0132\022.google." - + "rpc.Status\022\024\n\014output_audio\030\005 \001(\014\022O\n\023outp" - + "ut_audio_config\030\006 \001(\01322.google.cloud.dia" - + "logflow.v2beta1.OutputAudioConfig\022W\n\016deb" - + "ugging_info\030\010 \001(\0132?.google.cloud.dialogf" - + "low.v2beta1.CloudConversationDebuggingIn" - + "fo\"\260\004\n\032StreamingRecognitionResult\022]\n\014mes" - + "sage_type\030\001 \001(\0162G.google.cloud.dialogflo" - + "w.v2beta1.StreamingRecognitionResult.Mes" - + "sageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final" - + "\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability\030" - + "\006 \001(\002\022I\n\020speech_word_info\030\007 \003(\0132/.google" - + ".cloud.dialogflow.v2beta1.SpeechWordInfo" - + "\0224\n\021speech_end_offset\030\010 \001(\0132\031.google.pro" - + "tobuf.Duration\022\025\n\rlanguage_code\030\n \001(\t\022I\n" - + "\013dtmf_digits\030\005 \001(\01324.google.cloud.dialog" - + "flow.v2beta1.TelephonyDtmfEvents\"\202\001\n\013Mes" - + "sageType\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020\000\022\016" - + "\n\nTRANSCRIPT\020\001\022\017\n\013DTMF_DIGITS\020\003\022\033\n\027END_O" - + "F_SINGLE_UTTERANCE\020\002\022\027\n\023PARTIAL_DTMF_DIG" - + "ITS\020\004\"0\n\tTextInput\022\014\n\004text\030\001 \001(\t\022\025\n\rlang" - + "uage_code\030\002 \001(\t\"^\n\nEventInput\022\014\n\004name\030\001 " - + "\001(\t\022+\n\nparameters\030\002 \001(\0132\027.google.protobu" - + "f.Struct\022\025\n\rlanguage_code\030\003 \001(\t\"F\n\036Senti" - + "mentAnalysisRequestConfig\022$\n\034analyze_que" - + "ry_text_sentiment\030\001 \001(\010\"c\n\027SentimentAnal" - + "ysisResult\022H\n\024query_text_sentiment\030\001 \001(\013" - + "2*.google.cloud.dialogflow.v2beta1.Senti" - + "ment\"-\n\tSentiment\022\r\n\005score\030\001 \001(\002\022\021\n\tmagn" - + "itude\030\002 \001(\0022\215\006\n\010Sessions\022\347\003\n\014DetectInten" - + "t\0224.google.cloud.dialogflow.v2beta1.Dete" - + "ctIntentRequest\0325.google.cloud.dialogflo" - + "w.v2beta1.DetectIntentResponse\"\351\002\332A\023sess" - + "ion,query_input\202\323\344\223\002\314\002\";/v2beta1/{sessio" - + "n=projects/*/agent/sessions/*}:detectInt" - + "ent:\001*ZW\"R/v2beta1/{session=projects/*/a" - + "gent/environments/*/users/*/sessions/*}:" - + "detectIntent:\001*ZL\"G/v2beta1/{session=pro" - + "jects/*/locations/*/agent/sessions/*}:de" - + "tectIntent:\001*Zc\"^/v2beta1/{session=proje" - + "cts/*/locations/*/agent/environments/*/u" - + "sers/*/sessions/*}:detectIntent:\001*\022\234\001\n\025S" - + "treamingDetectIntent\022=.google.cloud.dial" - + "ogflow.v2beta1.StreamingDetectIntentRequ" - + "est\032>.google.cloud.dialogflow.v2beta1.St" - + "reamingDetectIntentResponse\"\000(\0010\001\032x\312A\031di" - + "alogflow.googleapis.com\322AYhttps://www.go" - + "ogleapis.com/auth/cloud-platform,https:/" - + "/www.googleapis.com/auth/dialogflowB\371\003\n#" - + "com.google.cloud.dialogflow.v2beta1B\014Ses" - + "sionProtoP\001ZCcloud.google.com/go/dialogf" - + "low/apiv2beta1/dialogflowpb;dialogflowpb" - + "\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2Bet" - + "a1\352A\321\002\n!dialogflow.googleapis.com/Sessio" - + "n\022+projects/{project}/agent/sessions/{se" - + "ssion}\022Sprojects/{project}/agent/environ" - + "ments/{environment}/users/{user}/session" - + "s/{session}\022@projects/{project}/location" - + "s/{location}/agent/sessions/{session}\022hp" - + "rojects/{project}/locations/{location}/a" - + "gent/environments/{environment}/users/{u" - + "ser}/sessions/{session}b\006proto3" + + "ryParameters.WebhookHeadersEntry\022\020\n\010plat" + + "form\030\022 \001(\t\0325\n\023WebhookHeadersEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\240\002\n\nQueryInput" + + "\022I\n\014audio_config\030\001 \001(\01321.google.cloud.di" + + "alogflow.v2beta1.InputAudioConfigH\000\022:\n\004t" + + "ext\030\002 \001(\0132*.google.cloud.dialogflow.v2be" + + "ta1.TextInputH\000\022<\n\005event\030\003 \001(\0132+.google." + + "cloud.dialogflow.v2beta1.EventInputH\000\022D\n" + + "\004dtmf\030\004 \001(\01324.google.cloud.dialogflow.v2" + + "beta1.TelephonyDtmfEventsH\000B\007\n\005input\"\220\006\n" + + "\013QueryResult\022\022\n\nquery_text\030\001 \001(\t\022\025\n\rlang" + + "uage_code\030\017 \001(\t\022%\n\035speech_recognition_co" + + "nfidence\030\002 \001(\002\022\016\n\006action\030\003 \001(\t\022+\n\nparame" + + "ters\030\004 \001(\0132\027.google.protobuf.Struct\022#\n\033a" + + "ll_required_params_present\030\005 \001(\010\022\034\n\024canc" + + "els_slot_filling\030\025 \001(\010\022\030\n\020fulfillment_te" + + "xt\030\006 \001(\t\022M\n\024fulfillment_messages\030\007 \003(\0132/" + + ".google.cloud.dialogflow.v2beta1.Intent." + + "Message\022\026\n\016webhook_source\030\010 \001(\t\0220\n\017webho" + + "ok_payload\030\t \001(\0132\027.google.protobuf.Struc" + + "t\022A\n\017output_contexts\030\n \003(\0132(.google.clou" + + "d.dialogflow.v2beta1.Context\0227\n\006intent\030\013" + + " \001(\0132\'.google.cloud.dialogflow.v2beta1.I" + + "ntent\022#\n\033intent_detection_confidence\030\014 \001" + + "(\002\0220\n\017diagnostic_info\030\016 \001(\0132\027.google.pro" + + "tobuf.Struct\022[\n\031sentiment_analysis_resul" + + "t\030\021 \001(\01328.google.cloud.dialogflow.v2beta" + + "1.SentimentAnalysisResult\022L\n\021knowledge_a" + + "nswers\030\022 \001(\01321.google.cloud.dialogflow.v" + + "2beta1.KnowledgeAnswers\"\257\003\n\020KnowledgeAns" + + "wers\022I\n\007answers\030\001 \003(\01328.google.cloud.dia" + + "logflow.v2beta1.KnowledgeAnswers.Answer\032" + + "\317\002\n\006Answer\0227\n\006source\030\001 \001(\tB\'\372A$\n\"dialogf" + + "low.googleapis.com/Document\022\024\n\014faq_quest" + + "ion\030\002 \001(\t\022\016\n\006answer\030\003 \001(\t\022m\n\026match_confi" + + "dence_level\030\004 \001(\0162M.google.cloud.dialogf" + + "low.v2beta1.KnowledgeAnswers.Answer.Matc" + + "hConfidenceLevel\022\030\n\020match_confidence\030\005 \001" + + "(\002\"]\n\024MatchConfidenceLevel\022&\n\"MATCH_CONF" + + "IDENCE_LEVEL_UNSPECIFIED\020\000\022\007\n\003LOW\020\001\022\n\n\006M" + + "EDIUM\020\002\022\010\n\004HIGH\020\003\"\314\003\n\034StreamingDetectInt" + + "entRequest\022;\n\007session\030\001 \001(\tB*\342A\001\002\372A#\n!di" + + "alogflow.googleapis.com/Session\022F\n\014query" + + "_params\030\002 \001(\01320.google.cloud.dialogflow." + + "v2beta1.QueryParameters\022F\n\013query_input\030\003" + + " \001(\0132+.google.cloud.dialogflow.v2beta1.Q" + + "ueryInputB\004\342A\001\002\022\034\n\020single_utterance\030\004 \001(" + + "\010B\002\030\001\022O\n\023output_audio_config\030\005 \001(\01322.goo" + + "gle.cloud.dialogflow.v2beta1.OutputAudio" + + "Config\022<\n\030output_audio_config_mask\030\007 \001(\013" + + "2\032.google.protobuf.FieldMask\022\023\n\013input_au" + + "dio\030\006 \001(\014\022\035\n\025enable_debugging_info\030\010 \001(\010" + + "\"\260\007\n\036CloudConversationDebuggingInfo\022\031\n\021a" + + "udio_data_chunks\030\001 \001(\005\0229\n\026result_end_tim" + + "e_offset\030\002 \001(\0132\031.google.protobuf.Duratio" + + "n\0227\n\024first_audio_duration\030\003 \001(\0132\031.google" + + ".protobuf.Duration\022\030\n\020single_utterance\030\005" + + " \001(\010\022C\n speech_partial_results_end_times" + + "\030\006 \003(\0132\031.google.protobuf.Duration\022A\n\036spe" + + "ech_final_results_end_times\030\007 \003(\0132\031.goog" + + "le.protobuf.Duration\022\031\n\021partial_response" + + "s\030\010 \001(\005\022,\n$speaker_id_passive_latency_ms" + + "_offset\030\t \001(\005\022\037\n\027bargein_event_triggered" + + "\030\n \001(\010\022\037\n\027speech_single_utterance\030\013 \001(\010\022" + + "=\n\032dtmf_partial_results_times\030\014 \003(\0132\031.go" + + "ogle.protobuf.Duration\022;\n\030dtmf_final_res" + + "ults_times\030\r \003(\0132\031.google.protobuf.Durat" + + "ion\022C\n single_utterance_end_time_offset\030" + + "\016 \001(\0132\031.google.protobuf.Duration\0224\n\021no_s" + + "peech_timeout\030\017 \001(\0132\031.google.protobuf.Du" + + "ration\0226\n\023endpointing_timeout\030\023 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\025\n\ris_input_text\030" + + "\020 \001(\010\022@\n\035client_half_close_time_offset\030\021" + + " \001(\0132\031.google.protobuf.Duration\022J\n\'clien" + + "t_half_close_streaming_time_offset\030\022 \001(\013" + + "2\031.google.protobuf.Duration\"\216\004\n\035Streamin" + + "gDetectIntentResponse\022\023\n\013response_id\030\001 \001" + + "(\t\022W\n\022recognition_result\030\002 \001(\0132;.google." + + "cloud.dialogflow.v2beta1.StreamingRecogn" + + "itionResult\022B\n\014query_result\030\003 \001(\0132,.goog" + + "le.cloud.dialogflow.v2beta1.QueryResult\022" + + "O\n\031alternative_query_results\030\007 \003(\0132,.goo" + + "gle.cloud.dialogflow.v2beta1.QueryResult" + + "\022*\n\016webhook_status\030\004 \001(\0132\022.google.rpc.St" + + "atus\022\024\n\014output_audio\030\005 \001(\014\022O\n\023output_aud" + + "io_config\030\006 \001(\01322.google.cloud.dialogflo" + + "w.v2beta1.OutputAudioConfig\022W\n\016debugging" + + "_info\030\010 \001(\0132?.google.cloud.dialogflow.v2" + + "beta1.CloudConversationDebuggingInfo\"\260\004\n" + + "\032StreamingRecognitionResult\022]\n\014message_t" + + "ype\030\001 \001(\0162G.google.cloud.dialogflow.v2be" + + "ta1.StreamingRecognitionResult.MessageTy" + + "pe\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030\003 \001(\010" + + "\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability\030\006 \001(\002\022" + + "I\n\020speech_word_info\030\007 \003(\0132/.google.cloud" + + ".dialogflow.v2beta1.SpeechWordInfo\0224\n\021sp" + + "eech_end_offset\030\010 \001(\0132\031.google.protobuf." + + "Duration\022\025\n\rlanguage_code\030\n \001(\t\022I\n\013dtmf_" + + "digits\030\005 \001(\01324.google.cloud.dialogflow.v" + + "2beta1.TelephonyDtmfEvents\"\202\001\n\013MessageTy" + + "pe\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRAN" + + "SCRIPT\020\001\022\017\n\013DTMF_DIGITS\020\003\022\033\n\027END_OF_SING" + + "LE_UTTERANCE\020\002\022\027\n\023PARTIAL_DTMF_DIGITS\020\004\"" + + "0\n\tTextInput\022\014\n\004text\030\001 \001(\t\022\025\n\rlanguage_c" + + "ode\030\002 \001(\t\"^\n\nEventInput\022\014\n\004name\030\001 \001(\t\022+\n" + + "\nparameters\030\002 \001(\0132\027.google.protobuf.Stru" + + "ct\022\025\n\rlanguage_code\030\003 \001(\t\"F\n\036SentimentAn" + + "alysisRequestConfig\022$\n\034analyze_query_tex" + + "t_sentiment\030\001 \001(\010\"c\n\027SentimentAnalysisRe" + + "sult\022H\n\024query_text_sentiment\030\001 \001(\0132*.goo" + + "gle.cloud.dialogflow.v2beta1.Sentiment\"-" + + "\n\tSentiment\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030" + + "\002 \001(\0022\215\006\n\010Sessions\022\347\003\n\014DetectIntent\0224.go" + + "ogle.cloud.dialogflow.v2beta1.DetectInte" + + "ntRequest\0325.google.cloud.dialogflow.v2be" + + "ta1.DetectIntentResponse\"\351\002\332A\023session,qu" + + "ery_input\202\323\344\223\002\314\002\";/v2beta1/{session=proj" + + "ects/*/agent/sessions/*}:detectIntent:\001*" + + "ZW\"R/v2beta1/{session=projects/*/agent/e" + + "nvironments/*/users/*/sessions/*}:detect" + + "Intent:\001*ZL\"G/v2beta1/{session=projects/" + + "*/locations/*/agent/sessions/*}:detectIn" + + "tent:\001*Zc\"^/v2beta1/{session=projects/*/" + + "locations/*/agent/environments/*/users/*" + + "/sessions/*}:detectIntent:\001*\022\234\001\n\025Streami" + + "ngDetectIntent\022=.google.cloud.dialogflow" + + ".v2beta1.StreamingDetectIntentRequest\032>." + + "google.cloud.dialogflow.v2beta1.Streamin" + + "gDetectIntentResponse\"\000(\0010\001\032x\312A\031dialogfl" + + "ow.googleapis.com\322AYhttps://www.googleap" + + "is.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/dialogflowB\371\003\n#com.go" + + "ogle.cloud.dialogflow.v2beta1B\014SessionPr" + + "otoP\001ZCcloud.google.com/go/dialogflow/ap" + + "iv2beta1/dialogflowpb;dialogflowpb\370\001\001\242\002\002" + + "DF\252\002\037Google.Cloud.Dialogflow.V2Beta1\352A\321\002" + + "\n!dialogflow.googleapis.com/Session\022+pro" + + "jects/{project}/agent/sessions/{session}" + + "\022Sprojects/{project}/agent/environments/" + + "{environment}/users/{user}/sessions/{ses" + + "sion}\022@projects/{project}/locations/{loc" + + "ation}/agent/sessions/{session}\022hproject" + + "s/{project}/locations/{location}/agent/e" + + "nvironments/{environment}/users/{user}/s" + + "essions/{session}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -356,6 +358,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SentimentAnalysisRequestConfig", "SubAgents", "WebhookHeaders", + "Platform", }); internal_static_google_cloud_dialogflow_v2beta1_QueryParameters_WebhookHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_v2beta1_QueryParameters_descriptor @@ -452,6 +455,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DtmfFinalResultsTimes", "SingleUtteranceEndTimeOffset", "NoSpeechTimeout", + "EndpointingTimeout", "IsInputText", "ClientHalfCloseTimeOffset", "ClientHalfCloseStreamingTimeOffset", diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfig.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfig.java index 5fa5e5e2a4ea..edccdd1821c7 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfig.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfig.java @@ -180,6 +180,25 @@ public com.google.protobuf.ByteString getModelBytes() { } } + public static final int USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER = 11; + private boolean useTimeoutBasedEndpointing_ = false; + /** + * + * + *
+   * Use timeout based endpointing, interpreting endpointer sensitivy as
+   * seconds of timeout value.
+   * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + @java.lang.Override + public boolean getUseTimeoutBasedEndpointing() { + return useTimeoutBasedEndpointing_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -202,6 +221,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } + if (useTimeoutBasedEndpointing_ != false) { + output.writeBool(11, useTimeoutBasedEndpointing_); + } getUnknownFields().writeTo(output); } @@ -219,6 +241,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } + if (useTimeoutBasedEndpointing_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(11, useTimeoutBasedEndpointing_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -237,6 +263,7 @@ public boolean equals(final java.lang.Object obj) { if (speechModelVariant_ != other.speechModelVariant_) return false; if (!getModel().equals(other.getModel())) return false; + if (getUseTimeoutBasedEndpointing() != other.getUseTimeoutBasedEndpointing()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,6 +279,8 @@ public int hashCode() { hash = (53 * hash) + speechModelVariant_; hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTimeoutBasedEndpointing()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -395,6 +424,7 @@ public Builder clear() { bitField0_ = 0; speechModelVariant_ = 0; model_ = ""; + useTimeoutBasedEndpointing_ = false; return this; } @@ -437,6 +467,9 @@ private void buildPartial0(com.google.cloud.dialogflow.v2beta1.SpeechToTextConfi if (((from_bitField0_ & 0x00000002) != 0)) { result.model_ = model_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.useTimeoutBasedEndpointing_ = useTimeoutBasedEndpointing_; + } } @java.lang.Override @@ -493,6 +526,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.SpeechToTextConfig bitField0_ |= 0x00000002; onChanged(); } + if (other.getUseTimeoutBasedEndpointing() != false) { + setUseTimeoutBasedEndpointing(other.getUseTimeoutBasedEndpointing()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -531,6 +567,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 88: + { + useTimeoutBasedEndpointing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 88 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -819,6 +861,62 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { return this; } + private boolean useTimeoutBasedEndpointing_; + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + @java.lang.Override + public boolean getUseTimeoutBasedEndpointing() { + return useTimeoutBasedEndpointing_; + } + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @param value The useTimeoutBasedEndpointing to set. + * @return This builder for chaining. + */ + public Builder setUseTimeoutBasedEndpointing(boolean value) { + + useTimeoutBasedEndpointing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Use timeout based endpointing, interpreting endpointer sensitivy as
+     * seconds of timeout value.
+     * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return This builder for chaining. + */ + public Builder clearUseTimeoutBasedEndpointing() { + bitField0_ = (bitField0_ & ~0x00000004); + useTimeoutBasedEndpointing_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfigOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfigOrBuilder.java index 646d08a5a3d7..083bc2c32cde 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfigOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SpeechToTextConfigOrBuilder.java @@ -100,4 +100,18 @@ public interface SpeechToTextConfigOrBuilder * @return The bytes for model. */ com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Use timeout based endpointing, interpreting endpointer sensitivy as
+   * seconds of timeout value.
+   * 
+ * + * bool use_timeout_based_endpointing = 11; + * + * @return The useTimeoutBasedEndpointing. + */ + boolean getUseTimeoutBasedEndpointing(); } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java index e8c454f6e179..a2fe18e59b4f 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java @@ -479,7 +479,7 @@ public com.google.protobuf.ByteString getInputAudio() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -496,7 +496,7 @@ public boolean hasInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -526,7 +526,7 @@ public java.lang.String getInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2566,7 +2566,7 @@ public Builder clearInputAudio() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2584,7 +2584,7 @@ public boolean hasInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2615,7 +2615,7 @@ public java.lang.String getInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2646,7 +2646,7 @@ public com.google.protobuf.ByteString getInputTextBytes() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2670,7 +2670,7 @@ public Builder setInputText(java.lang.String value) { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -2692,7 +2692,7 @@ public Builder clearInputText() { * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java index be074638d6ea..c50e4c14865f 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java @@ -209,7 +209,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -224,7 +224,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; @@ -239,7 +239,7 @@ public interface StreamingAnalyzeContentRequestOrBuilder * The UTF-8 encoded natural language text to be processed. Must be sent if * `text_config` is set in the first message. Text length must not exceed * 256 bytes for virtual agent interactions. The `input_text` field can be - * only sent once. + * only sent once, and would cancel the speech recognition if any ongoing. * * * string input_text = 6; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequest.java index a61f98a7e974..cb956d075801 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequest.java @@ -344,7 +344,7 @@ public com.google.cloud.dialogflow.v2beta1.QueryInputOrBuilder getQueryInputOrBu * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=562 + * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=569 * @return The singleUtterance. */ @java.lang.Override @@ -1799,7 +1799,7 @@ public com.google.cloud.dialogflow.v2beta1.QueryInputOrBuilder getQueryInputOrBu * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=562 + * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=569 * @return The singleUtterance. */ @java.lang.Override @@ -1825,7 +1825,7 @@ public boolean getSingleUtterance() { * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=562 + * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=569 * @param value The singleUtterance to set. * @return This builder for chaining. */ @@ -1855,7 +1855,7 @@ public Builder setSingleUtterance(boolean value) { * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=562 + * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=569 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequestOrBuilder.java index c890c7cb1b5e..9fcb8ca90f6c 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingDetectIntentRequestOrBuilder.java @@ -213,7 +213,7 @@ public interface StreamingDetectIntentRequestOrBuilder * bool single_utterance = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance is - * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=562 + * deprecated. See google/cloud/dialogflow/v2beta1/session.proto;l=569 * @return The singleUtterance. */ @java.lang.Deprecated diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java index a62b62273d58..814fe0585920 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java @@ -188,6 +188,33 @@ java.lang.String getTextSectionsOrDefault( * @return The bytes for answerRecord. */ com.google.protobuf.ByteString getAnswerRecordBytes(); + + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + java.lang.String getBaselineModelVersion(); + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + com.google.protobuf.ByteString getBaselineModelVersionBytes(); } /** * @@ -212,6 +239,7 @@ private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Summary() { text_ = ""; answerRecord_ = ""; + baselineModelVersion_ = ""; } @java.lang.Override @@ -463,6 +491,59 @@ public com.google.protobuf.ByteString getAnswerRecordBytes() { } } + public static final int BASELINE_MODEL_VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + @java.lang.Override + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + 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(); + baselineModelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The baseline model version used to generate this summary. It is empty if
+     * a baseline model was not used to generate this summary.
+     * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -485,6 +566,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, baselineModelVersion_); + } getUnknownFields().writeTo(output); } @@ -510,6 +594,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, textSections__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, baselineModelVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -531,6 +618,7 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!getBaselineModelVersion().equals(other.getBaselineModelVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -550,6 +638,8 @@ public int hashCode() { } hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (37 * hash) + BASELINE_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBaselineModelVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -725,6 +815,7 @@ public Builder clear() { text_ = ""; internalGetMutableTextSections().clear(); answerRecord_ = ""; + baselineModelVersion_ = ""; return this; } @@ -778,6 +869,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.answerRecord_ = answerRecord_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.baselineModelVersion_ = baselineModelVersion_; + } } @java.lang.Override @@ -846,6 +940,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (!other.getBaselineModelVersion().isEmpty()) { + baselineModelVersion_ = other.baselineModelVersion_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -896,6 +995,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 34 + case 42: + { + baselineModelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1312,6 +1417,117 @@ public Builder setAnswerRecordBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object baselineModelVersion_ = ""; + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return The baselineModelVersion. + */ + public java.lang.String getBaselineModelVersion() { + java.lang.Object ref = baselineModelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineModelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return The bytes for baselineModelVersion. + */ + public com.google.protobuf.ByteString getBaselineModelVersionBytes() { + java.lang.Object ref = baselineModelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @param value The baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baselineModelVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @return This builder for chaining. + */ + public Builder clearBaselineModelVersion() { + baselineModelVersion_ = getDefaultInstance().getBaselineModelVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The baseline model version used to generate this summary. It is empty if
+       * a baseline model was not used to generate this summary.
+       * 
+ * + * string baseline_model_version = 5; + * + * @param value The bytes for baselineModelVersion to set. + * @return This builder for chaining. + */ + public Builder setBaselineModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baselineModelVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java index b9a4bb314e09..b55987aa08a9 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java @@ -135,6 +135,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * CONVERSATION_SUMMARIZATION = 8; */ CONVERSATION_SUMMARIZATION(8), + /** + * + * + *
+     * Run knowledge search with text input from agent or text generated query.
+     * 
+ * + * KNOWLEDGE_SEARCH = 14; + */ + KNOWLEDGE_SEARCH(14), UNRECOGNIZED(-1), ; @@ -199,6 +209,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * CONVERSATION_SUMMARIZATION = 8; */ public static final int CONVERSATION_SUMMARIZATION_VALUE = 8; + /** + * + * + *
+     * Run knowledge search with text input from agent or text generated query.
+     * 
+ * + * KNOWLEDGE_SEARCH = 14; + */ + public static final int KNOWLEDGE_SEARCH_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -236,6 +256,8 @@ public static Type forNumber(int value) { return DIALOGFLOW_ASSIST; case 8: return CONVERSATION_SUMMARIZATION; + case 14: + return KNOWLEDGE_SEARCH; default: return null; } diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/answer_record.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/answer_record.proto index b5f3cd9b7150..3e4716568ecb 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/answer_record.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/answer_record.proto @@ -245,6 +245,22 @@ message AgentAssistantFeedback { string summary_text = 3; } + // Feedback for knowledge search. + message KnowledgeSearchFeedback { + // Whether the answer was copied by the human agent or not. + // If the value is set to be true, + // [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked] + // will be updated to be true. + bool answer_copied = 1; + + // The URIs clicked by the human agent. The value is appended for each + // UpdateAnswerRecordRequest. + // If the value is not empty, + // [AnswerFeedback.clicked][google.cloud.dialogflow.v2beta1.AnswerFeedback.clicked] + // will be updated to be true. + repeated string clicked_uris = 2; + } + // Optional. Whether or not the suggested answer is relevant. // // For example: @@ -276,6 +292,10 @@ message AgentAssistantFeedback { // Feedback for conversation summarization. SummarizationFeedback summarization_feedback = 4; + + // Optional. Feedback for knowledge search. + KnowledgeSearchFeedback knowledge_search_feedback = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto index 621db5087fad..024ea1d671a9 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -330,6 +330,10 @@ message SpeechToTextConfig { // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. string model = 2; + + // Use timeout based endpointing, interpreting endpointer sensitivy as + // seconds of timeout value. + bool use_timeout_based_endpointing = 11; } // [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling) diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto index 80de2d2cf76e..6c2426ea9d5e 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/conversation_profile.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; +import "google/cloud/dialogflow/v2beta1/session.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; @@ -169,6 +170,27 @@ service Conversations { } }; } + + // Get answers for the given query based on knowledge documents. + rpc SearchKnowledge(SearchKnowledgeRequest) + returns (SearchKnowledgeResponse) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/suggestions:searchKnowledge" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*}/suggestions:searchKnowledge" + body: "*" + } + additional_bindings { + post: "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge" + body: "*" + } + additional_bindings { + post: "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge" + body: "*" + } + }; + } } // Represents a conversation. @@ -516,6 +538,10 @@ message SuggestConversationSummaryResponse { string answer_record = 3 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/AnswerRecord" }]; + + // The baseline model version used to generate this summary. It is empty if + // a baseline model was not used to generate this summary. + string baseline_model_version = 5; } // Generated summary. @@ -597,6 +623,10 @@ message GenerateStatelessSummaryResponse { // section's name and the value is the section's content. There is no // specific format for the key or value. map text_sections = 2; + + // The baseline model version used to generate this summary. It is empty if + // a baseline model was not used to generate this summary. + string baseline_model_version = 4; } // Generated summary. @@ -615,3 +645,99 @@ message GenerateStatelessSummaryResponse { // the request if there weren't that many messages in the conversation. int32 context_size = 3; } + +// The request message for +// [Conversations.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge]. +message SearchKnowledgeRequest { + // The parent resource contains the conversation profile + // Format: 'projects/' or `projects//locations/`. + string parent = 6; + + // Required. The natural language text query for knowledge search. + TextInput query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversation profile used to configure the search. + // Format: `projects//locations//conversationProfiles/`. + string conversation_profile = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ConversationProfile" + } + ]; + + // The ID of the search session. + // The session_id can be combined with Dialogflow V3 Agent ID retrieved from + // conversation profile or on its own to identify a search session. The search + // history of the same session will impact the search result. It's up to the + // API caller to choose an appropriate `Session ID`. It can be a random number + // or some type of session identifiers (preferably hashed). The length must + // not exceed 36 characters. + string session_id = 3; + + // The conversation (between human agent and end user) where the search + // request is triggered. Format: `projects//locations//conversations/`. + string conversation = 4 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Conversation" + }]; + + // The name of the latest conversation message when the request is + // triggered. + // Format: `projects//locations//conversations//messages/`. + string latest_message = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; +} + +// The response message for +// [Conversations.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge]. +message SearchKnowledgeResponse { + // Most relevant snippets extracted from articles in the given knowledge base, + // ordered by confidence. + repeated SearchKnowledgeAnswer answers = 2; +} + +// Represents a SearchKnowledge answer. +message SearchKnowledgeAnswer { + // The type of the answer. + enum AnswerType { + // The answer has a unspecified type. + ANSWER_TYPE_UNSPECIFIED = 0; + + // The answer is from FAQ doucments. + FAQ = 1; + + // The answer is from generative model. + GENERATIVE = 2; + } + + // The sources of the answers. + message AnswerSource { + // The title of the article. + string title = 1; + + // The URI of the article. + string uri = 2; + + // The relevant snippet of the article. + string snippet = 3; + } + + // The piece of text from the knowledge base documents that answers + // the search query + string answer = 1; + + // The type of the answer. + AnswerType answer_type = 2; + + // All sources used to generate the answer. + repeated AnswerSource answer_sources = 3; + + // The name of the answer record. + // Format: `projects//locations//answer + // Records/` + string answer_record = 5; +} diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation_profile.proto index 6462c3f61741..bd0b14350af7 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -325,9 +325,16 @@ message HumanAgentAssistantConfig { // suggestions. // // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, - // ENTITY_EXTRACTION. + // ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. bool enable_event_based_suggestion = 3; + // Optional. Disable the logging of search queries sent by human agents. It + // can prevent those queries from being stored at answer records. + // + // Supported features: KNOWLEDGE_SEARCH. + bool disable_agent_query_logging = 14 + [(google.api.field_behavior) = OPTIONAL]; + // Settings of suggestion trigger. // // Currently, only ARTICLE_SUGGESTION, FAQ, and DIALOGFLOW_ASSIST will use diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto index 6a24e9703686..44d26fb0f90f 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto @@ -620,6 +620,9 @@ message SuggestionFeature { // Run conversation summarization model for chat. CONVERSATION_SUMMARIZATION = 8; + + // Run knowledge search with text input from agent or text generated query. + KNOWLEDGE_SEARCH = 14; } // Type of Human Agent Assistant API feature to request. @@ -888,7 +891,7 @@ message StreamingAnalyzeContentRequest { // The UTF-8 encoded natural language text to be processed. Must be sent if // `text_config` is set in the first message. Text length must not exceed // 256 bytes for virtual agent interactions. The `input_text` field can be - // only sent once. + // only sent once, and would cancel the speech recognition if any ongoing. string input_text = 6; // The DTMF digits used to invoke intent and fill in parameter value. diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto index e7523e63a59c..1443c83f79d4 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto @@ -271,6 +271,13 @@ message QueryParameters { // "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", // "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. map webhook_headers = 14; + + // The platform of the virtual agent response messages. + // + // If not empty, only emits messages from this platform in the response. + // Valid values are the enum names of + // [platform][google.cloud.dialogflow.v2beta1.Intent.Message.platform]. + string platform = 18; } // Represents the query input. It can contain either: @@ -638,9 +645,12 @@ message CloudConversationDebuggingInfo { // beginning of the stream. google.protobuf.Duration single_utterance_end_time_offset = 14; - // No speech timeout settings observed at runtime. + // No speech timeout settings for the stream. google.protobuf.Duration no_speech_timeout = 15; + // Speech endpointing timeout settings for the stream. + google.protobuf.Duration endpointing_timeout = 19; + // Whether the streaming terminates with an injected text query. bool is_input_text = 16; diff --git a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/AsyncSearchKnowledge.java b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/AsyncSearchKnowledge.java new file mode 100644 index 000000000000..e4b31a7cf539 --- /dev/null +++ b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/AsyncSearchKnowledge.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 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.v2.samples; + +// [START dialogflow_v2_generated_Conversations_SearchKnowledge_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.v2.ConversationName; +import com.google.cloud.dialogflow.v2.ConversationProfileName; +import com.google.cloud.dialogflow.v2.ConversationsClient; +import com.google.cloud.dialogflow.v2.MessageName; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; +import com.google.cloud.dialogflow.v2.TextInput; + +public class AsyncSearchKnowledge { + + public static void main(String[] args) throws Exception { + asyncSearchKnowledge(); + } + + public static void asyncSearchKnowledge() 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()) { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + ApiFuture future = + conversationsClient.searchKnowledgeCallable().futureCall(request); + // Do something. + SearchKnowledgeResponse response = future.get(); + } + } +} +// [END dialogflow_v2_generated_Conversations_SearchKnowledge_async] diff --git a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/SyncSearchKnowledge.java b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/SyncSearchKnowledge.java new file mode 100644 index 000000000000..cc0fd075391a --- /dev/null +++ b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/conversations/searchknowledge/SyncSearchKnowledge.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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.v2.samples; + +// [START dialogflow_v2_generated_Conversations_SearchKnowledge_sync] +import com.google.cloud.dialogflow.v2.ConversationName; +import com.google.cloud.dialogflow.v2.ConversationProfileName; +import com.google.cloud.dialogflow.v2.ConversationsClient; +import com.google.cloud.dialogflow.v2.MessageName; +import com.google.cloud.dialogflow.v2.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2.SearchKnowledgeResponse; +import com.google.cloud.dialogflow.v2.TextInput; + +public class SyncSearchKnowledge { + + public static void main(String[] args) throws Exception { + syncSearchKnowledge(); + } + + public static void syncSearchKnowledge() 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()) { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + SearchKnowledgeResponse response = conversationsClient.searchKnowledge(request); + } + } +} +// [END dialogflow_v2_generated_Conversations_SearchKnowledge_sync] diff --git a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/AsyncSearchKnowledge.java b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/AsyncSearchKnowledge.java new file mode 100644 index 000000000000..c35c1780dc5b --- /dev/null +++ b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/AsyncSearchKnowledge.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 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_Conversations_SearchKnowledge_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationProfileName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.MessageName; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; +import com.google.cloud.dialogflow.v2beta1.TextInput; + +public class AsyncSearchKnowledge { + + public static void main(String[] args) throws Exception { + asyncSearchKnowledge(); + } + + public static void asyncSearchKnowledge() 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()) { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + ApiFuture future = + conversationsClient.searchKnowledgeCallable().futureCall(request); + // Do something. + SearchKnowledgeResponse response = future.get(); + } + } +} +// [END dialogflow_v2beta1_generated_Conversations_SearchKnowledge_async] diff --git a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/SyncSearchKnowledge.java b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/SyncSearchKnowledge.java new file mode 100644 index 000000000000..670e51d6c823 --- /dev/null +++ b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversations/searchknowledge/SyncSearchKnowledge.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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_Conversations_SearchKnowledge_sync] +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationProfileName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.MessageName; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest; +import com.google.cloud.dialogflow.v2beta1.SearchKnowledgeResponse; +import com.google.cloud.dialogflow.v2beta1.TextInput; + +public class SyncSearchKnowledge { + + public static void main(String[] args) throws Exception { + syncSearchKnowledge(); + } + + public static void syncSearchKnowledge() 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()) { + SearchKnowledgeRequest request = + SearchKnowledgeRequest.newBuilder() + .setParent("parent-995424086") + .setQuery(TextInput.newBuilder().build()) + .setConversationProfile( + ConversationProfileName.ofProjectConversationProfileName( + "[PROJECT]", "[CONVERSATION_PROFILE]") + .toString()) + .setSessionId("sessionId607796817") + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .build(); + SearchKnowledgeResponse response = conversationsClient.searchKnowledge(request); + } + } +} +// [END dialogflow_v2beta1_generated_Conversations_SearchKnowledge_sync]