From 8cca9aac54a8be5b7cce69c855c0b5d94c33f381 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:27:49 -0500 Subject: [PATCH] feat: [dialogflow-cx] add agent answer feedback capability (#10066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add agent answer feedback capability feat: add fields for supporting barge-in in StreamingDetectIntent API feat: add end_user_metadata to QueryParameters feat: add boost & bury and filter ES controls PiperOrigin-RevId: 583522403 Source-Link: https://github.com/googleapis/googleapis/commit/86c7ca69c44af41ec74dcdcbdb350181c10c8a2a Source-Link: https://github.com/googleapis/googleapis-gen/commit/42f2c6e979a1d2a6faedd772e23d49e6ef019470 Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiI0MmYyYzZlOTc5YTFkMmE2ZmFlZGQ3NzJlMjNkNDllNmVmMDE5NDcwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add agent answer feedback capability feat: add fields for supporting barge-in in StreamingDetectIntent API feat: add end_user_metadata to QueryParameters feat: add boost & bury and filter ES controls PiperOrigin-RevId: 583523426 Source-Link: https://github.com/googleapis/googleapis/commit/c73d0da5e88f795958a4306efe367ff193013c08 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b5ed29498b34e1016e1f69ecb2808168bd34d15 Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiIxYjVlZDI5NDk4YjM0ZTEwMTZlMWY2OWVjYjI4MDgxNjhiZDM0ZDE1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-dialogflow-cx/README.md | 4 +- .../dialogflow/cx/v3/EntityTypesClient.java | 338 +-- .../dialogflow/cx/v3/EntityTypesSettings.java | 28 +- .../dialogflow/cx/v3/SessionsClient.java | 69 + .../dialogflow/cx/v3/SessionsSettings.java | 12 + .../dialogflow/cx/v3/gapic_metadata.json | 3 + .../cx/v3/stub/EntityTypesStub.java | 18 +- .../cx/v3/stub/EntityTypesStubSettings.java | 60 +- .../cx/v3/stub/GrpcEntityTypesStub.java | 86 +- .../cx/v3/stub/GrpcSessionsStub.java | 35 + .../cx/v3/stub/HttpJsonEntityTypesStub.java | 144 +- .../cx/v3/stub/HttpJsonSessionsStub.java | 64 + .../dialogflow/cx/v3/stub/SessionsStub.java | 6 + .../cx/v3/stub/SessionsStubSettings.java | 28 + .../cx/v3beta1/EntityTypesClient.java | 338 +-- .../cx/v3beta1/EntityTypesSettings.java | 28 +- .../dialogflow/cx/v3beta1/SessionsClient.java | 69 + .../cx/v3beta1/SessionsSettings.java | 12 + .../dialogflow/cx/v3beta1/gapic_metadata.json | 3 + .../cx/v3beta1/stub/EntityTypesStub.java | 18 +- .../v3beta1/stub/EntityTypesStubSettings.java | 60 +- .../cx/v3beta1/stub/GrpcEntityTypesStub.java | 86 +- .../cx/v3beta1/stub/GrpcSessionsStub.java | 35 + .../v3beta1/stub/HttpJsonEntityTypesStub.java | 144 +- .../cx/v3beta1/stub/HttpJsonSessionsStub.java | 64 + .../cx/v3beta1/stub/SessionsStub.java | 6 + .../cx/v3beta1/stub/SessionsStubSettings.java | 28 + .../reflect-config.json | 189 ++ .../reflect-config.json | 189 ++ .../cx/v3/AgentsClientHttpJsonTest.java | 7 + .../dialogflow/cx/v3/AgentsClientTest.java | 5 + .../cx/v3/EntityTypesClientHttpJsonTest.java | 200 +- .../cx/v3/EntityTypesClientTest.java | 176 +- .../dialogflow/cx/v3/MockEntityTypesImpl.java | 42 +- .../dialogflow/cx/v3/MockSessionsImpl.java | 21 + .../cx/v3/SessionsClientHttpJsonTest.java | 64 + .../dialogflow/cx/v3/SessionsClientTest.java | 62 + .../cx/v3beta1/AgentsClientHttpJsonTest.java | 7 + .../cx/v3beta1/AgentsClientTest.java | 5 + .../EntityTypesClientHttpJsonTest.java | 200 +- .../cx/v3beta1/EntityTypesClientTest.java | 176 +- .../cx/v3beta1/MockEntityTypesImpl.java | 42 +- .../cx/v3beta1/MockSessionsImpl.java | 21 + .../v3beta1/SessionsClientHttpJsonTest.java | 64 + .../cx/v3beta1/SessionsClientTest.java | 62 + .../dialogflow/cx/v3/EntityTypesGrpc.java | 252 +- .../cloud/dialogflow/cx/v3/SessionsGrpc.java | 129 +- .../cx/v3beta1/EntityTypesGrpc.java | 252 +- .../dialogflow/cx/v3beta1/SessionsGrpc.java | 129 +- .../google/cloud/dialogflow/cx/v3/Agent.java | 874 ++++++- .../dialogflow/cx/v3/AgentOrBuilder.java | 44 +- .../cloud/dialogflow/cx/v3/AgentProto.java | 294 ++- .../dialogflow/cx/v3/AnswerFeedback.java | 2292 ++++++++++++++++ .../cx/v3/AnswerFeedbackOrBuilder.java | 127 + .../dialogflow/cx/v3/AudioConfigProto.java | 134 +- .../cloud/dialogflow/cx/v3/BargeInConfig.java | 1032 ++++++++ .../cx/v3/BargeInConfigOrBuilder.java | 98 + .../cloud/dialogflow/cx/v3/BoostSpec.java | 1982 ++++++++++++++ .../dialogflow/cx/v3/BoostSpecOrBuilder.java | 104 + .../cloud/dialogflow/cx/v3/BoostSpecs.java | 1321 ++++++++++ .../dialogflow/cx/v3/BoostSpecsOrBuilder.java | 158 ++ .../dialogflow/cx/v3/EntityTypeProto.java | 54 +- .../cloud/dialogflow/cx/v3/FilterSpecs.java | 979 +++++++ .../cx/v3/FilterSpecsOrBuilder.java | 125 + .../dialogflow/cx/v3/InputAudioConfig.java | 267 ++ .../cx/v3/InputAudioConfigOrBuilder.java | 35 + .../dialogflow/cx/v3/QueryParameters.java | 769 ++++++ .../cx/v3/QueryParametersOrBuilder.java | 127 + .../cloud/dialogflow/cx/v3/QueryResult.java | 113 +- .../cx/v3/QueryResultOrBuilder.java | 20 +- .../cloud/dialogflow/cx/v3/SearchConfig.java | 1518 +++++++++++ .../cx/v3/SearchConfigOrBuilder.java | 149 ++ .../cloud/dialogflow/cx/v3/SessionProto.java | 593 +++-- .../cx/v3/SubmitAnswerFeedbackRequest.java | 1407 ++++++++++ .../SubmitAnswerFeedbackRequestOrBuilder.java | 163 ++ .../google/cloud/dialogflow/cx/v3/agent.proto | 13 + .../cloud/dialogflow/cx/v3/audio_config.proto | 36 + .../cloud/dialogflow/cx/v3/entity_type.proto | 18 +- .../cloud/dialogflow/cx/v3/session.proto | 196 ++ .../cloud/dialogflow/cx/v3beta1/Agent.java | 883 ++++++- .../dialogflow/cx/v3beta1/AgentOrBuilder.java | 44 +- .../dialogflow/cx/v3beta1/AgentProto.java | 304 ++- .../dialogflow/cx/v3beta1/AnswerFeedback.java | 2304 +++++++++++++++++ .../cx/v3beta1/AnswerFeedbackOrBuilder.java | 128 + .../cx/v3beta1/AudioConfigProto.java | 138 +- .../dialogflow/cx/v3beta1/BargeInConfig.java | 1032 ++++++++ .../cx/v3beta1/BargeInConfigOrBuilder.java | 98 + .../dialogflow/cx/v3beta1/BoostSpec.java | 1997 ++++++++++++++ .../cx/v3beta1/BoostSpecOrBuilder.java | 106 + .../dialogflow/cx/v3beta1/BoostSpecs.java | 1325 ++++++++++ .../cx/v3beta1/BoostSpecsOrBuilder.java | 158 ++ .../cx/v3beta1/EntityTypeProto.java | 58 +- .../dialogflow/cx/v3beta1/FilterSpecs.java | 980 +++++++ .../cx/v3beta1/FilterSpecsOrBuilder.java | 125 + .../cx/v3beta1/InputAudioConfig.java | 268 ++ .../cx/v3beta1/InputAudioConfigOrBuilder.java | 35 + .../cx/v3beta1/QueryParameters.java | 769 ++++++ .../cx/v3beta1/QueryParametersOrBuilder.java | 127 + .../dialogflow/cx/v3beta1/QueryResult.java | 113 +- .../cx/v3beta1/QueryResultOrBuilder.java | 20 +- .../dialogflow/cx/v3beta1/SearchConfig.java | 1536 +++++++++++ .../cx/v3beta1/SearchConfigOrBuilder.java | 149 ++ .../dialogflow/cx/v3beta1/SessionProto.java | 604 +++-- .../v3beta1/SubmitAnswerFeedbackRequest.java | 1418 ++++++++++ .../SubmitAnswerFeedbackRequestOrBuilder.java | 163 ++ .../cloud/dialogflow/cx/v3beta1/agent.proto | 13 + .../dialogflow/cx/v3beta1/audio_config.proto | 36 + .../dialogflow/cx/v3beta1/entity_type.proto | 18 +- .../cloud/dialogflow/cx/v3beta1/session.proto | 196 ++ .../AsyncSubmitAnswerFeedback.java | 57 + .../SyncSubmitAnswerFeedback.java | 53 + .../AsyncSubmitAnswerFeedback.java | 57 + .../SyncSubmitAnswerFeedback.java | 53 + 113 files changed, 32186 insertions(+), 2301 deletions(-) create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedback.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedbackOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfig.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfigOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpec.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecs.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecsOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecs.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecsOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfig.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfigOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequest.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequestOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedback.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedbackOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfig.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfigOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpec.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecs.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecsOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecs.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecsOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfig.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfigOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequest.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequestOrBuilder.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index 290ddc35b264..e37abe616c32 100644 --- a/java-dialogflow-cx/README.md +++ b/java-dialogflow-cx/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.27.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.41.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-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java index c845888e5e5e..c8c70522fad0 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java @@ -177,175 +177,6 @@ public EntityTypesStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
-   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The agent to list all entity types for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { - ListEntityTypesRequest request = - ListEntityTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listEntityTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
-   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The agent to list all entity types for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEntityTypesPagedResponse listEntityTypes(String parent) { - ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build(); - return listEntityTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @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 ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) { - return listEntityTypesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (EntityType element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEntityTypesPagedCallable() { - return stub.listEntityTypesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListEntityTypesResponse response =
-   *         entityTypesClient.listEntityTypesCallable().call(request);
-   *     for (EntityType element : response.getEntityTypesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEntityTypesCallable() { - return stub.listEntityTypesCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves the specified entity type. @@ -834,6 +665,175 @@ public final UnaryCallable deleteEntityTypeCalla return stub.deleteEntityTypeCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list all entity types for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { + ListEntityTypesRequest request = + ListEntityTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEntityTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list all entity types for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntityTypesPagedResponse listEntityTypes(String parent) { + ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build(); + return listEntityTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) { + return listEntityTypesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (EntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEntityTypesPagedCallable() { + return stub.listEntityTypesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEntityTypesResponse response =
+   *         entityTypesClient.listEntityTypesCallable().call(request);
+   *     for (EntityType element : response.getEntityTypesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEntityTypesCallable() { + return stub.listEntityTypesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java index e2271b744b34..0b88b2d2a1a3 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java @@ -80,13 +80,6 @@ @Generated("by gapic-generator-java") public class EntityTypesSettings extends ClientSettings { - /** Returns the object with the settings used for calls to listEntityTypes. */ - public PagedCallSettings< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); - } - /** Returns the object with the settings used for calls to getEntityType. */ public UnaryCallSettings getEntityTypeSettings() { return ((EntityTypesStubSettings) getStubSettings()).getEntityTypeSettings(); @@ -107,6 +100,13 @@ public UnaryCallSettings deleteEntityTypeSetting return ((EntityTypesStubSettings) getStubSettings()).deleteEntityTypeSettings(); } + /** Returns the object with the settings used for calls to listEntityTypes. */ + public PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -232,13 +232,6 @@ public Builder applyToAllUnaryMethods( return this; } - /** Returns the builder for the settings used for calls to listEntityTypes. */ - public PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return getStubSettingsBuilder().listEntityTypesSettings(); - } - /** Returns the builder for the settings used for calls to getEntityType. */ public UnaryCallSettings.Builder getEntityTypeSettings() { return getStubSettingsBuilder().getEntityTypeSettings(); @@ -261,6 +254,13 @@ public UnaryCallSettings.Builder deleteEntityTyp return getStubSettingsBuilder().deleteEntityTypeSettings(); } + /** Returns the builder for the settings used for calls to listEntityTypes. */ + public PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return getStubSettingsBuilder().listEntityTypesSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java index e0ba84cf437d..cc581037ac33 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java @@ -442,6 +442,75 @@ public final UnaryCallable fulfillI return stub.fulfillIntentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the feedback received from the user for a single turn of the bot response. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   SubmitAnswerFeedbackRequest request =
+   *       SubmitAnswerFeedbackRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setResponseId("responseId-633138884")
+   *           .setAnswerFeedback(AnswerFeedback.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AnswerFeedback response = sessionsClient.submitAnswerFeedback(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 AnswerFeedback submitAnswerFeedback(SubmitAnswerFeedbackRequest request) { + return submitAnswerFeedbackCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the feedback received from the user for a single turn of the bot response. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   SubmitAnswerFeedbackRequest request =
+   *       SubmitAnswerFeedbackRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setResponseId("responseId-633138884")
+   *           .setAnswerFeedback(AnswerFeedback.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.submitAnswerFeedbackCallable().futureCall(request);
+   *   // Do something.
+   *   AnswerFeedback response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + submitAnswerFeedbackCallable() { + return stub.submitAnswerFeedbackCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java index 09548fcd60ce..94ab1c635a31 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java @@ -100,6 +100,12 @@ public UnaryCallSettings fulfillInt return ((SessionsStubSettings) getStubSettings()).fulfillIntentSettings(); } + /** Returns the object with the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings + submitAnswerFeedbackSettings() { + return ((SessionsStubSettings) getStubSettings()).submitAnswerFeedbackSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -250,6 +256,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().fulfillIntentSettings(); } + /** Returns the builder for the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings.Builder + submitAnswerFeedbackSettings() { + return getStubSettingsBuilder().submitAnswerFeedbackSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json index d53ae8a2b94d..8d2eac975953 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json @@ -366,6 +366,9 @@ }, "StreamingDetectIntent": { "methods": ["streamingDetectIntentCallable"] + }, + "SubmitAnswerFeedback": { + "methods": ["submitAnswerFeedback", "submitAnswerFeedbackCallable"] } } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java index 32a0f9c08d76..8d2c9e50aae5 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java @@ -44,15 +44,6 @@ @Generated("by gapic-generator-java") public abstract class EntityTypesStub implements BackgroundResource { - public UnaryCallable - listEntityTypesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listEntityTypesPagedCallable()"); - } - - public UnaryCallable listEntityTypesCallable() { - throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); - } - public UnaryCallable getEntityTypeCallable() { throw new UnsupportedOperationException("Not implemented: getEntityTypeCallable()"); } @@ -69,6 +60,15 @@ public UnaryCallable deleteEntityTypeCallable() throw new UnsupportedOperationException("Not implemented: deleteEntityTypeCallable()"); } + public UnaryCallable + listEntityTypesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEntityTypesPagedCallable()"); + } + + public UnaryCallable listEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java index 631540b272eb..a2f762c9cab2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java @@ -111,13 +111,13 @@ public class EntityTypesStubSettings extends StubSettings - listEntityTypesSettings; private final UnaryCallSettings getEntityTypeSettings; private final UnaryCallSettings createEntityTypeSettings; private final UnaryCallSettings updateEntityTypeSettings; private final UnaryCallSettings deleteEntityTypeSettings; + private final PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -232,13 +232,6 @@ public ApiFuture getFuturePagedResponse( } }; - /** Returns the object with the settings used for calls to listEntityTypes. */ - public PagedCallSettings< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return listEntityTypesSettings; - } - /** Returns the object with the settings used for calls to getEntityType. */ public UnaryCallSettings getEntityTypeSettings() { return getEntityTypeSettings; @@ -259,6 +252,13 @@ public UnaryCallSettings deleteEntityTypeSetting return deleteEntityTypeSettings; } + /** Returns the object with the settings used for calls to listEntityTypes. */ + public PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return listEntityTypesSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -376,11 +376,11 @@ public Builder toBuilder() { protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); - listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); getEntityTypeSettings = settingsBuilder.getEntityTypeSettings().build(); createEntityTypeSettings = settingsBuilder.createEntityTypeSettings().build(); updateEntityTypeSettings = settingsBuilder.updateEntityTypeSettings().build(); deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build(); + listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -388,9 +388,6 @@ protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { /** Builder for EntityTypesStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings; private final UnaryCallSettings.Builder getEntityTypeSettings; private final UnaryCallSettings.Builder createEntityTypeSettings; @@ -398,6 +395,9 @@ public static class Builder extends StubSettings.Builder deleteEntityTypeSettings; + private final PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -440,21 +440,21 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); - listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); getEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - listEntityTypesSettings, getEntityTypeSettings, createEntityTypeSettings, updateEntityTypeSettings, deleteEntityTypeSettings, + listEntityTypesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -463,21 +463,21 @@ protected Builder(ClientContext clientContext) { protected Builder(EntityTypesStubSettings settings) { super(settings); - listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); getEntityTypeSettings = settings.getEntityTypeSettings.toBuilder(); createEntityTypeSettings = settings.createEntityTypeSettings.toBuilder(); updateEntityTypeSettings = settings.updateEntityTypeSettings.toBuilder(); deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder(); + listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - listEntityTypesSettings, getEntityTypeSettings, createEntityTypeSettings, updateEntityTypeSettings, deleteEntityTypeSettings, + listEntityTypesSettings, listLocationsSettings, getLocationSettings); } @@ -509,11 +509,6 @@ private static Builder createHttpJsonDefault() { } private static Builder initDefaults(Builder builder) { - builder - .listEntityTypesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder .getEntityTypeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -534,6 +529,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 + .listEntityTypesSettings() + .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")) @@ -562,13 +562,6 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } - /** Returns the builder for the settings used for calls to listEntityTypes. */ - public PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return listEntityTypesSettings; - } - /** Returns the builder for the settings used for calls to getEntityType. */ public UnaryCallSettings.Builder getEntityTypeSettings() { return getEntityTypeSettings; @@ -591,6 +584,13 @@ public UnaryCallSettings.Builder deleteEntityTyp return deleteEntityTypeSettings; } + /** Returns the builder for the settings used for calls to listEntityTypes. */ + public PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return listEntityTypesSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java index b48498e96752..1d3a7c50d510 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java @@ -53,17 +53,6 @@ */ @Generated("by gapic-generator-java") public class GrpcEntityTypesStub extends EntityTypesStub { - private static final MethodDescriptor - listEntityTypesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ListEntityTypes") - .setRequestMarshaller( - ProtoUtils.marshaller(ListEntityTypesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor getEntityTypeMethodDescriptor = MethodDescriptor.newBuilder() @@ -104,6 +93,17 @@ public class GrpcEntityTypesStub extends EntityTypesStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + listEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ListEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -123,14 +123,14 @@ public class GrpcEntityTypesStub extends EntityTypesStub { .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) .build(); - private final UnaryCallable - listEntityTypesCallable; - private final UnaryCallable - listEntityTypesPagedCallable; private final UnaryCallable getEntityTypeCallable; private final UnaryCallable createEntityTypeCallable; private final UnaryCallable updateEntityTypeCallable; private final UnaryCallable deleteEntityTypeCallable; + private final UnaryCallable + listEntityTypesCallable; + private final UnaryCallable + listEntityTypesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -178,17 +178,6 @@ protected GrpcEntityTypesStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - GrpcCallSettings - listEntityTypesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listEntityTypesMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) @@ -230,6 +219,17 @@ protected GrpcEntityTypesStub( return builder.build(); }) .build(); + GrpcCallSettings + listEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -251,12 +251,6 @@ protected GrpcEntityTypesStub( }) .build(); - this.listEntityTypesCallable = - callableFactory.createUnaryCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); - this.listEntityTypesPagedCallable = - callableFactory.createPagedCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.getEntityTypeCallable = callableFactory.createUnaryCallable( getEntityTypeTransportSettings, settings.getEntityTypeSettings(), clientContext); @@ -269,6 +263,12 @@ protected GrpcEntityTypesStub( this.deleteEntityTypeCallable = callableFactory.createUnaryCallable( deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); + this.listEntityTypesCallable = + callableFactory.createUnaryCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.listEntityTypesPagedCallable = + callableFactory.createPagedCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -287,17 +287,6 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } - @Override - public UnaryCallable listEntityTypesCallable() { - return listEntityTypesCallable; - } - - @Override - public UnaryCallable - listEntityTypesPagedCallable() { - return listEntityTypesPagedCallable; - } - @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -318,6 +307,17 @@ public UnaryCallable deleteEntityTypeCallable() return deleteEntityTypeCallable; } + @Override + public UnaryCallable listEntityTypesCallable() { + return listEntityTypesCallable; + } + + @Override + public UnaryCallable + listEntityTypesPagedCallable() { + return listEntityTypesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java index 95e7dd0cb342..f83b85c1e810 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java @@ -26,6 +26,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3.FulfillIntentRequest; @@ -34,6 +35,7 @@ import com.google.cloud.dialogflow.cx.v3.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -95,6 +97,16 @@ public class GrpcSessionsStub extends SessionsStub { ProtoUtils.marshaller(FulfillIntentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + submitAnswerFeedbackMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Sessions/SubmitAnswerFeedback") + .setRequestMarshaller( + ProtoUtils.marshaller(SubmitAnswerFeedbackRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnswerFeedback.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -119,6 +131,8 @@ public class GrpcSessionsStub extends SessionsStub { streamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; + private final UnaryCallable + submitAnswerFeedbackCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -201,6 +215,17 @@ protected GrpcSessionsStub( return builder.build(); }) .build(); + GrpcCallSettings + submitAnswerFeedbackTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(submitAnswerFeedbackMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -236,6 +261,11 @@ protected GrpcSessionsStub( this.fulfillIntentCallable = callableFactory.createUnaryCallable( fulfillIntentTransportSettings, settings.fulfillIntentSettings(), clientContext); + this.submitAnswerFeedbackCallable = + callableFactory.createUnaryCallable( + submitAnswerFeedbackTransportSettings, + settings.submitAnswerFeedbackSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -275,6 +305,11 @@ public UnaryCallable fulfillIntentC return fulfillIntentCallable; } + @Override + public UnaryCallable submitAnswerFeedbackCallable() { + return submitAnswerFeedbackCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java index 5e3a92d5411f..0b65e120b0bd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java @@ -64,44 +64,6 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - private static final ApiMethodDescriptor - listEntityTypesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ListEntityTypes") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "languageCode", request.getLanguageCode()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListEntityTypesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor getEntityTypeMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -253,6 +215,44 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); + private static final ApiMethodDescriptor + listEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ListEntityTypes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEntityTypesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -321,14 +321,14 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); - private final UnaryCallable - listEntityTypesCallable; - private final UnaryCallable - listEntityTypesPagedCallable; private final UnaryCallable getEntityTypeCallable; private final UnaryCallable createEntityTypeCallable; private final UnaryCallable updateEntityTypeCallable; private final UnaryCallable deleteEntityTypeCallable; + private final UnaryCallable + listEntityTypesCallable; + private final UnaryCallable + listEntityTypesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -376,18 +376,6 @@ protected HttpJsonEntityTypesStub( throws IOException { this.callableFactory = callableFactory; - HttpJsonCallSettings - listEntityTypesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listEntityTypesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); HttpJsonCallSettings getEntityTypeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) @@ -433,6 +421,18 @@ protected HttpJsonEntityTypesStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -457,12 +457,6 @@ protected HttpJsonEntityTypesStub( }) .build(); - this.listEntityTypesCallable = - callableFactory.createUnaryCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); - this.listEntityTypesPagedCallable = - callableFactory.createPagedCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.getEntityTypeCallable = callableFactory.createUnaryCallable( getEntityTypeTransportSettings, settings.getEntityTypeSettings(), clientContext); @@ -475,6 +469,12 @@ protected HttpJsonEntityTypesStub( this.deleteEntityTypeCallable = callableFactory.createUnaryCallable( deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); + this.listEntityTypesCallable = + callableFactory.createUnaryCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.listEntityTypesPagedCallable = + callableFactory.createPagedCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -492,27 +492,16 @@ protected HttpJsonEntityTypesStub( @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listEntityTypesMethodDescriptor); methodDescriptors.add(getEntityTypeMethodDescriptor); methodDescriptors.add(createEntityTypeMethodDescriptor); methodDescriptors.add(updateEntityTypeMethodDescriptor); methodDescriptors.add(deleteEntityTypeMethodDescriptor); + methodDescriptors.add(listEntityTypesMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } - @Override - public UnaryCallable listEntityTypesCallable() { - return listEntityTypesCallable; - } - - @Override - public UnaryCallable - listEntityTypesPagedCallable() { - return listEntityTypesPagedCallable; - } - @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -533,6 +522,17 @@ public UnaryCallable deleteEntityTypeCallable() return deleteEntityTypeCallable; } + @Override + public UnaryCallable listEntityTypesCallable() { + return listEntityTypesCallable; + } + + @Override + public UnaryCallable + listEntityTypesPagedCallable() { + return listEntityTypesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java index b41ab27b4d6b..892f5c86b3fe 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java @@ -32,6 +32,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3.FulfillIntentRequest; @@ -40,6 +41,7 @@ import com.google.cloud.dialogflow.cx.v3.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -184,6 +186,43 @@ public class HttpJsonSessionsStub extends SessionsStub { .build()) .build(); + private static final ApiMethodDescriptor + submitAnswerFeedbackMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Sessions/SubmitAnswerFeedback") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "session", request.getSession()); + return fields; + }) + .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().clearSession().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AnswerFeedback.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -255,6 +294,8 @@ public class HttpJsonSessionsStub extends SessionsStub { private final UnaryCallable detectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; + private final UnaryCallable + submitAnswerFeedbackCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -337,6 +378,18 @@ protected HttpJsonSessionsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + submitAnswerFeedbackTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(submitAnswerFeedbackMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -370,6 +423,11 @@ protected HttpJsonSessionsStub( this.fulfillIntentCallable = callableFactory.createUnaryCallable( fulfillIntentTransportSettings, settings.fulfillIntentSettings(), clientContext); + this.submitAnswerFeedbackCallable = + callableFactory.createUnaryCallable( + submitAnswerFeedbackTransportSettings, + settings.submitAnswerFeedbackSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -390,6 +448,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(detectIntentMethodDescriptor); methodDescriptors.add(matchIntentMethodDescriptor); methodDescriptors.add(fulfillIntentMethodDescriptor); + methodDescriptors.add(submitAnswerFeedbackMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -410,6 +469,11 @@ public UnaryCallable fulfillIntentC return fulfillIntentCallable; } + @Override + public UnaryCallable submitAnswerFeedbackCallable() { + return submitAnswerFeedbackCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java index 3c590b2c7d48..b3ef418d5c8e 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java @@ -21,6 +21,7 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3.FulfillIntentRequest; @@ -29,6 +30,7 @@ import com.google.cloud.dialogflow.cx.v3.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -61,6 +63,10 @@ public UnaryCallable fulfillIntentC throw new UnsupportedOperationException("Not implemented: fulfillIntentCallable()"); } + public UnaryCallable submitAnswerFeedbackCallable() { + throw new UnsupportedOperationException("Not implemented: submitAnswerFeedbackCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java index 03335524f5e6..37e6bf3d9968 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java @@ -44,6 +44,7 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3.FulfillIntentRequest; @@ -52,6 +53,7 @@ import com.google.cloud.dialogflow.cx.v3.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -116,6 +118,8 @@ public class SessionsStubSettings extends StubSettings { private final UnaryCallSettings matchIntentSettings; private final UnaryCallSettings fulfillIntentSettings; + private final UnaryCallSettings + submitAnswerFeedbackSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -195,6 +199,12 @@ public UnaryCallSettings fulfillInt return fulfillIntentSettings; } + /** Returns the object with the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings + submitAnswerFeedbackSettings() { + return submitAnswerFeedbackSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -314,6 +324,7 @@ protected SessionsStubSettings(Builder settingsBuilder) throws IOException { streamingDetectIntentSettings = settingsBuilder.streamingDetectIntentSettings().build(); matchIntentSettings = settingsBuilder.matchIntentSettings().build(); fulfillIntentSettings = settingsBuilder.fulfillIntentSettings().build(); + submitAnswerFeedbackSettings = settingsBuilder.submitAnswerFeedbackSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -330,6 +341,8 @@ public static class Builder extends StubSettings.Builder fulfillIntentSettings; + private final UnaryCallSettings.Builder + submitAnswerFeedbackSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -400,6 +413,7 @@ protected Builder(ClientContext clientContext) { streamingDetectIntentSettings = StreamingCallSettings.newBuilder(); matchIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); fulfillIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + submitAnswerFeedbackSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -408,6 +422,7 @@ protected Builder(ClientContext clientContext) { detectIntentSettings, matchIntentSettings, fulfillIntentSettings, + submitAnswerFeedbackSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -420,6 +435,7 @@ protected Builder(SessionsStubSettings settings) { streamingDetectIntentSettings = settings.streamingDetectIntentSettings.toBuilder(); matchIntentSettings = settings.matchIntentSettings.toBuilder(); fulfillIntentSettings = settings.fulfillIntentSettings.toBuilder(); + submitAnswerFeedbackSettings = settings.submitAnswerFeedbackSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -428,6 +444,7 @@ protected Builder(SessionsStubSettings settings) { detectIntentSettings, matchIntentSettings, fulfillIntentSettings, + submitAnswerFeedbackSettings, listLocationsSettings, getLocationSettings); } @@ -474,6 +491,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 + .submitAnswerFeedbackSettings() + .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")) @@ -527,6 +549,12 @@ public Builder applyToAllUnaryMethods( return fulfillIntentSettings; } + /** Returns the builder for the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings.Builder + submitAnswerFeedbackSettings() { + return submitAnswerFeedbackSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java index 8c674f8319cd..1a932fd2cb57 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java @@ -179,175 +179,6 @@ public EntityTypesStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
-   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The agent to list all entity types for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { - ListEntityTypesRequest request = - ListEntityTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listEntityTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
-   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The agent to list all entity types for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEntityTypesPagedResponse listEntityTypes(String parent) { - ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build(); - return listEntityTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @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 ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) { - return listEntityTypesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (EntityType element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEntityTypesPagedCallable() { - return stub.listEntityTypesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all entity types in the specified agent. - * - *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ListEntityTypesRequest request =
-   *       ListEntityTypesRequest.newBuilder()
-   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListEntityTypesResponse response =
-   *         entityTypesClient.listEntityTypesCallable().call(request);
-   *     for (EntityType element : response.getEntityTypesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEntityTypesCallable() { - return stub.listEntityTypesCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves the specified entity type. @@ -824,6 +655,175 @@ public final UnaryCallable deleteEntityTypeCalla return stub.deleteEntityTypeCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list all entity types for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { + ListEntityTypesRequest request = + ListEntityTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEntityTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list all entity types for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntityTypesPagedResponse listEntityTypes(String parent) { + ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build(); + return listEntityTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) { + return listEntityTypesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (EntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEntityTypesPagedCallable() { + return stub.listEntityTypesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all entity types in the specified agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEntityTypesResponse response =
+   *         entityTypesClient.listEntityTypesCallable().call(request);
+   *     for (EntityType element : response.getEntityTypesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEntityTypesCallable() { + return stub.listEntityTypesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java index 41278d1a0680..24d96d653cdd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java @@ -81,13 +81,6 @@ @Generated("by gapic-generator-java") public class EntityTypesSettings extends ClientSettings { - /** Returns the object with the settings used for calls to listEntityTypes. */ - public PagedCallSettings< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); - } - /** Returns the object with the settings used for calls to getEntityType. */ public UnaryCallSettings getEntityTypeSettings() { return ((EntityTypesStubSettings) getStubSettings()).getEntityTypeSettings(); @@ -108,6 +101,13 @@ public UnaryCallSettings deleteEntityTypeSetting return ((EntityTypesStubSettings) getStubSettings()).deleteEntityTypeSettings(); } + /** Returns the object with the settings used for calls to listEntityTypes. */ + public PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -233,13 +233,6 @@ public Builder applyToAllUnaryMethods( return this; } - /** Returns the builder for the settings used for calls to listEntityTypes. */ - public PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return getStubSettingsBuilder().listEntityTypesSettings(); - } - /** Returns the builder for the settings used for calls to getEntityType. */ public UnaryCallSettings.Builder getEntityTypeSettings() { return getStubSettingsBuilder().getEntityTypeSettings(); @@ -262,6 +255,13 @@ public UnaryCallSettings.Builder deleteEntityTyp return getStubSettingsBuilder().deleteEntityTypeSettings(); } + /** Returns the builder for the settings used for calls to listEntityTypes. */ + public PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return getStubSettingsBuilder().listEntityTypesSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java index ad7c349ada95..748a249f79de 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java @@ -444,6 +444,75 @@ public final UnaryCallable fulfillI return stub.fulfillIntentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the feedback received from the user for a single turn of the bot response. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   SubmitAnswerFeedbackRequest request =
+   *       SubmitAnswerFeedbackRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setResponseId("responseId-633138884")
+   *           .setAnswerFeedback(AnswerFeedback.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AnswerFeedback response = sessionsClient.submitAnswerFeedback(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 AnswerFeedback submitAnswerFeedback(SubmitAnswerFeedbackRequest request) { + return submitAnswerFeedbackCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the feedback received from the user for a single turn of the bot response. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   SubmitAnswerFeedbackRequest request =
+   *       SubmitAnswerFeedbackRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setResponseId("responseId-633138884")
+   *           .setAnswerFeedback(AnswerFeedback.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.submitAnswerFeedbackCallable().futureCall(request);
+   *   // Do something.
+   *   AnswerFeedback response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + submitAnswerFeedbackCallable() { + return stub.submitAnswerFeedbackCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java index 40ddfd90aca8..6efaf8224881 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java @@ -101,6 +101,12 @@ public UnaryCallSettings fulfillInt return ((SessionsStubSettings) getStubSettings()).fulfillIntentSettings(); } + /** Returns the object with the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings + submitAnswerFeedbackSettings() { + return ((SessionsStubSettings) getStubSettings()).submitAnswerFeedbackSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -251,6 +257,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().fulfillIntentSettings(); } + /** Returns the builder for the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings.Builder + submitAnswerFeedbackSettings() { + return getStubSettingsBuilder().submitAnswerFeedbackSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json index a91c6cee44a9..4d6ac3d7bed2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json @@ -366,6 +366,9 @@ }, "StreamingDetectIntent": { "methods": ["streamingDetectIntentCallable"] + }, + "SubmitAnswerFeedback": { + "methods": ["submitAnswerFeedback", "submitAnswerFeedbackCallable"] } } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java index 25ea025822eb..fa98e4db89cc 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java @@ -46,15 +46,6 @@ @Generated("by gapic-generator-java") public abstract class EntityTypesStub implements BackgroundResource { - public UnaryCallable - listEntityTypesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listEntityTypesPagedCallable()"); - } - - public UnaryCallable listEntityTypesCallable() { - throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); - } - public UnaryCallable getEntityTypeCallable() { throw new UnsupportedOperationException("Not implemented: getEntityTypeCallable()"); } @@ -71,6 +62,15 @@ public UnaryCallable deleteEntityTypeCallable() throw new UnsupportedOperationException("Not implemented: deleteEntityTypeCallable()"); } + public UnaryCallable + listEntityTypesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEntityTypesPagedCallable()"); + } + + public UnaryCallable listEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java index 3ae5d9478b94..66bed7081dec 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java @@ -112,13 +112,13 @@ public class EntityTypesStubSettings extends StubSettings - listEntityTypesSettings; private final UnaryCallSettings getEntityTypeSettings; private final UnaryCallSettings createEntityTypeSettings; private final UnaryCallSettings updateEntityTypeSettings; private final UnaryCallSettings deleteEntityTypeSettings; + private final PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -233,13 +233,6 @@ public ApiFuture getFuturePagedResponse( } }; - /** Returns the object with the settings used for calls to listEntityTypes. */ - public PagedCallSettings< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return listEntityTypesSettings; - } - /** Returns the object with the settings used for calls to getEntityType. */ public UnaryCallSettings getEntityTypeSettings() { return getEntityTypeSettings; @@ -260,6 +253,13 @@ public UnaryCallSettings deleteEntityTypeSetting return deleteEntityTypeSettings; } + /** Returns the object with the settings used for calls to listEntityTypes. */ + public PagedCallSettings< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return listEntityTypesSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -377,11 +377,11 @@ public Builder toBuilder() { protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); - listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); getEntityTypeSettings = settingsBuilder.getEntityTypeSettings().build(); createEntityTypeSettings = settingsBuilder.createEntityTypeSettings().build(); updateEntityTypeSettings = settingsBuilder.updateEntityTypeSettings().build(); deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build(); + listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -389,9 +389,6 @@ protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { /** Builder for EntityTypesStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings; private final UnaryCallSettings.Builder getEntityTypeSettings; private final UnaryCallSettings.Builder createEntityTypeSettings; @@ -399,6 +396,9 @@ public static class Builder extends StubSettings.Builder deleteEntityTypeSettings; + private final PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -441,21 +441,21 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); - listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); getEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - listEntityTypesSettings, getEntityTypeSettings, createEntityTypeSettings, updateEntityTypeSettings, deleteEntityTypeSettings, + listEntityTypesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -464,21 +464,21 @@ protected Builder(ClientContext clientContext) { protected Builder(EntityTypesStubSettings settings) { super(settings); - listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); getEntityTypeSettings = settings.getEntityTypeSettings.toBuilder(); createEntityTypeSettings = settings.createEntityTypeSettings.toBuilder(); updateEntityTypeSettings = settings.updateEntityTypeSettings.toBuilder(); deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder(); + listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - listEntityTypesSettings, getEntityTypeSettings, createEntityTypeSettings, updateEntityTypeSettings, deleteEntityTypeSettings, + listEntityTypesSettings, listLocationsSettings, getLocationSettings); } @@ -510,11 +510,6 @@ private static Builder createHttpJsonDefault() { } private static Builder initDefaults(Builder builder) { - builder - .listEntityTypesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder .getEntityTypeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -535,6 +530,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 + .listEntityTypesSettings() + .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")) @@ -563,13 +563,6 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } - /** Returns the builder for the settings used for calls to listEntityTypes. */ - public PagedCallSettings.Builder< - ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> - listEntityTypesSettings() { - return listEntityTypesSettings; - } - /** Returns the builder for the settings used for calls to getEntityType. */ public UnaryCallSettings.Builder getEntityTypeSettings() { return getEntityTypeSettings; @@ -592,6 +585,13 @@ public UnaryCallSettings.Builder deleteEntityTyp return deleteEntityTypeSettings; } + /** Returns the builder for the settings used for calls to listEntityTypes. */ + public PagedCallSettings.Builder< + ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse> + listEntityTypesSettings() { + return listEntityTypesSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java index c9a4242e4c25..1c26a846be42 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java @@ -55,17 +55,6 @@ @BetaApi @Generated("by gapic-generator-java") public class GrpcEntityTypesStub extends EntityTypesStub { - private static final MethodDescriptor - listEntityTypesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes") - .setRequestMarshaller( - ProtoUtils.marshaller(ListEntityTypesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor getEntityTypeMethodDescriptor = MethodDescriptor.newBuilder() @@ -106,6 +95,17 @@ public class GrpcEntityTypesStub extends EntityTypesStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + listEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -125,14 +125,14 @@ public class GrpcEntityTypesStub extends EntityTypesStub { .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) .build(); - private final UnaryCallable - listEntityTypesCallable; - private final UnaryCallable - listEntityTypesPagedCallable; private final UnaryCallable getEntityTypeCallable; private final UnaryCallable createEntityTypeCallable; private final UnaryCallable updateEntityTypeCallable; private final UnaryCallable deleteEntityTypeCallable; + private final UnaryCallable + listEntityTypesCallable; + private final UnaryCallable + listEntityTypesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -180,17 +180,6 @@ protected GrpcEntityTypesStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - GrpcCallSettings - listEntityTypesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listEntityTypesMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) @@ -232,6 +221,17 @@ protected GrpcEntityTypesStub( return builder.build(); }) .build(); + GrpcCallSettings + listEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -253,12 +253,6 @@ protected GrpcEntityTypesStub( }) .build(); - this.listEntityTypesCallable = - callableFactory.createUnaryCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); - this.listEntityTypesPagedCallable = - callableFactory.createPagedCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.getEntityTypeCallable = callableFactory.createUnaryCallable( getEntityTypeTransportSettings, settings.getEntityTypeSettings(), clientContext); @@ -271,6 +265,12 @@ protected GrpcEntityTypesStub( this.deleteEntityTypeCallable = callableFactory.createUnaryCallable( deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); + this.listEntityTypesCallable = + callableFactory.createUnaryCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.listEntityTypesPagedCallable = + callableFactory.createPagedCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -289,17 +289,6 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } - @Override - public UnaryCallable listEntityTypesCallable() { - return listEntityTypesCallable; - } - - @Override - public UnaryCallable - listEntityTypesPagedCallable() { - return listEntityTypesPagedCallable; - } - @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -320,6 +309,17 @@ public UnaryCallable deleteEntityTypeCallable() return deleteEntityTypeCallable; } + @Override + public UnaryCallable listEntityTypesCallable() { + return listEntityTypesCallable; + } + + @Override + public UnaryCallable + listEntityTypesPagedCallable() { + return listEntityTypesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java index af29d9ea3fa2..c423601c1b1e 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java @@ -27,6 +27,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest; @@ -35,6 +36,7 @@ import com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -98,6 +100,16 @@ public class GrpcSessionsStub extends SessionsStub { ProtoUtils.marshaller(FulfillIntentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + submitAnswerFeedbackMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Sessions/SubmitAnswerFeedback") + .setRequestMarshaller( + ProtoUtils.marshaller(SubmitAnswerFeedbackRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnswerFeedback.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -122,6 +134,8 @@ public class GrpcSessionsStub extends SessionsStub { streamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; + private final UnaryCallable + submitAnswerFeedbackCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -204,6 +218,17 @@ protected GrpcSessionsStub( return builder.build(); }) .build(); + GrpcCallSettings + submitAnswerFeedbackTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(submitAnswerFeedbackMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -239,6 +264,11 @@ protected GrpcSessionsStub( this.fulfillIntentCallable = callableFactory.createUnaryCallable( fulfillIntentTransportSettings, settings.fulfillIntentSettings(), clientContext); + this.submitAnswerFeedbackCallable = + callableFactory.createUnaryCallable( + submitAnswerFeedbackTransportSettings, + settings.submitAnswerFeedbackSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -278,6 +308,11 @@ public UnaryCallable fulfillIntentC return fulfillIntentCallable; } + @Override + public UnaryCallable submitAnswerFeedbackCallable() { + return submitAnswerFeedbackCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java index 22c1b3b40ba6..b0c7fcbba552 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java @@ -64,44 +64,6 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - private static final ApiMethodDescriptor - listEntityTypesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "languageCode", request.getLanguageCode()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListEntityTypesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor getEntityTypeMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -253,6 +215,44 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); + private static final ApiMethodDescriptor + listEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEntityTypesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -321,14 +321,14 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); - private final UnaryCallable - listEntityTypesCallable; - private final UnaryCallable - listEntityTypesPagedCallable; private final UnaryCallable getEntityTypeCallable; private final UnaryCallable createEntityTypeCallable; private final UnaryCallable updateEntityTypeCallable; private final UnaryCallable deleteEntityTypeCallable; + private final UnaryCallable + listEntityTypesCallable; + private final UnaryCallable + listEntityTypesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -376,18 +376,6 @@ protected HttpJsonEntityTypesStub( throws IOException { this.callableFactory = callableFactory; - HttpJsonCallSettings - listEntityTypesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listEntityTypesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); HttpJsonCallSettings getEntityTypeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) @@ -433,6 +421,18 @@ protected HttpJsonEntityTypesStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -457,12 +457,6 @@ protected HttpJsonEntityTypesStub( }) .build(); - this.listEntityTypesCallable = - callableFactory.createUnaryCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); - this.listEntityTypesPagedCallable = - callableFactory.createPagedCallable( - listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.getEntityTypeCallable = callableFactory.createUnaryCallable( getEntityTypeTransportSettings, settings.getEntityTypeSettings(), clientContext); @@ -475,6 +469,12 @@ protected HttpJsonEntityTypesStub( this.deleteEntityTypeCallable = callableFactory.createUnaryCallable( deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); + this.listEntityTypesCallable = + callableFactory.createUnaryCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.listEntityTypesPagedCallable = + callableFactory.createPagedCallable( + listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -492,27 +492,16 @@ protected HttpJsonEntityTypesStub( @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listEntityTypesMethodDescriptor); methodDescriptors.add(getEntityTypeMethodDescriptor); methodDescriptors.add(createEntityTypeMethodDescriptor); methodDescriptors.add(updateEntityTypeMethodDescriptor); methodDescriptors.add(deleteEntityTypeMethodDescriptor); + methodDescriptors.add(listEntityTypesMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } - @Override - public UnaryCallable listEntityTypesCallable() { - return listEntityTypesCallable; - } - - @Override - public UnaryCallable - listEntityTypesPagedCallable() { - return listEntityTypesPagedCallable; - } - @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -533,6 +522,17 @@ public UnaryCallable deleteEntityTypeCallable() return deleteEntityTypeCallable; } + @Override + public UnaryCallable listEntityTypesCallable() { + return listEntityTypesCallable; + } + + @Override + public UnaryCallable + listEntityTypesPagedCallable() { + return listEntityTypesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java index f958c006b7ec..784e514bd9dd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java @@ -32,6 +32,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest; @@ -40,6 +41,7 @@ import com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -184,6 +186,43 @@ public class HttpJsonSessionsStub extends SessionsStub { .build()) .build(); + private static final ApiMethodDescriptor + submitAnswerFeedbackMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Sessions/SubmitAnswerFeedback") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "session", request.getSession()); + return fields; + }) + .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().clearSession().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AnswerFeedback.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -255,6 +294,8 @@ public class HttpJsonSessionsStub extends SessionsStub { private final UnaryCallable detectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; + private final UnaryCallable + submitAnswerFeedbackCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -337,6 +378,18 @@ protected HttpJsonSessionsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + submitAnswerFeedbackTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(submitAnswerFeedbackMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -370,6 +423,11 @@ protected HttpJsonSessionsStub( this.fulfillIntentCallable = callableFactory.createUnaryCallable( fulfillIntentTransportSettings, settings.fulfillIntentSettings(), clientContext); + this.submitAnswerFeedbackCallable = + callableFactory.createUnaryCallable( + submitAnswerFeedbackTransportSettings, + settings.submitAnswerFeedbackSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -390,6 +448,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(detectIntentMethodDescriptor); methodDescriptors.add(matchIntentMethodDescriptor); methodDescriptors.add(fulfillIntentMethodDescriptor); + methodDescriptors.add(submitAnswerFeedbackMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -410,6 +469,11 @@ public UnaryCallable fulfillIntentC return fulfillIntentCallable; } + @Override + public UnaryCallable submitAnswerFeedbackCallable() { + return submitAnswerFeedbackCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java index 298fa0956cc1..9e6951bcd53c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java @@ -22,6 +22,7 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest; @@ -30,6 +31,7 @@ import com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -63,6 +65,10 @@ public UnaryCallable fulfillIntentC throw new UnsupportedOperationException("Not implemented: fulfillIntentCallable()"); } + public UnaryCallable submitAnswerFeedbackCallable() { + throw new UnsupportedOperationException("Not implemented: submitAnswerFeedbackCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java index da7bda9cffbf..898c9a2afb9d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java @@ -44,6 +44,7 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest; @@ -52,6 +53,7 @@ import com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -117,6 +119,8 @@ public class SessionsStubSettings extends StubSettings { private final UnaryCallSettings matchIntentSettings; private final UnaryCallSettings fulfillIntentSettings; + private final UnaryCallSettings + submitAnswerFeedbackSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -196,6 +200,12 @@ public UnaryCallSettings fulfillInt return fulfillIntentSettings; } + /** Returns the object with the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings + submitAnswerFeedbackSettings() { + return submitAnswerFeedbackSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -315,6 +325,7 @@ protected SessionsStubSettings(Builder settingsBuilder) throws IOException { streamingDetectIntentSettings = settingsBuilder.streamingDetectIntentSettings().build(); matchIntentSettings = settingsBuilder.matchIntentSettings().build(); fulfillIntentSettings = settingsBuilder.fulfillIntentSettings().build(); + submitAnswerFeedbackSettings = settingsBuilder.submitAnswerFeedbackSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -331,6 +342,8 @@ public static class Builder extends StubSettings.Builder fulfillIntentSettings; + private final UnaryCallSettings.Builder + submitAnswerFeedbackSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -401,6 +414,7 @@ protected Builder(ClientContext clientContext) { streamingDetectIntentSettings = StreamingCallSettings.newBuilder(); matchIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); fulfillIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + submitAnswerFeedbackSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -409,6 +423,7 @@ protected Builder(ClientContext clientContext) { detectIntentSettings, matchIntentSettings, fulfillIntentSettings, + submitAnswerFeedbackSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -421,6 +436,7 @@ protected Builder(SessionsStubSettings settings) { streamingDetectIntentSettings = settings.streamingDetectIntentSettings.toBuilder(); matchIntentSettings = settings.matchIntentSettings.toBuilder(); fulfillIntentSettings = settings.fulfillIntentSettings.toBuilder(); + submitAnswerFeedbackSettings = settings.submitAnswerFeedbackSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -429,6 +445,7 @@ protected Builder(SessionsStubSettings settings) { detectIntentSettings, matchIntentSettings, fulfillIntentSettings, + submitAnswerFeedbackSettings, listLocationsSettings, getLocationSettings); } @@ -475,6 +492,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 + .submitAnswerFeedbackSettings() + .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")) @@ -528,6 +550,12 @@ public Builder applyToAllUnaryMethods( return fulfillIntentSettings; } + /** Returns the builder for the settings used for calls to submitAnswerFeedback. */ + public UnaryCallSettings.Builder + submitAnswerFeedbackSettings() { + return submitAnswerFeedbackSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json index c396b0674a7e..351f060a5281 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json @@ -440,6 +440,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Agent$AnswerFeedbackSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Agent$AnswerFeedbackSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.Agent$Builder", "queryAllDeclaredConstructors": true, @@ -521,6 +539,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AnswerFeedback", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AnswerFeedback$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AnswerFeedback$Rating", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AnswerFeedback$RatingReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AnswerFeedback$RatingReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.AudioEncoding", "queryAllDeclaredConstructors": true, @@ -548,6 +611,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BargeInConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BargeInConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest", "queryAllDeclaredConstructors": true, @@ -620,6 +701,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpec$ConditionBoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpec$ConditionBoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpecs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.BoostSpecs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest", "queryAllDeclaredConstructors": true, @@ -2015,6 +2150,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.Flow", "queryAllDeclaredConstructors": true, @@ -4481,6 +4634,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings", "queryAllDeclaredConstructors": true, @@ -4796,6 +4967,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json index 51620c9f334c..87797fe97c64 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json @@ -440,6 +440,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$AnswerFeedbackSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$AnswerFeedbackSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$Builder", "queryAllDeclaredConstructors": true, @@ -521,6 +539,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback$Rating", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback$RatingReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback$RatingReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.AudioEncoding", "queryAllDeclaredConstructors": true, @@ -548,6 +611,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest", "queryAllDeclaredConstructors": true, @@ -620,6 +701,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpec$ConditionBoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpec$ConditionBoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest", "queryAllDeclaredConstructors": true, @@ -2015,6 +2150,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.Flow", "queryAllDeclaredConstructors": true, @@ -4472,6 +4625,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings", "queryAllDeclaredConstructors": true, @@ -4787,6 +4958,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java index 21b124e79f97..1ba872861271 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java @@ -209,6 +209,7 @@ public void getAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -271,6 +272,7 @@ public void getAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -333,6 +335,7 @@ public void createAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -397,6 +400,7 @@ public void createAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -461,6 +465,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -485,6 +490,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -535,6 +541,7 @@ public void updateAgentExceptionTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateAgent(agent, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index 8195d49240af..fd8ea2825811 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java @@ -205,6 +205,7 @@ public void getAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -261,6 +262,7 @@ public void getAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -317,6 +319,7 @@ public void createAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -376,6 +379,7 @@ public void createAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -435,6 +439,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java index ba1617ae00f1..4009db913e41 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java @@ -85,106 +85,6 @@ public void tearDown() throws Exception { mockService.reset(); } - @Test - public void listEntityTypesTest() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - 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 listEntityTypesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEntityTypesTest2() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - 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 listEntityTypesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void getEntityTypeTest() throws Exception { EntityType expectedResponse = @@ -546,6 +446,106 @@ public void deleteEntityTypeExceptionTest2() throws Exception { } } + @Test + public void listEntityTypesTest() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + 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 listEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listEntityTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityTypesTest2() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + 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 listEntityTypesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listEntityTypes(parent); + 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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java index e9ce5d922367..e7e0f508880b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java @@ -91,94 +91,6 @@ public void tearDown() throws Exception { client.close(); } - @Test - public void listEntityTypesTest() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockEntityTypes.addResponse(expectedResponse); - - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEntityTypesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEntityTypesTest2() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockEntityTypes.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEntityTypesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - String parent = "parent-995424086"; - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void getEntityTypeTest() throws Exception { EntityType expectedResponse = @@ -478,6 +390,94 @@ public void deleteEntityTypeExceptionTest2() throws Exception { } } + @Test + public void listEntityTypesTest() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockEntityTypes.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listEntityTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityTypesTest2() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockEntityTypes.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityTypesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEntityTypes(parent); + 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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java index 3401893febd4..133d35d05ddb 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java @@ -59,27 +59,6 @@ public void reset() { responses = new LinkedList<>(); } - @Override - public void listEntityTypes( - ListEntityTypesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListEntityTypesResponse) { - requests.add(request); - responseObserver.onNext(((ListEntityTypesResponse) 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 ListEntityTypes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListEntityTypesResponse.class.getName(), - Exception.class.getName()))); - } - } - @Override public void getEntityType( GetEntityTypeRequest request, StreamObserver responseObserver) { @@ -163,4 +142,25 @@ public void deleteEntityType( Exception.class.getName()))); } } + + @Override + public void listEntityTypes( + ListEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEntityTypesResponse) { + requests.add(request); + responseObserver.onNext(((ListEntityTypesResponse) 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 ListEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEntityTypesResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java index f4a360d15115..80136b76012f 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java @@ -157,4 +157,25 @@ public void fulfillIntent( Exception.class.getName()))); } } + + @Override + public void submitAnswerFeedback( + SubmitAnswerFeedbackRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnswerFeedback) { + requests.add(request); + responseObserver.onNext(((AnswerFeedback) 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 SubmitAnswerFeedback, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnswerFeedback.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java index ff512527b144..173f4cae4afc 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java @@ -35,6 +35,7 @@ import com.google.common.collect.Lists; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -292,6 +293,69 @@ public void fulfillIntentExceptionTest() throws Exception { } } + @Test + public void submitAnswerFeedbackTest() throws Exception { + AnswerFeedback expectedResponse = + AnswerFeedback.newBuilder() + .setRatingReason(AnswerFeedback.RatingReason.newBuilder().build()) + .setCustomRating("customRating341643374") + .build(); + mockService.addResponse(expectedResponse); + + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + AnswerFeedback actualResponse = client.submitAnswerFeedback(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 submitAnswerFeedbackExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.submitAnswerFeedback(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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java index 0f627c890e9c..ec66012aca19 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java @@ -37,6 +37,7 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -342,6 +343,67 @@ public void fulfillIntentExceptionTest() throws Exception { } } + @Test + public void submitAnswerFeedbackTest() throws Exception { + AnswerFeedback expectedResponse = + AnswerFeedback.newBuilder() + .setRatingReason(AnswerFeedback.RatingReason.newBuilder().build()) + .setCustomRating("customRating341643374") + .build(); + mockSessions.addResponse(expectedResponse); + + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + AnswerFeedback actualResponse = client.submitAnswerFeedback(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSessions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SubmitAnswerFeedbackRequest actualRequest = + ((SubmitAnswerFeedbackRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getSession(), actualRequest.getSession()); + Assert.assertEquals(request.getResponseId(), actualRequest.getResponseId()); + Assert.assertEquals(request.getAnswerFeedback(), actualRequest.getAnswerFeedback()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void submitAnswerFeedbackExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSessions.addException(exception); + + try { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.submitAnswerFeedback(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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java index 3a5c85d845ea..e10eec981ae4 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java @@ -209,6 +209,7 @@ public void getAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -271,6 +272,7 @@ public void getAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -333,6 +335,7 @@ public void createAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -397,6 +400,7 @@ public void createAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -461,6 +465,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -485,6 +490,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -535,6 +541,7 @@ public void updateAgentExceptionTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateAgent(agent, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index 14dc52d5451d..3a439d427e50 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -205,6 +205,7 @@ public void getAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -261,6 +262,7 @@ public void getAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -317,6 +319,7 @@ public void createAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -376,6 +379,7 @@ public void createAgentTest2() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -435,6 +439,7 @@ public void updateAgentTest() throws Exception { .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) + .setAnswerFeedbackSettings(Agent.AnswerFeedbackSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java index 88f7c3abfa19..17668d96b242 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java @@ -85,106 +85,6 @@ public void tearDown() throws Exception { mockService.reset(); } - @Test - public void listEntityTypesTest() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - 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 listEntityTypesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEntityTypesTest2() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - 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 listEntityTypesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void getEntityTypeTest() throws Exception { EntityType expectedResponse = @@ -546,6 +446,106 @@ public void deleteEntityTypeExceptionTest2() throws Exception { } } + @Test + public void listEntityTypesTest() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + 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 listEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listEntityTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityTypesTest2() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + 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 listEntityTypesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listEntityTypes(parent); + 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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java index 2aa3de27b59d..8879932838e8 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java @@ -91,94 +91,6 @@ public void tearDown() throws Exception { client.close(); } - @Test - public void listEntityTypesTest() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockEntityTypes.addResponse(expectedResponse); - - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEntityTypesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEntityTypesTest2() throws Exception { - EntityType responsesElement = EntityType.newBuilder().build(); - ListEntityTypesResponse expectedResponse = - ListEntityTypesResponse.newBuilder() - .setNextPageToken("") - .addAllEntityTypes(Arrays.asList(responsesElement)) - .build(); - mockEntityTypes.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEntityTypesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - String parent = "parent-995424086"; - client.listEntityTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void getEntityTypeTest() throws Exception { EntityType expectedResponse = @@ -478,6 +390,94 @@ public void deleteEntityTypeExceptionTest2() throws Exception { } } + @Test + public void listEntityTypesTest() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockEntityTypes.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listEntityTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityTypesTest2() throws Exception { + EntityType responsesElement = EntityType.newBuilder().build(); + ListEntityTypesResponse expectedResponse = + ListEntityTypesResponse.newBuilder() + .setNextPageToken("") + .addAllEntityTypes(Arrays.asList(responsesElement)) + .build(); + mockEntityTypes.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntityTypesList().get(0), resources.get(0)); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityTypesRequest actualRequest = ((ListEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityTypesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEntityTypes(parent); + 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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java index a4e405202a9c..6a4e591b4879 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java @@ -59,27 +59,6 @@ public void reset() { responses = new LinkedList<>(); } - @Override - public void listEntityTypes( - ListEntityTypesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListEntityTypesResponse) { - requests.add(request); - responseObserver.onNext(((ListEntityTypesResponse) 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 ListEntityTypes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListEntityTypesResponse.class.getName(), - Exception.class.getName()))); - } - } - @Override public void getEntityType( GetEntityTypeRequest request, StreamObserver responseObserver) { @@ -163,4 +142,25 @@ public void deleteEntityType( Exception.class.getName()))); } } + + @Override + public void listEntityTypes( + ListEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEntityTypesResponse) { + requests.add(request); + responseObserver.onNext(((ListEntityTypesResponse) 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 ListEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEntityTypesResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java index a1c9e9e60e51..0d9fcbe825f1 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java @@ -157,4 +157,25 @@ public void fulfillIntent( Exception.class.getName()))); } } + + @Override + public void submitAnswerFeedback( + SubmitAnswerFeedbackRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnswerFeedback) { + requests.add(request); + responseObserver.onNext(((AnswerFeedback) 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 SubmitAnswerFeedback, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnswerFeedback.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java index 148038930696..1dba2a786528 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java @@ -35,6 +35,7 @@ import com.google.common.collect.Lists; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -292,6 +293,69 @@ public void fulfillIntentExceptionTest() throws Exception { } } + @Test + public void submitAnswerFeedbackTest() throws Exception { + AnswerFeedback expectedResponse = + AnswerFeedback.newBuilder() + .setRatingReason(AnswerFeedback.RatingReason.newBuilder().build()) + .setCustomRating("customRating341643374") + .build(); + mockService.addResponse(expectedResponse); + + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + AnswerFeedback actualResponse = client.submitAnswerFeedback(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 submitAnswerFeedbackExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.submitAnswerFeedback(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-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java index 0711de81fc69..6136c8711609 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java @@ -37,6 +37,7 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -342,6 +343,67 @@ public void fulfillIntentExceptionTest() throws Exception { } } + @Test + public void submitAnswerFeedbackTest() throws Exception { + AnswerFeedback expectedResponse = + AnswerFeedback.newBuilder() + .setRatingReason(AnswerFeedback.RatingReason.newBuilder().build()) + .setCustomRating("customRating341643374") + .build(); + mockSessions.addResponse(expectedResponse); + + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + AnswerFeedback actualResponse = client.submitAnswerFeedback(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSessions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SubmitAnswerFeedbackRequest actualRequest = + ((SubmitAnswerFeedbackRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getSession(), actualRequest.getSession()); + Assert.assertEquals(request.getResponseId(), actualRequest.getResponseId()); + Assert.assertEquals(request.getAnswerFeedback(), actualRequest.getAnswerFeedback()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void submitAnswerFeedbackExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSessions.addException(exception); + + try { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.submitAnswerFeedback(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-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java index 7a30c767a6ce..60d325e2b08e 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java @@ -35,53 +35,6 @@ private EntityTypesGrpc() {} public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.EntityTypes"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> - getListEntityTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListEntityTypes", - requestType = com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> - getListEntityTypesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> - getListEntityTypesMethod; - if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { - synchronized (EntityTypesGrpc.class) { - if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { - EntityTypesGrpc.getListEntityTypesMethod = - getListEntityTypesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntityTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new EntityTypesMethodDescriptorSupplier("ListEntityTypes")) - .build(); - } - } - } - return getListEntityTypesMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, com.google.cloud.dialogflow.cx.v3.EntityType> @@ -262,6 +215,53 @@ private EntityTypesGrpc() {} return getDeleteEntityTypeMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> + getListEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> + getListEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> + getListEntityTypesMethod; + if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { + EntityTypesGrpc.getListEntityTypesMethod = + getListEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ListEntityTypes")) + .build(); + } + } + } + return getListEntityTypesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EntityTypesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -311,21 +311,6 @@ public EntityTypesFutureStub newStub( */ public interface AsyncService { - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - default void listEntityTypes( - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListEntityTypesMethod(), responseObserver); - } - /** * * @@ -393,6 +378,21 @@ default void deleteEntityType( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteEntityTypeMethod(), responseObserver); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + default void listEntityTypes( + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEntityTypesMethod(), responseObserver); + } } /** @@ -429,23 +429,6 @@ protected EntityTypesStub build(io.grpc.Channel channel, io.grpc.CallOptions cal return new EntityTypesStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public void listEntityTypes( - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -521,6 +504,23 @@ public void deleteEntityType( request, responseObserver); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public void listEntityTypes( + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -542,19 +542,6 @@ protected EntityTypesBlockingStub build( return new EntityTypesBlockingStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse listEntityTypes( - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEntityTypesMethod(), getCallOptions(), request); - } - /** * * @@ -615,6 +602,19 @@ public com.google.protobuf.Empty deleteEntityType( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteEntityTypeMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse listEntityTypes( + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEntityTypesMethod(), getCallOptions(), request); + } } /** @@ -636,20 +636,6 @@ protected EntityTypesFutureStub build( return new EntityTypesFutureStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> - listEntityTypes(com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); - } - /** * * @@ -713,13 +699,27 @@ protected EntityTypesFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteEntityTypeMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse> + listEntityTypes(com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); + } } - private static final int METHODID_LIST_ENTITY_TYPES = 0; - private static final int METHODID_GET_ENTITY_TYPE = 1; - private static final int METHODID_CREATE_ENTITY_TYPE = 2; - private static final int METHODID_UPDATE_ENTITY_TYPE = 3; - private static final int METHODID_DELETE_ENTITY_TYPE = 4; + private static final int METHODID_GET_ENTITY_TYPE = 0; + private static final int METHODID_CREATE_ENTITY_TYPE = 1; + private static final int METHODID_UPDATE_ENTITY_TYPE = 2; + private static final int METHODID_DELETE_ENTITY_TYPE = 3; + private static final int METHODID_LIST_ENTITY_TYPES = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -738,13 +738,6 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { - case METHODID_LIST_ENTITY_TYPES: - serviceImpl.listEntityTypes( - (com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>) - responseObserver); - break; case METHODID_GET_ENTITY_TYPE: serviceImpl.getEntityType( (com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest) request, @@ -768,6 +761,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_ENTITY_TYPES: + serviceImpl.listEntityTypes( + (com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -786,13 +786,6 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListEntityTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>( - service, METHODID_LIST_ENTITY_TYPES))) .addMethod( getGetEntityTypeMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -820,6 +813,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, com.google.protobuf.Empty>(service, METHODID_DELETE_ENTITY_TYPE))) + .addMethod( + getListEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>( + service, METHODID_LIST_ENTITY_TYPES))) .build(); } @@ -871,11 +871,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EntityTypesFileDescriptorSupplier()) - .addMethod(getListEntityTypesMethod()) .addMethod(getGetEntityTypeMethod()) .addMethod(getCreateEntityTypeMethod()) .addMethod(getUpdateEntityTypeMethod()) .addMethod(getDeleteEntityTypeMethod()) + .addMethod(getListEntityTypesMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java index e7d73a1f2678..d9cdad771bf3 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java @@ -225,6 +225,54 @@ private SessionsGrpc() {} return getFulfillIntentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback> + getSubmitAnswerFeedbackMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SubmitAnswerFeedback", + requestType = com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.AnswerFeedback.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback> + getSubmitAnswerFeedbackMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback> + getSubmitAnswerFeedbackMethod; + if ((getSubmitAnswerFeedbackMethod = SessionsGrpc.getSubmitAnswerFeedbackMethod) == null) { + synchronized (SessionsGrpc.class) { + if ((getSubmitAnswerFeedbackMethod = SessionsGrpc.getSubmitAnswerFeedbackMethod) == null) { + SessionsGrpc.getSubmitAnswerFeedbackMethod = + getSubmitAnswerFeedbackMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SubmitAnswerFeedback")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback + .getDefaultInstance())) + .setSchemaDescriptor( + new SessionsMethodDescriptorSupplier("SubmitAnswerFeedback")) + .build(); + } + } + } + return getSubmitAnswerFeedbackMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static SessionsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -356,6 +404,22 @@ default void fulfillIntent( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getFulfillIntentMethod(), responseObserver); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + default void submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSubmitAnswerFeedbackMethod(), responseObserver); + } } /** @@ -482,6 +546,24 @@ public void fulfillIntent( request, responseObserver); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public void submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSubmitAnswerFeedbackMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -556,6 +638,20 @@ public com.google.cloud.dialogflow.cx.v3.FulfillIntentResponse fulfillIntent( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFulfillIntentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSubmitAnswerFeedbackMethod(), getCallOptions(), request); + } } /** @@ -633,12 +729,29 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFulfillIntentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback> + submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSubmitAnswerFeedbackMethod(), getCallOptions()), request); + } } private static final int METHODID_DETECT_INTENT = 0; private static final int METHODID_MATCH_INTENT = 1; private static final int METHODID_FULFILL_INTENT = 2; - private static final int METHODID_STREAMING_DETECT_INTENT = 3; + private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 3; + private static final int METHODID_STREAMING_DETECT_INTENT = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -675,6 +788,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_SUBMIT_ANSWER_FEEDBACK: + serviceImpl.submitAnswerFeedback( + (com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -727,6 +846,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3.FulfillIntentRequest, com.google.cloud.dialogflow.cx.v3.FulfillIntentResponse>( service, METHODID_FULFILL_INTENT))) + .addMethod( + getSubmitAnswerFeedbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback>( + service, METHODID_SUBMIT_ANSWER_FEEDBACK))) .build(); } @@ -780,6 +906,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getStreamingDetectIntentMethod()) .addMethod(getMatchIntentMethod()) .addMethod(getFulfillIntentMethod()) + .addMethod(getSubmitAnswerFeedbackMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java index f2906c9516a7..bf4de82fc375 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java @@ -37,53 +37,6 @@ private EntityTypesGrpc() {} "google.cloud.dialogflow.cx.v3beta1.EntityTypes"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> - getListEntityTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListEntityTypes", - requestType = com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> - getListEntityTypesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> - getListEntityTypesMethod; - if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { - synchronized (EntityTypesGrpc.class) { - if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { - EntityTypesGrpc.getListEntityTypesMethod = - getListEntityTypesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntityTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new EntityTypesMethodDescriptorSupplier("ListEntityTypes")) - .build(); - } - } - } - return getListEntityTypesMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, com.google.cloud.dialogflow.cx.v3beta1.EntityType> @@ -268,6 +221,53 @@ private EntityTypesGrpc() {} return getDeleteEntityTypeMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> + getListEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> + getListEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> + getListEntityTypesMethod; + if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getListEntityTypesMethod = EntityTypesGrpc.getListEntityTypesMethod) == null) { + EntityTypesGrpc.getListEntityTypesMethod = + getListEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ListEntityTypes")) + .build(); + } + } + } + return getListEntityTypesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EntityTypesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -318,21 +318,6 @@ public EntityTypesFutureStub newStub( */ public interface AsyncService { - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - default void listEntityTypes( - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListEntityTypesMethod(), responseObserver); - } - /** * * @@ -397,6 +382,21 @@ default void deleteEntityType( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteEntityTypeMethod(), responseObserver); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + default void listEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEntityTypesMethod(), responseObserver); + } } /** @@ -435,23 +435,6 @@ protected EntityTypesStub build(io.grpc.Channel channel, io.grpc.CallOptions cal return new EntityTypesStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public void listEntityTypes( - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -524,6 +507,23 @@ public void deleteEntityType( request, responseObserver); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public void listEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -546,19 +546,6 @@ protected EntityTypesBlockingStub build( return new EntityTypesBlockingStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse listEntityTypes( - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEntityTypesMethod(), getCallOptions(), request); - } - /** * * @@ -616,6 +603,19 @@ public com.google.protobuf.Empty deleteEntityType( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteEntityTypeMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse listEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEntityTypesMethod(), getCallOptions(), request); + } } /** @@ -638,20 +638,6 @@ protected EntityTypesFutureStub build( return new EntityTypesFutureStub(channel, callOptions); } - /** - * - * - *
-     * Returns the list of all entity types in the specified agent.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> - listEntityTypes(com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); - } - /** * * @@ -712,13 +698,27 @@ protected EntityTypesFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteEntityTypeMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Returns the list of all entity types in the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse> + listEntityTypes(com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); + } } - private static final int METHODID_LIST_ENTITY_TYPES = 0; - private static final int METHODID_GET_ENTITY_TYPE = 1; - private static final int METHODID_CREATE_ENTITY_TYPE = 2; - private static final int METHODID_UPDATE_ENTITY_TYPE = 3; - private static final int METHODID_DELETE_ENTITY_TYPE = 4; + private static final int METHODID_GET_ENTITY_TYPE = 0; + private static final int METHODID_CREATE_ENTITY_TYPE = 1; + private static final int METHODID_UPDATE_ENTITY_TYPE = 2; + private static final int METHODID_DELETE_ENTITY_TYPE = 3; + private static final int METHODID_LIST_ENTITY_TYPES = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -737,13 +737,6 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { - case METHODID_LIST_ENTITY_TYPES: - serviceImpl.listEntityTypes( - (com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>) - responseObserver); - break; case METHODID_GET_ENTITY_TYPE: serviceImpl.getEntityType( (com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest) request, @@ -767,6 +760,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_ENTITY_TYPES: + serviceImpl.listEntityTypes( + (com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -785,13 +785,6 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListEntityTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>( - service, METHODID_LIST_ENTITY_TYPES))) .addMethod( getGetEntityTypeMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -819,6 +812,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, com.google.protobuf.Empty>(service, METHODID_DELETE_ENTITY_TYPE))) + .addMethod( + getListEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>( + service, METHODID_LIST_ENTITY_TYPES))) .build(); } @@ -870,11 +870,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EntityTypesFileDescriptorSupplier()) - .addMethod(getListEntityTypesMethod()) .addMethod(getGetEntityTypeMethod()) .addMethod(getCreateEntityTypeMethod()) .addMethod(getUpdateEntityTypeMethod()) .addMethod(getDeleteEntityTypeMethod()) + .addMethod(getListEntityTypesMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java index 4436ffe7f41d..cc7a66c6e42a 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java @@ -225,6 +225,54 @@ private SessionsGrpc() {} return getFulfillIntentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback> + getSubmitAnswerFeedbackMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SubmitAnswerFeedback", + requestType = com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback> + getSubmitAnswerFeedbackMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback> + getSubmitAnswerFeedbackMethod; + if ((getSubmitAnswerFeedbackMethod = SessionsGrpc.getSubmitAnswerFeedbackMethod) == null) { + synchronized (SessionsGrpc.class) { + if ((getSubmitAnswerFeedbackMethod = SessionsGrpc.getSubmitAnswerFeedbackMethod) == null) { + SessionsGrpc.getSubmitAnswerFeedbackMethod = + getSubmitAnswerFeedbackMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SubmitAnswerFeedback")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + .getDefaultInstance())) + .setSchemaDescriptor( + new SessionsMethodDescriptorSupplier("SubmitAnswerFeedback")) + .build(); + } + } + } + return getSubmitAnswerFeedbackMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static SessionsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -356,6 +404,22 @@ default void fulfillIntent( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getFulfillIntentMethod(), responseObserver); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + default void submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSubmitAnswerFeedbackMethod(), responseObserver); + } } /** @@ -482,6 +546,24 @@ public void fulfillIntent( request, responseObserver); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public void submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSubmitAnswerFeedbackMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -556,6 +638,20 @@ public com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse fulfillInten return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFulfillIntentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSubmitAnswerFeedbackMethod(), getCallOptions(), request); + } } /** @@ -633,12 +729,29 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFulfillIntentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Updates the feedback received from the user for a single turn of the bot
+     * response.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback> + submitAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSubmitAnswerFeedbackMethod(), getCallOptions()), request); + } } private static final int METHODID_DETECT_INTENT = 0; private static final int METHODID_MATCH_INTENT = 1; private static final int METHODID_FULFILL_INTENT = 2; - private static final int METHODID_STREAMING_DETECT_INTENT = 3; + private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 3; + private static final int METHODID_STREAMING_DETECT_INTENT = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -678,6 +791,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse>) responseObserver); break; + case METHODID_SUBMIT_ANSWER_FEEDBACK: + serviceImpl.submitAnswerFeedback( + (com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -730,6 +849,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest, com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse>( service, METHODID_FULFILL_INTENT))) + .addMethod( + getSubmitAnswerFeedbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback>( + service, METHODID_SUBMIT_ANSWER_FEEDBACK))) .build(); } @@ -783,6 +909,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getStreamingDetectIntentMethod()) .addMethod(getMatchIntentMethod()) .addMethod(getFulfillIntentMethod()) + .addMethod(getSubmitAnswerFeedbackMethod()) .build(); } } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java index 2cc096c1174c..30afc2863b72 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java @@ -3305,6 +3305,568 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface AnswerFeedbackSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. If enabled, end users will be able to provide
+     * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to
+     * Dialogflow responses. Feature works only if interaction logging is
+     * enabled in the Dialogflow agent.
+     * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + boolean getEnableAnswerFeedback(); + } + /** + * + * + *
+   * Settings for answer feedback collection.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} + */ + public static final class AnswerFeedbackSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) + AnswerFeedbackSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerFeedbackSettings.newBuilder() to construct. + private AnswerFeedbackSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerFeedbackSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerFeedbackSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.class, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder.class); + } + + public static final int ENABLE_ANSWER_FEEDBACK_FIELD_NUMBER = 1; + private boolean enableAnswerFeedback_ = false; + /** + * + * + *
+     * Optional. If enabled, end users will be able to provide
+     * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to
+     * Dialogflow responses. Feature works only if interaction logging is
+     * enabled in the Dialogflow agent.
+     * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + @java.lang.Override + public boolean getEnableAnswerFeedback() { + return enableAnswerFeedback_; + } + + 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 (enableAnswerFeedback_ != false) { + output.writeBool(1, enableAnswerFeedback_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableAnswerFeedback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableAnswerFeedback_); + } + 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.cx.v3.Agent.AnswerFeedbackSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings other = + (com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) obj; + + if (getEnableAnswerFeedback() != other.getEnableAnswerFeedback()) 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) + ENABLE_ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAnswerFeedback()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings 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; + } + /** + * + * + *
+     * Settings for answer feedback collection.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.class, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableAnswerFeedback_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings build() { + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings result = + new com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableAnswerFeedback_ = enableAnswerFeedback_; + } + } + + @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.cx.v3.Agent.AnswerFeedbackSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance()) + return this; + if (other.getEnableAnswerFeedback() != false) { + setEnableAnswerFeedback(other.getEnableAnswerFeedback()); + } + 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: + { + enableAnswerFeedback_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 enableAnswerFeedback_; + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + @java.lang.Override + public boolean getEnableAnswerFeedback() { + return enableAnswerFeedback_; + } + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableAnswerFeedback to set. + * @return This builder for chaining. + */ + public Builder setEnableAnswerFeedback(boolean value) { + + enableAnswerFeedback_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00000001); + enableAnswerFeedback_ = false; + 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.cx.v3.Agent.AnswerFeedbackSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) + private static final com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerFeedbackSettings 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.cx.v3.Agent.AnswerFeedbackSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -3904,7 +4466,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=314 + * google/cloud/dialogflow/cx/v3/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -4174,6 +4736,64 @@ public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings getGenAppBu : genAppBuilderSettings_; } + public static final int ANSWER_FEEDBACK_SETTINGS_FIELD_NUMBER = 38; + private com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answerFeedbackSettings_; + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + @java.lang.Override + public boolean hasAnswerFeedbackSettings() { + return answerFeedbackSettings_ != null; + } + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + getAnswerFeedbackSettings() { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder() { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4240,6 +4860,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(33, getGenAppBuilderSettings()); } + if (answerFeedbackSettings_ != null) { + output.writeMessage(38, getAnswerFeedbackSettings()); + } getUnknownFields().writeTo(output); } @@ -4309,6 +4932,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, getGenAppBuilderSettings()); } + if (answerFeedbackSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAnswerFeedbackSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4357,6 +4984,10 @@ public boolean equals(final java.lang.Object obj) { if (hasGenAppBuilderSettings()) { if (!getGenAppBuilderSettings().equals(other.getGenAppBuilderSettings())) return false; } + if (hasAnswerFeedbackSettings() != other.hasAnswerFeedbackSettings()) return false; + if (hasAnswerFeedbackSettings()) { + if (!getAnswerFeedbackSettings().equals(other.getAnswerFeedbackSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4414,6 +5045,10 @@ public int hashCode() { hash = (37 * hash) + GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getGenAppBuilderSettings().hashCode(); } + if (hasAnswerFeedbackSettings()) { + hash = (37 * hash) + ANSWER_FEEDBACK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAnswerFeedbackSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4571,6 +5206,7 @@ private void maybeForceBuilderInitialization() { getGitIntegrationSettingsFieldBuilder(); getTextToSpeechSettingsFieldBuilder(); getGenAppBuilderSettingsFieldBuilder(); + getAnswerFeedbackSettingsFieldBuilder(); } } @@ -4615,6 +5251,11 @@ public Builder clear() { genAppBuilderSettingsBuilder_.dispose(); genAppBuilderSettingsBuilder_ = null; } + answerFeedbackSettings_ = null; + if (answerFeedbackSettingsBuilder_ != null) { + answerFeedbackSettingsBuilder_.dispose(); + answerFeedbackSettingsBuilder_ = null; + } return this; } @@ -4718,6 +5359,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Agent result) { : genAppBuilderSettingsBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.answerFeedbackSettings_ = + answerFeedbackSettingsBuilder_ == null + ? answerFeedbackSettings_ + : answerFeedbackSettingsBuilder_.build(); + } result.bitField0_ |= to_bitField0_; } @@ -4840,6 +5487,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { if (other.hasGenAppBuilderSettings()) { mergeGenAppBuilderSettings(other.getGenAppBuilderSettings()); } + if (other.hasAnswerFeedbackSettings()) { + mergeAnswerFeedbackSettings(other.getAnswerFeedbackSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4974,6 +5624,13 @@ public Builder mergeFrom( bitField0_ |= 0x00010000; break; } // case 266 + case 306: + { + input.readMessage( + getAnswerFeedbackSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 306 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6377,7 +7034,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=314 + * google/cloud/dialogflow/cx/v3/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -6398,7 +7055,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=314 + * google/cloud/dialogflow/cx/v3/agent.proto;l=323 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -6423,7 +7080,7 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=314 + * google/cloud/dialogflow/cx/v3/agent.proto;l=323 * @return This builder for chaining. */ @java.lang.Deprecated @@ -7366,6 +8023,215 @@ public Builder clearGenAppBuilderSettings() { return genAppBuilderSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answerFeedbackSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder> + answerFeedbackSettingsBuilder_; + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + public boolean hasAnswerFeedbackSettings() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + getAnswerFeedbackSettings() { + if (answerFeedbackSettingsBuilder_ == null) { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } else { + return answerFeedbackSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings value) { + if (answerFeedbackSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answerFeedbackSettings_ = value; + } else { + answerFeedbackSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder builderForValue) { + if (answerFeedbackSettingsBuilder_ == null) { + answerFeedbackSettings_ = builderForValue.build(); + } else { + answerFeedbackSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings value) { + if (answerFeedbackSettingsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && answerFeedbackSettings_ != null + && answerFeedbackSettings_ + != com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + .getDefaultInstance()) { + getAnswerFeedbackSettingsBuilder().mergeFrom(value); + } else { + answerFeedbackSettings_ = value; + } + } else { + answerFeedbackSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAnswerFeedbackSettings() { + bitField0_ = (bitField0_ & ~0x00020000); + answerFeedbackSettings_ = null; + if (answerFeedbackSettingsBuilder_ != null) { + answerFeedbackSettingsBuilder_.dispose(); + answerFeedbackSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder + getAnswerFeedbackSettingsBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getAnswerFeedbackSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder() { + if (answerFeedbackSettingsBuilder_ != null) { + return answerFeedbackSettingsBuilder_.getMessageOrBuilder(); + } else { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder> + getAnswerFeedbackSettingsFieldBuilder() { + if (answerFeedbackSettingsBuilder_ == null) { + answerFeedbackSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder>( + getAnswerFeedbackSettings(), getParentForChildren(), isClean()); + answerFeedbackSettings_ = null; + } + return answerFeedbackSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java index 49f12a4093fb..970c210b4dfd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java @@ -383,7 +383,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=314 + * google/cloud/dialogflow/cx/v3/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -577,4 +577,46 @@ public interface AgentOrBuilder */ com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder getGenAppBuilderSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + boolean hasAnswerFeedbackSettings(); + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings getAnswerFeedbackSettings(); + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java index bcbf277c453c..9e3f0c0b547b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_Agent_GenAppBuilderSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Agent_GenAppBuilderSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -134,7 +138,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rotobuf/empty.proto\032 google/protobuf/fie" + "ld_mask.proto\032\034google/protobuf/struct.pr" + "oto\"8\n\024SpeechToTextSettings\022 \n\030enable_sp" - + "eech_adaptation\030\001 \001(\010\"\224\n\n\005Agent\022\014\n\004name\030" + + "eech_adaptation\030\001 \001(\010\"\271\013\n\005Agent\022\014\n\004name\030" + "\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022$\n\025def" + "ault_language_code\030\003 \001(\tB\005\342A\002\002\005\022 \n\030suppo" + "rted_language_codes\030\004 \003(\t\022\027\n\ttime_zone\030\005" @@ -155,144 +159,149 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "s\030\037 \001(\01323.google.cloud.dialogflow.cx.v3." + "TextToSpeechSettings\022a\n\030gen_app_builder_" + "settings\030! \001(\0132:.google.cloud.dialogflow" - + ".cx.v3.Agent.GenAppBuilderSettingsH\000\210\001\001\032" - + "\220\002\n\026GitIntegrationSettings\022e\n\017github_set" - + "tings\030\001 \001(\0132J.google.cloud.dialogflow.cx" - + ".v3.Agent.GitIntegrationSettings.GithubS" - + "ettingsH\000\032\177\n\016GithubSettings\022\024\n\014display_n" - + "ame\030\001 \001(\t\022\026\n\016repository_uri\030\002 \001(\t\022\027\n\017tra" - + "cking_branch\030\003 \001(\t\022\024\n\014access_token\030\004 \001(\t" - + "\022\020\n\010branches\030\005 \003(\tB\016\n\014git_settings\032-\n\025Ge" - + "nAppBuilderSettings\022\024\n\006engine\030\001 \001(\tB\004\342A\001" - + "\002:\\\352AY\n\037dialogflow.googleapis.com/Agent\022" - + "6projects/{project}/locations/{location}" - + "/agents/{agent}B\033\n\031_gen_app_builder_sett" - + "ings\"t\n\021ListAgentsRequest\0228\n\006parent\030\001 \001(" - + "\tB(\342A\001\002\372A!\022\037dialogflow.googleapis.com/Ag" - + "ent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\"c\n\022ListAgentsResponse\0224\n\006agents\030\001 \003(\013" - + "2$.google.cloud.dialogflow.cx.v3.Agent\022\027" - + "\n\017next_page_token\030\002 \001(\t\"I\n\017GetAgentReque" - + "st\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.go" - + "ogleapis.com/Agent\"\211\001\n\022CreateAgentReques" - + "t\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogflow.g" - + "oogleapis.com/Agent\0229\n\005agent\030\002 \001(\0132$.goo" - + "gle.cloud.dialogflow.cx.v3.AgentB\004\342A\001\002\"\200" - + "\001\n\022UpdateAgentRequest\0229\n\005agent\030\001 \001(\0132$.g" - + "oogle.cloud.dialogflow.cx.v3.AgentB\004\342A\001\002" - + "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." - + "FieldMask\"L\n\022DeleteAgentRequest\0226\n\004name\030" - + "\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleapis.co" - + "m/Agent\"\236\004\n\022ExportAgentRequest\0226\n\004name\030\001" - + " \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleapis.com" - + "/Agent\022\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022W\n\013data_" - + "format\030\003 \001(\0162<.google.cloud.dialogflow.c" - + "x.v3.ExportAgentRequest.DataFormatB\004\342A\001\001" - + "\022C\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'\n%dialogfl" - + "ow.googleapis.com/Environment\022_\n\017git_des" - + "tination\030\006 \001(\0132@.google.cloud.dialogflow" - + ".cx.v3.ExportAgentRequest.GitDestination" - + "B\004\342A\001\001\022.\n include_bigquery_export_settin" - + "gs\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDestination\022\027\n\017trac" - + "king_branch\030\001 \001(\t\022\026\n\016commit_message\030\002 \001(" - + "\t\"E\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFI" - + "ED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n\023Expo" - + "rtAgentResponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\r" - + "agent_content\030\002 \001(\014H\000\022\024\n\ncommit_sha\030\003 \001(" - + "\tH\000B\007\n\005agent\"\241\003\n\023RestoreAgentRequest\0226\n\004" + + ".cx.v3.Agent.GenAppBuilderSettingsH\000\210\001\001\022" + + "c\n\030answer_feedback_settings\030& \001(\0132;.goog" + + "le.cloud.dialogflow.cx.v3.Agent.AnswerFe" + + "edbackSettingsB\004\342A\001\001\032\220\002\n\026GitIntegrationS" + + "ettings\022e\n\017github_settings\030\001 \001(\0132J.googl" + + "e.cloud.dialogflow.cx.v3.Agent.GitIntegr" + + "ationSettings.GithubSettingsH\000\032\177\n\016Github" + + "Settings\022\024\n\014display_name\030\001 \001(\t\022\026\n\016reposi" + + "tory_uri\030\002 \001(\t\022\027\n\017tracking_branch\030\003 \001(\t\022" + + "\024\n\014access_token\030\004 \001(\t\022\020\n\010branches\030\005 \003(\tB" + + "\016\n\014git_settings\032-\n\025GenAppBuilderSettings" + + "\022\024\n\006engine\030\001 \001(\tB\004\342A\001\002\032>\n\026AnswerFeedback" + + "Settings\022$\n\026enable_answer_feedback\030\001 \001(\010" + + "B\004\342A\001\001:\\\352AY\n\037dialogflow.googleapis.com/A" + + "gent\0226projects/{project}/locations/{loca" + + "tion}/agents/{agent}B\033\n\031_gen_app_builder" + + "_settings\"t\n\021ListAgentsRequest\0228\n\006parent" + + "\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogflow.googleapis.c" + + "om/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\"c\n\022ListAgentsResponse\0224\n\006agents\030" + + "\001 \003(\0132$.google.cloud.dialogflow.cx.v3.Ag" + + "ent\022\027\n\017next_page_token\030\002 \001(\t\"I\n\017GetAgent" + + "Request\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogfl" + + "ow.googleapis.com/Agent\"\211\001\n\022CreateAgentR" + + "equest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogf" + + "low.googleapis.com/Agent\0229\n\005agent\030\002 \001(\0132" + + "$.google.cloud.dialogflow.cx.v3.AgentB\004\342" + + "A\001\002\"\200\001\n\022UpdateAgentRequest\0229\n\005agent\030\001 \001(" + + "\0132$.google.cloud.dialogflow.cx.v3.AgentB" + + "\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMask\"L\n\022DeleteAgentRequest\0226\n\004" + "name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleap" - + "is.com/Agent\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\rage" - + "nt_content\030\003 \001(\014H\000\022R\n\ngit_source\030\006 \001(\0132<" - + ".google.cloud.dialogflow.cx.v3.RestoreAg" - + "entRequest.GitSourceH\000\022X\n\016restore_option" - + "\030\005 \001(\0162@.google.cloud.dialogflow.cx.v3.R" - + "estoreAgentRequest.RestoreOption\032$\n\tGitS" - + "ource\022\027\n\017tracking_branch\030\001 \001(\t\"G\n\rRestor" - + "eOption\022\036\n\032RESTORE_OPTION_UNSPECIFIED\020\000\022" - + "\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"e\n\024Vali" - + "dateAgentRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n" - + "\037dialogflow.googleapis.com/Agent\022\025\n\rlang" - + "uage_code\030\002 \001(\t\"\200\001\n\037GetAgentValidationRe" - + "sultRequest\022F\n\004name\030\001 \001(\tB8\342A\001\002\372A1\n/dial" - + "ogflow.googleapis.com/AgentValidationRes" - + "ult\022\025\n\rlanguage_code\030\002 \001(\t\"\372\001\n\025AgentVali" - + "dationResult\022\014\n\004name\030\001 \001(\t\022T\n\027flow_valid" - + "ation_results\030\002 \003(\01323.google.cloud.dialo" - + "gflow.cx.v3.FlowValidationResult:}\352Az\n/d" - + "ialogflow.googleapis.com/AgentValidation" - + "Result\022Gprojects/{project}/locations/{lo" - + "cation}/agents/{agent}/validationResult\"" - + "\205\001\n\034GetGenerativeSettingsRequest\022H\n\004name" - + "\030\001 \001(\tB:\342A\001\002\372A3\n1dialogflow.googleapis.c" - + "om/AgentGenerativeSettings\022\033\n\rlanguage_c" - + "ode\030\002 \001(\tB\004\342A\001\002\"\256\001\n\037UpdateGenerativeSett" - + "ingsRequest\022T\n\023generative_settings\030\001 \001(\013" - + "21.google.cloud.dialogflow.cx.v3.Generat" - + "iveSettingsB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032" - + ".google.protobuf.FieldMaskB\004\342A\001\0012\242\022\n\006Age" - + "nts\022\256\001\n\nListAgents\0220.google.cloud.dialog" - + "flow.cx.v3.ListAgentsRequest\0321.google.cl" - + "oud.dialogflow.cx.v3.ListAgentsResponse\"" - + ";\332A\006parent\202\323\344\223\002,\022*/v3/{parent=projects/*" - + "/locations/*}/agents\022\233\001\n\010GetAgent\022..goog" - + "le.cloud.dialogflow.cx.v3.GetAgentReques" - + "t\032$.google.cloud.dialogflow.cx.v3.Agent\"" - + "9\332A\004name\202\323\344\223\002,\022*/v3/{name=projects/*/loc" - + "ations/*/agents/*}\022\260\001\n\013CreateAgent\0221.goo" - + "gle.cloud.dialogflow.cx.v3.CreateAgentRe" - + "quest\032$.google.cloud.dialogflow.cx.v3.Ag" - + "ent\"H\332A\014parent,agent\202\323\344\223\0023\"*/v3/{parent=" - + "projects/*/locations/*}/agents:\005agent\022\273\001" - + "\n\013UpdateAgent\0221.google.cloud.dialogflow." - + "cx.v3.UpdateAgentRequest\032$.google.cloud." - + "dialogflow.cx.v3.Agent\"S\332A\021agent,update_" - + "mask\202\323\344\223\002920/v3/{agent.name=projects/*/l" - + "ocations/*/agents/*}:\005agent\022\223\001\n\013DeleteAg" - + "ent\0221.google.cloud.dialogflow.cx.v3.Dele" - + "teAgentRequest\032\026.google.protobuf.Empty\"9" - + "\332A\004name\202\323\344\223\002,**/v3/{name=projects/*/loca" - + "tions/*/agents/*}\022\315\001\n\013ExportAgent\0221.goog" - + "le.cloud.dialogflow.cx.v3.ExportAgentReq" - + "uest\032\035.google.longrunning.Operation\"l\312A-" - + "\n\023ExportAgentResponse\022\026google.protobuf.S" - + "truct\202\323\344\223\0026\"1/v3/{name=projects/*/locati" - + "ons/*/agents/*}:export:\001*\022\322\001\n\014RestoreAge" - + "nt\0222.google.cloud.dialogflow.cx.v3.Resto" - + "reAgentRequest\032\035.google.longrunning.Oper" - + "ation\"o\312A/\n\025google.protobuf.Empty\022\026googl" - + "e.protobuf.Struct\202\323\344\223\0027\"2/v3/{name=proje" - + "cts/*/locations/*/agents/*}:restore:\001*\022\272" - + "\001\n\rValidateAgent\0223.google.cloud.dialogfl" - + "ow.cx.v3.ValidateAgentRequest\0324.google.c" - + "loud.dialogflow.cx.v3.AgentValidationRes" - + "ult\">\202\323\344\223\0028\"3/v3/{name=projects/*/locati" - + "ons/*/agents/*}:validate:\001*\022\334\001\n\030GetAgent" - + "ValidationResult\022>.google.cloud.dialogfl" - + "ow.cx.v3.GetAgentValidationResultRequest" - + "\0324.google.cloud.dialogflow.cx.v3.AgentVa" - + "lidationResult\"J\332A\004name\202\323\344\223\002=\022;/v3/{name" - + "=projects/*/locations/*/agents/*/validat" - + "ionResult}\022\343\001\n\025GetGenerativeSettings\022;.g" - + "oogle.cloud.dialogflow.cx.v3.GetGenerati" - + "veSettingsRequest\0321.google.cloud.dialogf" - + "low.cx.v3.GenerativeSettings\"Z\332A\022name,la" - + "nguage_code\202\323\344\223\002?\022=/v3/{name=projects/*/" - + "locations/*/agents/*/generativeSettings}" - + "\022\240\002\n\030UpdateGenerativeSettings\022>.google.c" - + "loud.dialogflow.cx.v3.UpdateGenerativeSe" - + "ttingsRequest\0321.google.cloud.dialogflow." - + "cx.v3.GenerativeSettings\"\220\001\332A\037generative" - + "_settings,update_mask\202\323\344\223\002h2Q/v3/{genera" - + "tive_settings.name=projects/*/locations/" - + "*/agents/*/generativeSettings}:\023generati" - + "ve_settings\032x\312A\031dialogflow.googleapis.co" - + "m\322AYhttps://www.googleapis.com/auth/clou" - + "d-platform,https://www.googleapis.com/au" - + "th/dialogflowB\260\001\n!com.google.cloud.dialo" - + "gflow.cx.v3B\nAgentProtoP\001Z1cloud.google." - + "com/go/dialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242" - + "\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!G" - + "oogle::Cloud::Dialogflow::CX::V3b\006proto3" + + "is.com/Agent\"\236\004\n\022ExportAgentRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleapi" + + "s.com/Agent\022\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022W\n\013" + + "data_format\030\003 \001(\0162<.google.cloud.dialogf" + + "low.cx.v3.ExportAgentRequest.DataFormatB" + + "\004\342A\001\001\022C\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'\n%dia" + + "logflow.googleapis.com/Environment\022_\n\017gi" + + "t_destination\030\006 \001(\0132@.google.cloud.dialo" + + "gflow.cx.v3.ExportAgentRequest.GitDestin" + + "ationB\004\342A\001\001\022.\n include_bigquery_export_s" + + "ettings\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDestination\022\027\n" + + "\017tracking_branch\030\001 \001(\t\022\026\n\016commit_message" + + "\030\002 \001(\t\"E\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSP" + + "ECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n" + + "\023ExportAgentResponse\022\023\n\tagent_uri\030\001 \001(\tH" + + "\000\022\027\n\ragent_content\030\002 \001(\014H\000\022\024\n\ncommit_sha" + + "\030\003 \001(\tH\000B\007\n\005agent\"\241\003\n\023RestoreAgentReques" + + "t\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.goo" + + "gleapis.com/Agent\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027" + + "\n\ragent_content\030\003 \001(\014H\000\022R\n\ngit_source\030\006 " + + "\001(\0132<.google.cloud.dialogflow.cx.v3.Rest" + + "oreAgentRequest.GitSourceH\000\022X\n\016restore_o" + + "ption\030\005 \001(\0162@.google.cloud.dialogflow.cx" + + ".v3.RestoreAgentRequest.RestoreOption\032$\n" + + "\tGitSource\022\027\n\017tracking_branch\030\001 \001(\t\"G\n\rR" + + "estoreOption\022\036\n\032RESTORE_OPTION_UNSPECIFI" + + "ED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"e\n" + + "\024ValidateAgentRequest\0226\n\004name\030\001 \001(\tB(\342A\001" + + "\002\372A!\n\037dialogflow.googleapis.com/Agent\022\025\n" + + "\rlanguage_code\030\002 \001(\t\"\200\001\n\037GetAgentValidat" + + "ionResultRequest\022F\n\004name\030\001 \001(\tB8\342A\001\002\372A1\n" + + "/dialogflow.googleapis.com/AgentValidati" + + "onResult\022\025\n\rlanguage_code\030\002 \001(\t\"\372\001\n\025Agen" + + "tValidationResult\022\014\n\004name\030\001 \001(\t\022T\n\027flow_" + + "validation_results\030\002 \003(\01323.google.cloud." + + "dialogflow.cx.v3.FlowValidationResult:}\352" + + "Az\n/dialogflow.googleapis.com/AgentValid" + + "ationResult\022Gprojects/{project}/location" + + "s/{location}/agents/{agent}/validationRe" + + "sult\"\205\001\n\034GetGenerativeSettingsRequest\022H\n" + + "\004name\030\001 \001(\tB:\342A\001\002\372A3\n1dialogflow.googlea" + + "pis.com/AgentGenerativeSettings\022\033\n\rlangu" + + "age_code\030\002 \001(\tB\004\342A\001\002\"\256\001\n\037UpdateGenerativ" + + "eSettingsRequest\022T\n\023generative_settings\030" + + "\001 \001(\01321.google.cloud.dialogflow.cx.v3.Ge" + + "nerativeSettingsB\004\342A\001\002\0225\n\013update_mask\030\002 " + + "\001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\0012\242\022" + + "\n\006Agents\022\256\001\n\nListAgents\0220.google.cloud.d" + + "ialogflow.cx.v3.ListAgentsRequest\0321.goog" + + "le.cloud.dialogflow.cx.v3.ListAgentsResp" + + "onse\";\332A\006parent\202\323\344\223\002,\022*/v3/{parent=proje" + + "cts/*/locations/*}/agents\022\233\001\n\010GetAgent\022." + + ".google.cloud.dialogflow.cx.v3.GetAgentR" + + "equest\032$.google.cloud.dialogflow.cx.v3.A" + + "gent\"9\332A\004name\202\323\344\223\002,\022*/v3/{name=projects/" + + "*/locations/*/agents/*}\022\260\001\n\013CreateAgent\022" + + "1.google.cloud.dialogflow.cx.v3.CreateAg" + + "entRequest\032$.google.cloud.dialogflow.cx." + + "v3.Agent\"H\332A\014parent,agent\202\323\344\223\0023\"*/v3/{pa" + + "rent=projects/*/locations/*}/agents:\005age" + + "nt\022\273\001\n\013UpdateAgent\0221.google.cloud.dialog" + + "flow.cx.v3.UpdateAgentRequest\032$.google.c" + + "loud.dialogflow.cx.v3.Agent\"S\332A\021agent,up" + + "date_mask\202\323\344\223\002920/v3/{agent.name=project" + + "s/*/locations/*/agents/*}:\005agent\022\223\001\n\013Del" + + "eteAgent\0221.google.cloud.dialogflow.cx.v3" + + ".DeleteAgentRequest\032\026.google.protobuf.Em" + + "pty\"9\332A\004name\202\323\344\223\002,**/v3/{name=projects/*" + + "/locations/*/agents/*}\022\315\001\n\013ExportAgent\0221" + + ".google.cloud.dialogflow.cx.v3.ExportAge" + + "ntRequest\032\035.google.longrunning.Operation" + + "\"l\312A-\n\023ExportAgentResponse\022\026google.proto" + + "buf.Struct\202\323\344\223\0026\"1/v3/{name=projects/*/l" + + "ocations/*/agents/*}:export:\001*\022\322\001\n\014Resto" + + "reAgent\0222.google.cloud.dialogflow.cx.v3." + + "RestoreAgentRequest\032\035.google.longrunning" + + ".Operation\"o\312A/\n\025google.protobuf.Empty\022\026" + + "google.protobuf.Struct\202\323\344\223\0027\"2/v3/{name=" + + "projects/*/locations/*/agents/*}:restore" + + ":\001*\022\272\001\n\rValidateAgent\0223.google.cloud.dia" + + "logflow.cx.v3.ValidateAgentRequest\0324.goo" + + "gle.cloud.dialogflow.cx.v3.AgentValidati" + + "onResult\">\202\323\344\223\0028\"3/v3/{name=projects/*/l" + + "ocations/*/agents/*}:validate:\001*\022\334\001\n\030Get" + + "AgentValidationResult\022>.google.cloud.dia" + + "logflow.cx.v3.GetAgentValidationResultRe" + + "quest\0324.google.cloud.dialogflow.cx.v3.Ag" + + "entValidationResult\"J\332A\004name\202\323\344\223\002=\022;/v3/" + + "{name=projects/*/locations/*/agents/*/va" + + "lidationResult}\022\343\001\n\025GetGenerativeSetting" + + "s\022;.google.cloud.dialogflow.cx.v3.GetGen" + + "erativeSettingsRequest\0321.google.cloud.di" + + "alogflow.cx.v3.GenerativeSettings\"Z\332A\022na" + + "me,language_code\202\323\344\223\002?\022=/v3/{name=projec" + + "ts/*/locations/*/agents/*/generativeSett" + + "ings}\022\240\002\n\030UpdateGenerativeSettings\022>.goo" + + "gle.cloud.dialogflow.cx.v3.UpdateGenerat" + + "iveSettingsRequest\0321.google.cloud.dialog" + + "flow.cx.v3.GenerativeSettings\"\220\001\332A\037gener" + + "ative_settings,update_mask\202\323\344\223\002h2Q/v3/{g" + + "enerative_settings.name=projects/*/locat" + + "ions/*/agents/*/generativeSettings}:\023gen" + + "erative_settings\032x\312A\031dialogflow.googleap" + + "is.com\322AYhttps://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.c" + + "om/auth/dialogflowB\260\001\n!com.google.cloud." + + "dialogflow.cx.v3B\nAgentProtoP\001Z1cloud.go" + + "ogle.com/go/dialogflow/cx/apiv3/cxpb;cxp" + + "b\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V" + + "3\352\002!Google::Cloud::Dialogflow::CX::V3b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -342,6 +351,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitIntegrationSettings", "TextToSpeechSettings", "GenAppBuilderSettings", + "AnswerFeedbackSettings", "GenAppBuilderSettings", }); internal_static_google_cloud_dialogflow_cx_v3_Agent_GitIntegrationSettings_descriptor = @@ -370,6 +380,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Engine", }); + internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Agent_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Agent_AnswerFeedbackSettings_descriptor, + new java.lang.String[] { + "EnableAnswerFeedback", + }); internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_fieldAccessorTable = diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedback.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedback.java new file mode 100644 index 000000000000..681ed4ac8fa4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedback.java @@ -0,0 +1,2292 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores information about feedback provided by users about a response.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AnswerFeedback} + */ +public final class AnswerFeedback extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AnswerFeedback) + AnswerFeedbackOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerFeedback.newBuilder() to construct. + private AnswerFeedback(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerFeedback() { + rating_ = 0; + customRating_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerFeedback(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.class, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder.class); + } + + /** + * + * + *
+   * Represents thumbs up/down rating provided by user about a response.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating} + */ + public enum Rating implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Rating not specified.
+     * 
+ * + * RATING_UNSPECIFIED = 0; + */ + RATING_UNSPECIFIED(0), + /** + * + * + *
+     * Thumbs up feedback from user.
+     * 
+ * + * THUMBS_UP = 1; + */ + THUMBS_UP(1), + /** + * + * + *
+     * Thumbs down feedback from user.
+     * 
+ * + * THUMBS_DOWN = 2; + */ + THUMBS_DOWN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Rating not specified.
+     * 
+ * + * RATING_UNSPECIFIED = 0; + */ + public static final int RATING_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Thumbs up feedback from user.
+     * 
+ * + * THUMBS_UP = 1; + */ + public static final int THUMBS_UP_VALUE = 1; + /** + * + * + *
+     * Thumbs down feedback from user.
+     * 
+ * + * THUMBS_DOWN = 2; + */ + public static final int THUMBS_DOWN_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 Rating 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 Rating forNumber(int value) { + switch (value) { + case 0: + return RATING_UNSPECIFIED; + case 1: + return THUMBS_UP; + case 2: + return THUMBS_DOWN; + 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 Rating findValueByNumber(int number) { + return Rating.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.cx.v3.AnswerFeedback.getDescriptor().getEnumTypes().get(0); + } + + private static final Rating[] VALUES = values(); + + public static Rating 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 Rating(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating) + } + + public interface RatingReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + java.util.List getReasonLabelsList(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + int getReasonLabelsCount(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + java.lang.String getReasonLabels(int index); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + com.google.protobuf.ByteString getReasonLabelsBytes(int index); + + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + java.lang.String getFeedback(); + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + com.google.protobuf.ByteString getFeedbackBytes(); + } + /** + * + * + *
+   * Stores extra information about why users provided thumbs down rating.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} + */ + public static final class RatingReason extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) + RatingReasonOrBuilder { + private static final long serialVersionUID = 0L; + // Use RatingReason.newBuilder() to construct. + private RatingReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RatingReason() { + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + feedback_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RatingReason(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.class, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder.class); + } + + public static final int REASON_LABELS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList reasonLabels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + public com.google.protobuf.ProtocolStringList getReasonLabelsList() { + return reasonLabels_; + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + public int getReasonLabelsCount() { + return reasonLabels_.size(); + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + public java.lang.String getReasonLabels(int index) { + return reasonLabels_.get(index); + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + public com.google.protobuf.ByteString getReasonLabelsBytes(int index) { + return reasonLabels_.getByteString(index); + } + + public static final int FEEDBACK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object feedback_ = ""; + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + @java.lang.Override + public java.lang.String getFeedback() { + java.lang.Object ref = feedback_; + 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(); + feedback_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeedbackBytes() { + java.lang.Object ref = feedback_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + feedback_ = 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(feedback_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedback_); + } + for (int i = 0; i < reasonLabels_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reasonLabels_.getRaw(i)); + } + 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(feedback_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedback_); + } + { + int dataSize = 0; + for (int i = 0; i < reasonLabels_.size(); i++) { + dataSize += computeStringSizeNoTag(reasonLabels_.getRaw(i)); + } + size += dataSize; + size += 1 * getReasonLabelsList().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.cx.v3.AnswerFeedback.RatingReason)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason other = + (com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) obj; + + if (!getReasonLabelsList().equals(other.getReasonLabelsList())) return false; + if (!getFeedback().equals(other.getFeedback())) 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 (getReasonLabelsCount() > 0) { + hash = (37 * hash) + REASON_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getReasonLabelsList().hashCode(); + } + hash = (37 * hash) + FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getFeedback().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason 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.cx.v3.AnswerFeedback.RatingReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason 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.cx.v3.AnswerFeedback.RatingReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason 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.cx.v3.AnswerFeedback.RatingReason parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason 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.cx.v3.AnswerFeedback.RatingReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason 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.cx.v3.AnswerFeedback.RatingReason 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; + } + /** + * + * + *
+     * Stores extra information about why users provided thumbs down rating.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.class, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + feedback_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason build() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason buildPartial() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason result = + new com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + reasonLabels_.makeImmutable(); + result.reasonLabels_ = reasonLabels_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.feedback_ = feedback_; + } + } + + @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.cx.v3.AnswerFeedback.RatingReason) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason other) { + if (other + == com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance()) + return this; + if (!other.reasonLabels_.isEmpty()) { + if (reasonLabels_.isEmpty()) { + reasonLabels_ = other.reasonLabels_; + bitField0_ |= 0x00000001; + } else { + ensureReasonLabelsIsMutable(); + reasonLabels_.addAll(other.reasonLabels_); + } + onChanged(); + } + if (!other.getFeedback().isEmpty()) { + feedback_ = other.feedback_; + bitField0_ |= 0x00000002; + 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 18: + { + feedback_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReasonLabelsIsMutable(); + reasonLabels_.add(s); + 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 com.google.protobuf.LazyStringArrayList reasonLabels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReasonLabelsIsMutable() { + if (!reasonLabels_.isModifiable()) { + reasonLabels_ = new com.google.protobuf.LazyStringArrayList(reasonLabels_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + public com.google.protobuf.ProtocolStringList getReasonLabelsList() { + reasonLabels_.makeImmutable(); + return reasonLabels_; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + public int getReasonLabelsCount() { + return reasonLabels_.size(); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + public java.lang.String getReasonLabels(int index) { + return reasonLabels_.get(index); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + public com.google.protobuf.ByteString getReasonLabelsBytes(int index) { + return reasonLabels_.getByteString(index); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The reasonLabels to set. + * @return This builder for chaining. + */ + public Builder setReasonLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonLabelsIsMutable(); + reasonLabels_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addReasonLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonLabelsIsMutable(); + reasonLabels_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addAllReasonLabels(java.lang.Iterable values) { + ensureReasonLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reasonLabels_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReasonLabels() { + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addReasonLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReasonLabelsIsMutable(); + reasonLabels_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object feedback_ = ""; + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + public java.lang.String getFeedback() { + java.lang.Object ref = feedback_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedback_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + public com.google.protobuf.ByteString getFeedbackBytes() { + java.lang.Object ref = feedback_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + feedback_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The feedback to set. + * @return This builder for chaining. + */ + public Builder setFeedback(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + feedback_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFeedback() { + feedback_ = getDefaultInstance().getFeedback(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for feedback to set. + * @return This builder for chaining. + */ + public Builder setFeedbackBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + feedback_ = 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.cx.v3.AnswerFeedback.RatingReason) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) + private static final com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason(); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RatingReason 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.cx.v3.AnswerFeedback.RatingReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RATING_FIELD_NUMBER = 1; + private int rating_ = 0; + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + @java.lang.Override + public int getRatingValue() { + return rating_; + } + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating getRating() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating result = + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.forNumber(rating_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.UNRECOGNIZED + : result; + } + + public static final int RATING_REASON_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason ratingReason_; + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + @java.lang.Override + public boolean hasRatingReason() { + return ratingReason_ != null; + } + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason getRatingReason() { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder + getRatingReasonOrBuilder() { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } + + public static final int CUSTOM_RATING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object customRating_ = ""; + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + @java.lang.Override + public java.lang.String getCustomRating() { + java.lang.Object ref = customRating_; + 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(); + customRating_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomRatingBytes() { + java.lang.Object ref = customRating_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRating_ = 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 (rating_ + != com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.RATING_UNSPECIFIED.getNumber()) { + output.writeEnum(1, rating_); + } + if (ratingReason_ != null) { + output.writeMessage(2, getRatingReason()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customRating_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, customRating_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rating_ + != com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.RATING_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rating_); + } + if (ratingReason_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRatingReason()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customRating_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, customRating_); + } + 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.cx.v3.AnswerFeedback)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AnswerFeedback other = + (com.google.cloud.dialogflow.cx.v3.AnswerFeedback) obj; + + if (rating_ != other.rating_) return false; + if (hasRatingReason() != other.hasRatingReason()) return false; + if (hasRatingReason()) { + if (!getRatingReason().equals(other.getRatingReason())) return false; + } + if (!getCustomRating().equals(other.getCustomRating())) 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) + RATING_FIELD_NUMBER; + hash = (53 * hash) + rating_; + if (hasRatingReason()) { + hash = (37 * hash) + RATING_REASON_FIELD_NUMBER; + hash = (53 * hash) + getRatingReason().hashCode(); + } + hash = (37 * hash) + CUSTOM_RATING_FIELD_NUMBER; + hash = (53 * hash) + getCustomRating().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback 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.cx.v3.AnswerFeedback parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback 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.cx.v3.AnswerFeedback parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback 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.cx.v3.AnswerFeedback parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback 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.cx.v3.AnswerFeedback parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback 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.cx.v3.AnswerFeedback 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; + } + /** + * + * + *
+   * Stores information about feedback provided by users about a response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AnswerFeedback} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AnswerFeedback) + com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.class, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.AnswerFeedback.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rating_ = 0; + ratingReason_ = null; + if (ratingReasonBuilder_ != null) { + ratingReasonBuilder_.dispose(); + ratingReasonBuilder_ = null; + } + customRating_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback build() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback buildPartial() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback result = + new com.google.cloud.dialogflow.cx.v3.AnswerFeedback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.AnswerFeedback result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rating_ = rating_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ratingReason_ = + ratingReasonBuilder_ == null ? ratingReason_ : ratingReasonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customRating_ = customRating_; + } + } + + @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.cx.v3.AnswerFeedback) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.AnswerFeedback) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.AnswerFeedback other) { + if (other == com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance()) + return this; + if (other.rating_ != 0) { + setRatingValue(other.getRatingValue()); + } + if (other.hasRatingReason()) { + mergeRatingReason(other.getRatingReason()); + } + if (!other.getCustomRating().isEmpty()) { + customRating_ = other.customRating_; + 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 8: + { + rating_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getRatingReasonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + customRating_ = 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 int rating_ = 0; + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + @java.lang.Override + public int getRatingValue() { + return rating_; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for rating to set. + * @return This builder for chaining. + */ + public Builder setRatingValue(int value) { + rating_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating getRating() { + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating result = + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.forNumber(rating_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rating to set. + * @return This builder for chaining. + */ + public Builder setRating(com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rating_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRating() { + bitField0_ = (bitField0_ & ~0x00000001); + rating_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason ratingReason_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder> + ratingReasonBuilder_; + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + public boolean hasRatingReason() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason getRatingReason() { + if (ratingReasonBuilder_ == null) { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } else { + return ratingReasonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingReason( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason value) { + if (ratingReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ratingReason_ = value; + } else { + ratingReasonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingReason( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder builderForValue) { + if (ratingReasonBuilder_ == null) { + ratingReason_ = builderForValue.build(); + } else { + ratingReasonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRatingReason( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason value) { + if (ratingReasonBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ratingReason_ != null + && ratingReason_ + != com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + .getDefaultInstance()) { + getRatingReasonBuilder().mergeFrom(value); + } else { + ratingReason_ = value; + } + } else { + ratingReasonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRatingReason() { + bitField0_ = (bitField0_ & ~0x00000002); + ratingReason_ = null; + if (ratingReasonBuilder_ != null) { + ratingReasonBuilder_.dispose(); + ratingReasonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder + getRatingReasonBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRatingReasonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder + getRatingReasonOrBuilder() { + if (ratingReasonBuilder_ != null) { + return ratingReasonBuilder_.getMessageOrBuilder(); + } else { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder> + getRatingReasonFieldBuilder() { + if (ratingReasonBuilder_ == null) { + ratingReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder>( + getRatingReason(), getParentForChildren(), isClean()); + ratingReason_ = null; + } + return ratingReasonBuilder_; + } + + private java.lang.Object customRating_ = ""; + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + public java.lang.String getCustomRating() { + java.lang.Object ref = customRating_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customRating_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + public com.google.protobuf.ByteString getCustomRatingBytes() { + java.lang.Object ref = customRating_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRating_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The customRating to set. + * @return This builder for chaining. + */ + public Builder setCustomRating(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customRating_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRating() { + customRating_ = getDefaultInstance().getCustomRating(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for customRating to set. + * @return This builder for chaining. + */ + public Builder setCustomRatingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customRating_ = 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.cx.v3.AnswerFeedback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AnswerFeedback) + private static final com.google.cloud.dialogflow.cx.v3.AnswerFeedback DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AnswerFeedback(); + } + + public static com.google.cloud.dialogflow.cx.v3.AnswerFeedback getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerFeedback 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.cx.v3.AnswerFeedback getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedbackOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedbackOrBuilder.java new file mode 100644 index 000000000000..547effdf5710 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AnswerFeedbackOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface AnswerFeedbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AnswerFeedback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + int getRatingValue(); + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating getRating(); + + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + boolean hasRatingReason(); + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason getRatingReason(); + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonOrBuilder getRatingReasonOrBuilder(); + + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + java.lang.String getCustomRating(); + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + com.google.protobuf.ByteString getCustomRatingBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java index abf8a24ab44c..167cd2e5368b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_SpeechWordInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_SpeechWordInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_InputAudioConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -72,59 +76,64 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\003 \001(\t\022/\n\014start_offset\030\001 \001(\0132\031.google.pr" + "otobuf.Duration\022-\n\nend_offset\030\002 \001(\0132\031.go" + "ogle.protobuf.Duration\022\022\n\nconfidence\030\004 \001" - + "(\002\"\234\002\n\020InputAudioConfig\022J\n\016audio_encodin" - + "g\030\001 \001(\0162,.google.cloud.dialogflow.cx.v3." - + "AudioEncodingB\004\342A\001\002\022\031\n\021sample_rate_hertz" - + "\030\002 \001(\005\022\030\n\020enable_word_info\030\r \001(\010\022\024\n\014phra" - + "se_hints\030\004 \003(\t\022\r\n\005model\030\007 \001(\t\022H\n\rmodel_v" - + "ariant\030\n \001(\01621.google.cloud.dialogflow.c" - + "x.v3.SpeechModelVariant\022\030\n\020single_uttera" - + "nce\030\010 \001(\010\"i\n\024VoiceSelectionParams\022\014\n\004nam" - + "e\030\001 \001(\t\022C\n\013ssml_gender\030\002 \001(\0162..google.cl" - + "oud.dialogflow.cx.v3.SsmlVoiceGender\"\266\001\n" - + "\026SynthesizeSpeechConfig\022\025\n\rspeaking_rate" - + "\030\001 \001(\001\022\r\n\005pitch\030\002 \001(\001\022\026\n\016volume_gain_db\030" - + "\003 \001(\001\022\032\n\022effects_profile_id\030\005 \003(\t\022B\n\005voi" - + "ce\030\004 \001(\01323.google.cloud.dialogflow.cx.v3" - + ".VoiceSelectionParams\"\331\001\n\021OutputAudioCon" - + "fig\022P\n\016audio_encoding\030\001 \001(\01622.google.clo" - + "ud.dialogflow.cx.v3.OutputAudioEncodingB" - + "\004\342A\001\002\022\031\n\021sample_rate_hertz\030\002 \001(\005\022W\n\030synt" - + "hesize_speech_config\030\003 \001(\01325.google.clou" - + "d.dialogflow.cx.v3.SynthesizeSpeechConfi" - + "g\"\202\002\n\024TextToSpeechSettings\022s\n\031synthesize" - + "_speech_configs\030\001 \003(\0132P.google.cloud.dia" - + "logflow.cx.v3.TextToSpeechSettings.Synth" - + "esizeSpeechConfigsEntry\032u\n\034SynthesizeSpe" - + "echConfigsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 " - + "\001(\01325.google.cloud.dialogflow.cx.v3.Synt" - + "hesizeSpeechConfig:\0028\001*\373\001\n\rAudioEncoding" - + "\022\036\n\032AUDIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030AUDI" - + "O_ENCODING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCODING" - + "_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MULAW\020\003\022\026\n\022AUD" - + "IO_ENCODING_AMR\020\004\022\031\n\025AUDIO_ENCODING_AMR_" - + "WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_OPUS\020\006\022)\n%AUD" - + "IO_ENCODING_SPEEX_WITH_HEADER_BYTE\020\007*v\n\022" - + "SpeechModelVariant\022$\n SPEECH_MODEL_VARIA" - + "NT_UNSPECIFIED\020\000\022\026\n\022USE_BEST_AVAILABLE\020\001" - + "\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_ENHANCED\020\003*\215\001\n" - + "\017SsmlVoiceGender\022!\n\035SSML_VOICE_GENDER_UN" - + "SPECIFIED\020\000\022\032\n\026SSML_VOICE_GENDER_MALE\020\001\022" - + "\034\n\030SSML_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSML_VO" - + "ICE_GENDER_NEUTRAL\020\003*\354\001\n\023OutputAudioEnco" - + "ding\022%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIE" - + "D\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_LINEAR_16\020\001" - + "\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3\020\002\022%\n!OUTPU" - + "T_AUDIO_ENCODING_MP3_64_KBPS\020\004\022\"\n\036OUTPUT" - + "_AUDIO_ENCODING_OGG_OPUS\020\003\022\037\n\033OUTPUT_AUD" - + "IO_ENCODING_MULAW\020\005B\216\002\n!com.google.cloud" - + ".dialogflow.cx.v3B\020AudioConfigProtoP\001Z1c" - + "loud.google.com/go/dialogflow/cx/apiv3/c" - + "xpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogfl" - + "ow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX" - + "::V3\352AU\n\033automl.googleapis.com/Model\0226pr" - + "ojects/{project}/locations/{location}/mo" - + "dels/{model}b\006proto3" + + "(\002\"{\n\rBargeInConfig\0227\n\024no_barge_in_durat" + + "ion\030\001 \001(\0132\031.google.protobuf.Duration\0221\n\016" + + "total_duration\030\002 \001(\0132\031.google.protobuf.D" + + "uration\"\343\002\n\020InputAudioConfig\022J\n\016audio_en" + + "coding\030\001 \001(\0162,.google.cloud.dialogflow.c" + + "x.v3.AudioEncodingB\004\342A\001\002\022\031\n\021sample_rate_" + + "hertz\030\002 \001(\005\022\030\n\020enable_word_info\030\r \001(\010\022\024\n" + + "\014phrase_hints\030\004 \003(\t\022\r\n\005model\030\007 \001(\t\022H\n\rmo" + + "del_variant\030\n \001(\01621.google.cloud.dialogf" + + "low.cx.v3.SpeechModelVariant\022\030\n\020single_u" + + "tterance\030\010 \001(\010\022E\n\017barge_in_config\030\017 \001(\0132" + + ",.google.cloud.dialogflow.cx.v3.BargeInC" + + "onfig\"i\n\024VoiceSelectionParams\022\014\n\004name\030\001 " + + "\001(\t\022C\n\013ssml_gender\030\002 \001(\0162..google.cloud." + + "dialogflow.cx.v3.SsmlVoiceGender\"\266\001\n\026Syn" + + "thesizeSpeechConfig\022\025\n\rspeaking_rate\030\001 \001" + + "(\001\022\r\n\005pitch\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(" + + "\001\022\032\n\022effects_profile_id\030\005 \003(\t\022B\n\005voice\030\004" + + " \001(\01323.google.cloud.dialogflow.cx.v3.Voi" + + "ceSelectionParams\"\331\001\n\021OutputAudioConfig\022" + + "P\n\016audio_encoding\030\001 \001(\01622.google.cloud.d" + + "ialogflow.cx.v3.OutputAudioEncodingB\004\342A\001" + + "\002\022\031\n\021sample_rate_hertz\030\002 \001(\005\022W\n\030synthesi" + + "ze_speech_config\030\003 \001(\01325.google.cloud.di" + + "alogflow.cx.v3.SynthesizeSpeechConfig\"\202\002" + + "\n\024TextToSpeechSettings\022s\n\031synthesize_spe" + + "ech_configs\030\001 \003(\0132P.google.cloud.dialogf" + + "low.cx.v3.TextToSpeechSettings.Synthesiz" + + "eSpeechConfigsEntry\032u\n\034SynthesizeSpeechC" + + "onfigsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\0132" + + "5.google.cloud.dialogflow.cx.v3.Synthesi" + + "zeSpeechConfig:\0028\001*\373\001\n\rAudioEncoding\022\036\n\032" + + "AUDIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030AUDIO_EN" + + "CODING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCODING_FLA" + + "C\020\002\022\030\n\024AUDIO_ENCODING_MULAW\020\003\022\026\n\022AUDIO_E" + + "NCODING_AMR\020\004\022\031\n\025AUDIO_ENCODING_AMR_WB\020\005" + + "\022\033\n\027AUDIO_ENCODING_OGG_OPUS\020\006\022)\n%AUDIO_E" + + "NCODING_SPEEX_WITH_HEADER_BYTE\020\007*v\n\022Spee" + + "chModelVariant\022$\n SPEECH_MODEL_VARIANT_U" + + "NSPECIFIED\020\000\022\026\n\022USE_BEST_AVAILABLE\020\001\022\020\n\014" + + "USE_STANDARD\020\002\022\020\n\014USE_ENHANCED\020\003*\215\001\n\017Ssm" + + "lVoiceGender\022!\n\035SSML_VOICE_GENDER_UNSPEC" + + "IFIED\020\000\022\032\n\026SSML_VOICE_GENDER_MALE\020\001\022\034\n\030S" + + "SML_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSML_VOICE_" + + "GENDER_NEUTRAL\020\003*\354\001\n\023OutputAudioEncoding" + + "\022%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\020\000\022" + + "#\n\037OUTPUT_AUDIO_ENCODING_LINEAR_16\020\001\022\035\n\031" + + "OUTPUT_AUDIO_ENCODING_MP3\020\002\022%\n!OUTPUT_AU" + + "DIO_ENCODING_MP3_64_KBPS\020\004\022\"\n\036OUTPUT_AUD" + + "IO_ENCODING_OGG_OPUS\020\003\022\037\n\033OUTPUT_AUDIO_E" + + "NCODING_MULAW\020\005B\216\002\n!com.google.cloud.dia" + + "logflow.cx.v3B\020AudioConfigProtoP\001Z1cloud" + + ".google.com/go/dialogflow/cx/apiv3/cxpb;" + + "cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.C" + + "x.V3\352\002!Google::Cloud::Dialogflow::CX::V3" + + "\352AU\n\033automl.googleapis.com/Model\0226projec" + + "ts/{project}/locations/{location}/models" + + "/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -142,8 +151,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Word", "StartOffset", "EndOffset", "Confidence", }); - internal_static_google_cloud_dialogflow_cx_v3_InputAudioConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor, + new java.lang.String[] { + "NoBargeInDuration", "TotalDuration", + }); + internal_static_google_cloud_dialogflow_cx_v3_InputAudioConfig_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3_InputAudioConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_InputAudioConfig_descriptor, @@ -155,9 +172,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Model", "ModelVariant", "SingleUtterance", + "BargeInConfig", }); internal_static_google_cloud_dialogflow_cx_v3_VoiceSelectionParams_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_dialogflow_cx_v3_VoiceSelectionParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_VoiceSelectionParams_descriptor, @@ -165,7 +183,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SsmlGender", }); internal_static_google_cloud_dialogflow_cx_v3_SynthesizeSpeechConfig_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_dialogflow_cx_v3_SynthesizeSpeechConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_SynthesizeSpeechConfig_descriptor, @@ -173,7 +191,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SpeakingRate", "Pitch", "VolumeGainDb", "EffectsProfileId", "Voice", }); internal_static_google_cloud_dialogflow_cx_v3_OutputAudioConfig_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_dialogflow_cx_v3_OutputAudioConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_OutputAudioConfig_descriptor, @@ -181,7 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AudioEncoding", "SampleRateHertz", "SynthesizeSpeechConfig", }); internal_static_google_cloud_dialogflow_cx_v3_TextToSpeechSettings_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_cx_v3_TextToSpeechSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_TextToSpeechSettings_descriptor, diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfig.java new file mode 100644 index 000000000000..9045d517b737 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfig.java @@ -0,0 +1,1032 @@ +/* + * 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/cx/v3/audio_config.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Configuration of the barge-in behavior. Barge-in instructs the API to return
+ * a detected utterance at a proper time while the client is playing back the
+ * response audio from a previous request. When the client sees the
+ * utterance, it should stop the playback and immediately get ready for
+ * receiving the responses for the current request.
+ *
+ * The barge-in handling requires the client to start streaming audio input
+ * as soon as it starts playing back the audio from the previous response. The
+ * playback is modeled into two phases:
+ *
+ * * No barge-in phase: which goes first and during which speech detection
+ *   should not be carried out.
+ *
+ * * Barge-in phase: which follows the no barge-in phase and during which
+ *   the API starts speech detection and may inform the client that an utterance
+ *   has been detected. Note that no-speech event is not expected in this
+ *   phase.
+ *
+ * The client provides this configuration in terms of the durations of those
+ * two phases. The durations are measured in terms of the audio length from the
+ * the start of the input audio.
+ *
+ * No-speech event is a response with END_OF_UTTERANCE without any transcript
+ * following up.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BargeInConfig} + */ +public final class BargeInConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BargeInConfig) + BargeInConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BargeInConfig.newBuilder() to construct. + private BargeInConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BargeInConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BargeInConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BargeInConfig.class, + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder.class); + } + + public static final int NO_BARGE_IN_DURATION_FIELD_NUMBER = 1; + private com.google.protobuf.Duration noBargeInDuration_; + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + @java.lang.Override + public boolean hasNoBargeInDuration() { + return noBargeInDuration_ != null; + } + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getNoBargeInDuration() { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder() { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + + public static final int TOTAL_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration totalDuration_; + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + @java.lang.Override + public boolean hasTotalDuration() { + return totalDuration_ != null; + } + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTotalDuration() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + + 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 (noBargeInDuration_ != null) { + output.writeMessage(1, getNoBargeInDuration()); + } + if (totalDuration_ != null) { + output.writeMessage(2, getTotalDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (noBargeInDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNoBargeInDuration()); + } + if (totalDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTotalDuration()); + } + 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.cx.v3.BargeInConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BargeInConfig other = + (com.google.cloud.dialogflow.cx.v3.BargeInConfig) obj; + + if (hasNoBargeInDuration() != other.hasNoBargeInDuration()) return false; + if (hasNoBargeInDuration()) { + if (!getNoBargeInDuration().equals(other.getNoBargeInDuration())) return false; + } + if (hasTotalDuration() != other.hasTotalDuration()) return false; + if (hasTotalDuration()) { + if (!getTotalDuration().equals(other.getTotalDuration())) 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 (hasNoBargeInDuration()) { + hash = (37 * hash) + NO_BARGE_IN_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getNoBargeInDuration().hashCode(); + } + if (hasTotalDuration()) { + hash = (37 * hash) + TOTAL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTotalDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig 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.cx.v3.BargeInConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig 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.cx.v3.BargeInConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig 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.cx.v3.BargeInConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig 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.cx.v3.BargeInConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig 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.cx.v3.BargeInConfig 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; + } + /** + * + * + *
+   * Configuration of the barge-in behavior. Barge-in instructs the API to return
+   * a detected utterance at a proper time while the client is playing back the
+   * response audio from a previous request. When the client sees the
+   * utterance, it should stop the playback and immediately get ready for
+   * receiving the responses for the current request.
+   *
+   * The barge-in handling requires the client to start streaming audio input
+   * as soon as it starts playing back the audio from the previous response. The
+   * playback is modeled into two phases:
+   *
+   * * No barge-in phase: which goes first and during which speech detection
+   *   should not be carried out.
+   *
+   * * Barge-in phase: which follows the no barge-in phase and during which
+   *   the API starts speech detection and may inform the client that an utterance
+   *   has been detected. Note that no-speech event is not expected in this
+   *   phase.
+   *
+   * The client provides this configuration in terms of the durations of those
+   * two phases. The durations are measured in terms of the audio length from the
+   * the start of the input audio.
+   *
+   * No-speech event is a response with END_OF_UTTERANCE without any transcript
+   * following up.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BargeInConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BargeInConfig) + com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BargeInConfig.class, + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BargeInConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + noBargeInDuration_ = null; + if (noBargeInDurationBuilder_ != null) { + noBargeInDurationBuilder_.dispose(); + noBargeInDurationBuilder_ = null; + } + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3_BargeInConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BargeInConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BargeInConfig build() { + com.google.cloud.dialogflow.cx.v3.BargeInConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BargeInConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.BargeInConfig result = + new com.google.cloud.dialogflow.cx.v3.BargeInConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.BargeInConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.noBargeInDuration_ = + noBargeInDurationBuilder_ == null + ? noBargeInDuration_ + : noBargeInDurationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalDuration_ = + totalDurationBuilder_ == null ? totalDuration_ : totalDurationBuilder_.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.cx.v3.BargeInConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BargeInConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BargeInConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance()) + return this; + if (other.hasNoBargeInDuration()) { + mergeNoBargeInDuration(other.getNoBargeInDuration()); + } + if (other.hasTotalDuration()) { + mergeTotalDuration(other.getTotalDuration()); + } + 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( + getNoBargeInDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTotalDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.Duration noBargeInDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + noBargeInDurationBuilder_; + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + public boolean hasNoBargeInDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + public com.google.protobuf.Duration getNoBargeInDuration() { + if (noBargeInDurationBuilder_ == null) { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } else { + return noBargeInDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder setNoBargeInDuration(com.google.protobuf.Duration value) { + if (noBargeInDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + noBargeInDuration_ = value; + } else { + noBargeInDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder setNoBargeInDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (noBargeInDurationBuilder_ == null) { + noBargeInDuration_ = builderForValue.build(); + } else { + noBargeInDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder mergeNoBargeInDuration(com.google.protobuf.Duration value) { + if (noBargeInDurationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && noBargeInDuration_ != null + && noBargeInDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getNoBargeInDurationBuilder().mergeFrom(value); + } else { + noBargeInDuration_ = value; + } + } else { + noBargeInDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder clearNoBargeInDuration() { + bitField0_ = (bitField0_ & ~0x00000001); + noBargeInDuration_ = null; + if (noBargeInDurationBuilder_ != null) { + noBargeInDurationBuilder_.dispose(); + noBargeInDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public com.google.protobuf.Duration.Builder getNoBargeInDurationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNoBargeInDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder() { + if (noBargeInDurationBuilder_ != null) { + return noBargeInDurationBuilder_.getMessageOrBuilder(); + } else { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getNoBargeInDurationFieldBuilder() { + if (noBargeInDurationBuilder_ == null) { + noBargeInDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getNoBargeInDuration(), getParentForChildren(), isClean()); + noBargeInDuration_ = null; + } + return noBargeInDurationBuilder_; + } + + private com.google.protobuf.Duration totalDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + totalDurationBuilder_; + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + public boolean hasTotalDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + public com.google.protobuf.Duration getTotalDuration() { + if (totalDurationBuilder_ == null) { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } else { + return totalDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + totalDuration_ = value; + } else { + totalDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (totalDurationBuilder_ == null) { + totalDuration_ = builderForValue.build(); + } else { + totalDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder mergeTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && totalDuration_ != null + && totalDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTotalDurationBuilder().mergeFrom(value); + } else { + totalDuration_ = value; + } + } else { + totalDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder clearTotalDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.Duration.Builder getTotalDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTotalDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + if (totalDurationBuilder_ != null) { + return totalDurationBuilder_.getMessageOrBuilder(); + } else { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTotalDurationFieldBuilder() { + if (totalDurationBuilder_ == null) { + totalDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTotalDuration(), getParentForChildren(), isClean()); + totalDuration_ = null; + } + return totalDurationBuilder_; + } + + @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.cx.v3.BargeInConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BargeInConfig) + private static final com.google.cloud.dialogflow.cx.v3.BargeInConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BargeInConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.BargeInConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BargeInConfig 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.cx.v3.BargeInConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfigOrBuilder.java new file mode 100644 index 000000000000..324f510f077e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BargeInConfigOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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/cx/v3/audio_config.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BargeInConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BargeInConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + boolean hasNoBargeInDuration(); + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + com.google.protobuf.Duration getNoBargeInDuration(); + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder(); + + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + boolean hasTotalDuration(); + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + com.google.protobuf.Duration getTotalDuration(); + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpec.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpec.java new file mode 100644 index 000000000000..69b62322c1de --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpec.java @@ -0,0 +1,1982 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Boost specification to boost certain documents.
+ * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
+ * is available at
+ * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpec} + */ +public final class BoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BoostSpec) + BoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostSpec.newBuilder() to construct. + private BoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoostSpec() { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpec.class, + com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder.class); + } + + public interface ConditionBoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + java.lang.String getCondition(); + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * Optional. Strength of the condition boost, which should be in [-1, 1].
+     * Negative boost means demotion. Default is 0.0.
+     *
+     * Setting to 1.0 gives the document a big promotion. However, it does not
+     * necessarily mean that the boosted document will be the top result at
+     * all times, nor that other documents will be excluded. Results could
+     * still be shown even when none of them matches the condition. And
+     * results that are significantly more relevant to the search query can
+     * still trump your heavily favored but irrelevant documents.
+     *
+     * Setting to -1.0 gives the document a big demotion. However, results
+     * that are deeply relevant might still be shown. The document will have
+     * an upstream battle to get a fairly high ranking, but it is not blocked
+     * out completely.
+     *
+     * Setting to 0.0 means no boost applied. The boosting condition is
+     * ignored.
+     * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + float getBoost(); + } + /** + * + * + *
+   * Boost applies to documents which match a condition.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} + */ + public static final class ConditionBoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) + ConditionBoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionBoostSpec.newBuilder() to construct. + private ConditionBoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConditionBoostSpec() { + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionBoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.class, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder.class); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + 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(); + condition_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_FIELD_NUMBER = 2; + private float boost_ = 0F; + /** + * + * + *
+     * Optional. Strength of the condition boost, which should be in [-1, 1].
+     * Negative boost means demotion. Default is 0.0.
+     *
+     * Setting to 1.0 gives the document a big promotion. However, it does not
+     * necessarily mean that the boosted document will be the top result at
+     * all times, nor that other documents will be excluded. Results could
+     * still be shown even when none of them matches the condition. And
+     * results that are significantly more relevant to the search query can
+     * still trump your heavily favored but irrelevant documents.
+     *
+     * Setting to -1.0 gives the document a big demotion. However, results
+     * that are deeply relevant might still be shown. The document will have
+     * an upstream battle to get a fairly high ranking, but it is not blocked
+     * out completely.
+     *
+     * Setting to 0.0 means no boost applied. The boosting condition is
+     * ignored.
+     * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + + 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(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + output.writeFloat(2, boost_); + } + 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(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + } + 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.cx.v3.BoostSpec.ConditionBoostSpec)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec other = + (com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) 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) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec 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; + } + /** + * + * + *
+     * Boost applies to documents which match a condition.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.class, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + condition_ = ""; + boost_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec build() { + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec buildPartial() { + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec result = + new com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boost_ = boost_; + } + } + + @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.cx.v3.BoostSpec.ConditionBoostSpec) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec other) { + if (other + == com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.getDefaultInstance()) + return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + 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: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + 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 condition_ = ""; + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float boost_; + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + bitField0_ = (bitField0_ & ~0x00000002); + boost_ = 0F; + 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.cx.v3.BoostSpec.ConditionBoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) + private static final com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec(); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionBoostSpec 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.cx.v3.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + conditionBoostSpecs_; + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getConditionBoostSpecsList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getConditionBoostSpecsCount() { + return conditionBoostSpecs_.size(); + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec getConditionBoostSpecs( + int index) { + return conditionBoostSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + return conditionBoostSpecs_.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 < conditionBoostSpecs_.size(); i++) { + output.writeMessage(1, conditionBoostSpecs_.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 < conditionBoostSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, conditionBoostSpecs_.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.cx.v3.BoostSpec)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BoostSpec other = + (com.google.cloud.dialogflow.cx.v3.BoostSpec) obj; + + if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) 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 (getConditionBoostSpecsCount() > 0) { + hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec 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; + } + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
+   * is available at
+   * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BoostSpec) + com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpec.class, + com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } else { + conditionBoostSpecs_ = null; + conditionBoostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BoostSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec build() { + com.google.cloud.dialogflow.cx.v3.BoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec buildPartial() { + com.google.cloud.dialogflow.cx.v3.BoostSpec result = + new com.google.cloud.dialogflow.cx.v3.BoostSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.BoostSpec result) { + if (conditionBoostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionBoostSpecs_ = conditionBoostSpecs_; + } else { + result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.BoostSpec 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.cx.v3.BoostSpec) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BoostSpec other) { + if (other == com.google.cloud.dialogflow.cx.v3.BoostSpec.getDefaultInstance()) return this; + if (conditionBoostSpecsBuilder_ == null) { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecs_.isEmpty()) { + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); + } + onChanged(); + } + } else { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecsBuilder_.isEmpty()) { + conditionBoostSpecsBuilder_.dispose(); + conditionBoostSpecsBuilder_ = null; + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionBoostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionBoostSpecsFieldBuilder() + : null; + } else { + conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); + } + } + } + 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: + { + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + 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.util.List + conditionBoostSpecs_ = java.util.Collections.emptyList(); + + private void ensureConditionBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = + new java.util.ArrayList( + conditionBoostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder> + conditionBoostSpecsBuilder_; + + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getConditionBoostSpecsList() { + if (conditionBoostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } else { + return conditionBoostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getConditionBoostSpecsCount() { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.size(); + } else { + return conditionBoostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec getConditionBoostSpecs( + int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + int index, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllConditionBoostSpecs( + java.lang.Iterable + values) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditionBoostSpecs_); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConditionBoostSpecs() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionBoostSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.remove(index); + onChanged(); + } else { + conditionBoostSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder + getConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + if (conditionBoostSpecsBuilder_ != null) { + return conditionBoostSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder + addConditionBoostSpecsBuilder() { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder + addConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getConditionBoostSpecsBuilderList() { + return getConditionBoostSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsFieldBuilder() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder>( + conditionBoostSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditionBoostSpecs_ = null; + } + return conditionBoostSpecsBuilder_; + } + + @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.cx.v3.BoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BoostSpec) + private static final com.google.cloud.dialogflow.cx.v3.BoostSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BoostSpec(); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostSpec 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.cx.v3.BoostSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecOrBuilder.java new file mode 100644 index 000000000000..9315762631c0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getConditionBoostSpecsList(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec getConditionBoostSpecs(int index); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getConditionBoostSpecsCount(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getConditionBoostSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecs.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecs.java new file mode 100644 index 000000000000..31e6cfd4eb87 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecs.java @@ -0,0 +1,1321 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Boost specifications for data stores.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpecs} + */ +public final class BoostSpecs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BoostSpecs) + BoostSpecsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostSpecs.newBuilder() to construct. + private BoostSpecs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoostSpecs() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + spec_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostSpecs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpecs.class, + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder.class); + } + + public static final int DATA_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + return dataStores_; + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + + public static final int SPEC_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List spec_; + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getSpecList() { + return spec_; + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSpecOrBuilderList() { + return spec_; + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSpecCount() { + return spec_.size(); + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpec getSpec(int index) { + return spec_.get(index); + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder getSpecOrBuilder(int index) { + return spec_.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 < dataStores_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStores_.getRaw(i)); + } + for (int i = 0; i < spec_.size(); i++) { + output.writeMessage(2, spec_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < dataStores_.size(); i++) { + dataSize += computeStringSizeNoTag(dataStores_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataStoresList().size(); + } + for (int i = 0; i < spec_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spec_.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.cx.v3.BoostSpecs)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BoostSpecs other = + (com.google.cloud.dialogflow.cx.v3.BoostSpecs) obj; + + if (!getDataStoresList().equals(other.getDataStoresList())) return false; + if (!getSpecList().equals(other.getSpecList())) 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 (getDataStoresCount() > 0) { + hash = (37 * hash) + DATA_STORES_FIELD_NUMBER; + hash = (53 * hash) + getDataStoresList().hashCode(); + } + if (getSpecCount() > 0) { + hash = (37 * hash) + SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpecList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs 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.cx.v3.BoostSpecs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs 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.cx.v3.BoostSpecs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs 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.cx.v3.BoostSpecs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs 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.cx.v3.BoostSpecs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs 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.cx.v3.BoostSpecs 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; + } + /** + * + * + *
+   * Boost specifications for data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BoostSpecs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BoostSpecs) + com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BoostSpecs.class, + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BoostSpecs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (specBuilder_ == null) { + spec_ = java.util.Collections.emptyList(); + } else { + spec_ = null; + specBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecs getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BoostSpecs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecs build() { + com.google.cloud.dialogflow.cx.v3.BoostSpecs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecs buildPartial() { + com.google.cloud.dialogflow.cx.v3.BoostSpecs result = + new com.google.cloud.dialogflow.cx.v3.BoostSpecs(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.BoostSpecs result) { + if (specBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + spec_ = java.util.Collections.unmodifiableList(spec_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.spec_ = spec_; + } else { + result.spec_ = specBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.BoostSpecs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + dataStores_.makeImmutable(); + result.dataStores_ = dataStores_; + } + } + + @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.cx.v3.BoostSpecs) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BoostSpecs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BoostSpecs other) { + if (other == com.google.cloud.dialogflow.cx.v3.BoostSpecs.getDefaultInstance()) return this; + if (!other.dataStores_.isEmpty()) { + if (dataStores_.isEmpty()) { + dataStores_ = other.dataStores_; + bitField0_ |= 0x00000001; + } else { + ensureDataStoresIsMutable(); + dataStores_.addAll(other.dataStores_); + } + onChanged(); + } + if (specBuilder_ == null) { + if (!other.spec_.isEmpty()) { + if (spec_.isEmpty()) { + spec_ = other.spec_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSpecIsMutable(); + spec_.addAll(other.spec_); + } + onChanged(); + } + } else { + if (!other.spec_.isEmpty()) { + if (specBuilder_.isEmpty()) { + specBuilder_.dispose(); + specBuilder_ = null; + spec_ = other.spec_; + bitField0_ = (bitField0_ & ~0x00000002); + specBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpecFieldBuilder() + : null; + } else { + specBuilder_.addAllMessages(other.spec_); + } + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataStoresIsMutable(); + dataStores_.add(s); + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3.BoostSpec m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.BoostSpec.parser(), extensionRegistry); + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(m); + } else { + specBuilder_.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 com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataStoresIsMutable() { + if (!dataStores_.isModifiable()) { + dataStores_ = new com.google.protobuf.LazyStringArrayList(dataStores_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + dataStores_.makeImmutable(); + return dataStores_; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The dataStores to set. + * @return This builder for chaining. + */ + public Builder setDataStores(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStores(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The dataStores to add. + * @return This builder for chaining. + */ + public Builder addAllDataStores(java.lang.Iterable values) { + ensureDataStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStores_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStores() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStoresBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List spec_ = + java.util.Collections.emptyList(); + + private void ensureSpecIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + spec_ = new java.util.ArrayList(spec_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder> + specBuilder_; + + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getSpecList() { + if (specBuilder_ == null) { + return java.util.Collections.unmodifiableList(spec_); + } else { + return specBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSpecCount() { + if (specBuilder_ == null) { + return spec_.size(); + } else { + return specBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec getSpec(int index) { + if (specBuilder_ == null) { + return spec_.get(index); + } else { + return specBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSpec(int index, com.google.cloud.dialogflow.cx.v3.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.set(index, value); + onChanged(); + } else { + specBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSpec( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.set(index, builderForValue.build()); + onChanged(); + } else { + specBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec(com.google.cloud.dialogflow.cx.v3.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.add(value); + onChanged(); + } else { + specBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec(int index, com.google.cloud.dialogflow.cx.v3.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.add(index, value); + onChanged(); + } else { + specBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec(com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(builderForValue.build()); + onChanged(); + } else { + specBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(index, builderForValue.build()); + onChanged(); + } else { + specBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSpec( + java.lang.Iterable values) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spec_); + onChanged(); + } else { + specBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSpec() { + if (specBuilder_ == null) { + spec_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + specBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSpec(int index) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.remove(index); + onChanged(); + } else { + specBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder getSpecBuilder(int index) { + return getSpecFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder getSpecOrBuilder(int index) { + if (specBuilder_ == null) { + return spec_.get(index); + } else { + return specBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSpecOrBuilderList() { + if (specBuilder_ != null) { + return specBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spec_); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder addSpecBuilder() { + return getSpecFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.BoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder addSpecBuilder(int index) { + return getSpecFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.BoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSpecBuilderList() { + return getSpecFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder> + getSpecFieldBuilder() { + if (specBuilder_ == null) { + specBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpec, + com.google.cloud.dialogflow.cx.v3.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder>( + spec_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + spec_ = null; + } + return specBuilder_; + } + + @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.cx.v3.BoostSpecs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BoostSpecs) + private static final com.google.cloud.dialogflow.cx.v3.BoostSpecs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BoostSpecs(); + } + + public static com.google.cloud.dialogflow.cx.v3.BoostSpecs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostSpecs 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.cx.v3.BoostSpecs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecsOrBuilder.java new file mode 100644 index 000000000000..1e55755a47b0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BoostSpecsOrBuilder.java @@ -0,0 +1,158 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BoostSpecsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BoostSpecs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + java.util.List getDataStoresList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + int getDataStoresCount(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + java.lang.String getDataStores(int index); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + com.google.protobuf.ByteString getDataStoresBytes(int index); + + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSpecList(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpec getSpec(int index); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSpecCount(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSpecOrBuilderList(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpecOrBuilder getSpecOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java index 09e9fdd6edef..50fe7b399985 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java @@ -119,33 +119,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\0132\032.google.protobuf.FieldMask\"e\n\027Delet" + "eEntityTypeRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A" + "&\n$dialogflow.googleapis.com/EntityType\022" - + "\r\n\005force\030\002 \001(\0102\207\t\n\013EntityTypes\022\313\001\n\017ListE" - + "ntityTypes\0225.google.cloud.dialogflow.cx." - + "v3.ListEntityTypesRequest\0326.google.cloud" - + ".dialogflow.cx.v3.ListEntityTypesRespons" - + "e\"I\332A\006parent\202\323\344\223\002:\0228/v3/{parent=projects" - + "/*/locations/*/agents/*}/entityTypes\022\270\001\n" - + "\rGetEntityType\0223.google.cloud.dialogflow" - + ".cx.v3.GetEntityTypeRequest\032).google.clo" - + "ud.dialogflow.cx.v3.EntityType\"G\332A\004name\202" - + "\323\344\223\002:\0228/v3/{name=projects/*/locations/*/" - + "agents/*/entityTypes/*}\022\331\001\n\020CreateEntity" - + "Type\0226.google.cloud.dialogflow.cx.v3.Cre" - + "ateEntityTypeRequest\032).google.cloud.dial" - + "ogflow.cx.v3.EntityType\"b\332A\022parent,entit" - + "y_type\202\323\344\223\002G\"8/v3/{parent=projects/*/loc" - + "ations/*/agents/*}/entityTypes:\013entity_t" - + "ype\022\352\001\n\020UpdateEntityType\0226.google.cloud." - + "dialogflow.cx.v3.UpdateEntityTypeRequest" - + "\032).google.cloud.dialogflow.cx.v3.EntityT" - + "ype\"s\332A\027entity_type,update_mask\202\323\344\223\002S2D/" - + "v3/{entity_type.name=projects/*/location" - + "s/*/agents/*/entityTypes/*}:\013entity_type" - + "\022\253\001\n\020DeleteEntityType\0226.google.cloud.dia" - + "logflow.cx.v3.DeleteEntityTypeRequest\032\026." - + "google.protobuf.Empty\"G\332A\004name\202\323\344\223\002:*8/v" - + "3/{name=projects/*/locations/*/agents/*/" - + "entityTypes/*}\032x\312A\031dialogflow.googleapis" + + "\r\n\005force\030\002 \001(\0102\207\t\n\013EntityTypes\022\270\001\n\rGetEn" + + "tityType\0223.google.cloud.dialogflow.cx.v3" + + ".GetEntityTypeRequest\032).google.cloud.dia" + + "logflow.cx.v3.EntityType\"G\332A\004name\202\323\344\223\002:\022" + + "8/v3/{name=projects/*/locations/*/agents" + + "/*/entityTypes/*}\022\331\001\n\020CreateEntityType\0226" + + ".google.cloud.dialogflow.cx.v3.CreateEnt" + + "ityTypeRequest\032).google.cloud.dialogflow" + + ".cx.v3.EntityType\"b\332A\022parent,entity_type" + + "\202\323\344\223\002G\"8/v3/{parent=projects/*/locations" + + "/*/agents/*}/entityTypes:\013entity_type\022\352\001" + + "\n\020UpdateEntityType\0226.google.cloud.dialog" + + "flow.cx.v3.UpdateEntityTypeRequest\032).goo" + + "gle.cloud.dialogflow.cx.v3.EntityType\"s\332" + + "A\027entity_type,update_mask\202\323\344\223\002S2D/v3/{en" + + "tity_type.name=projects/*/locations/*/ag" + + "ents/*/entityTypes/*}:\013entity_type\022\253\001\n\020D" + + "eleteEntityType\0226.google.cloud.dialogflo" + + "w.cx.v3.DeleteEntityTypeRequest\032\026.google" + + ".protobuf.Empty\"G\332A\004name\202\323\344\223\002:*8/v3/{nam" + + "e=projects/*/locations/*/agents/*/entity" + + "Types/*}\022\313\001\n\017ListEntityTypes\0225.google.cl" + + "oud.dialogflow.cx.v3.ListEntityTypesRequ" + + "est\0326.google.cloud.dialogflow.cx.v3.List" + + "EntityTypesResponse\"I\332A\006parent\202\323\344\223\002:\0228/v" + + "3/{parent=projects/*/locations/*/agents/" + + "*}/entityTypes\032x\312A\031dialogflow.googleapis" + ".com\322AYhttps://www.googleapis.com/auth/c" + "loud-platform,https://www.googleapis.com" + "/auth/dialogflowB\265\001\n!com.google.cloud.di" diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecs.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecs.java new file mode 100644 index 000000000000..9cc3d280ce19 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecs.java @@ -0,0 +1,979 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Filter specifications for data stores.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FilterSpecs} + */ +public final class FilterSpecs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.FilterSpecs) + FilterSpecsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FilterSpecs.newBuilder() to construct. + private FilterSpecs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FilterSpecs() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FilterSpecs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FilterSpecs.class, + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder.class); + } + + public static final int DATA_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + return dataStores_; + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 { + for (int i = 0; i < dataStores_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStores_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < dataStores_.size(); i++) { + dataSize += computeStringSizeNoTag(dataStores_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataStoresList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + 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.cx.v3.FilterSpecs)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.FilterSpecs other = + (com.google.cloud.dialogflow.cx.v3.FilterSpecs) obj; + + if (!getDataStoresList().equals(other.getDataStoresList())) return false; + if (!getFilter().equals(other.getFilter())) 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 (getDataStoresCount() > 0) { + hash = (37 * hash) + DATA_STORES_FIELD_NUMBER; + hash = (53 * hash) + getDataStoresList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs 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.cx.v3.FilterSpecs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs 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.cx.v3.FilterSpecs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs 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.cx.v3.FilterSpecs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs 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.cx.v3.FilterSpecs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs 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.cx.v3.FilterSpecs 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; + } + /** + * + * + *
+   * Filter specifications for data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FilterSpecs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.FilterSpecs) + com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FilterSpecs.class, + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.FilterSpecs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FilterSpecs getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.FilterSpecs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FilterSpecs build() { + com.google.cloud.dialogflow.cx.v3.FilterSpecs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FilterSpecs buildPartial() { + com.google.cloud.dialogflow.cx.v3.FilterSpecs result = + new com.google.cloud.dialogflow.cx.v3.FilterSpecs(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.FilterSpecs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + dataStores_.makeImmutable(); + result.dataStores_ = dataStores_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + } + + @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.cx.v3.FilterSpecs) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.FilterSpecs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.FilterSpecs other) { + if (other == com.google.cloud.dialogflow.cx.v3.FilterSpecs.getDefaultInstance()) return this; + if (!other.dataStores_.isEmpty()) { + if (dataStores_.isEmpty()) { + dataStores_ = other.dataStores_; + bitField0_ |= 0x00000001; + } else { + ensureDataStoresIsMutable(); + dataStores_.addAll(other.dataStores_); + } + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataStoresIsMutable(); + dataStores_.add(s); + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataStoresIsMutable() { + if (!dataStores_.isModifiable()) { + dataStores_ = new com.google.protobuf.LazyStringArrayList(dataStores_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + dataStores_.makeImmutable(); + return dataStores_; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The dataStores to set. + * @return This builder for chaining. + */ + public Builder setDataStores(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStores(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The dataStores to add. + * @return This builder for chaining. + */ + public Builder addAllDataStores(java.lang.Iterable values) { + ensureDataStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStores_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStores() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStoresBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = 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.cx.v3.FilterSpecs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.FilterSpecs) + private static final com.google.cloud.dialogflow.cx.v3.FilterSpecs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.FilterSpecs(); + } + + public static com.google.cloud.dialogflow.cx.v3.FilterSpecs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FilterSpecs 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.cx.v3.FilterSpecs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecsOrBuilder.java new file mode 100644 index 000000000000..f62d7dcbb5b1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FilterSpecsOrBuilder.java @@ -0,0 +1,125 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface FilterSpecsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.FilterSpecs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + java.util.List getDataStoresList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + int getDataStoresCount(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + java.lang.String getDataStores(int index); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + com.google.protobuf.ByteString getDataStoresBytes(int index); + + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java index fd1afdef97c8..83b0dcc9ceaa 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java @@ -380,6 +380,56 @@ public boolean getSingleUtterance() { return singleUtterance_; } + public static final int BARGE_IN_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.dialogflow.cx.v3.BargeInConfig bargeInConfig_; + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + @java.lang.Override + public boolean hasBargeInConfig() { + return bargeInConfig_ != null; + } + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BargeInConfig getBargeInConfig() { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfigOrBuilder() { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -418,6 +468,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableWordInfo_ != false) { output.writeBool(13, enableWordInfo_); } + if (bargeInConfig_ != null) { + output.writeMessage(15, getBargeInConfig()); + } getUnknownFields().writeTo(output); } @@ -456,6 +509,9 @@ public int getSerializedSize() { if (enableWordInfo_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableWordInfo_); } + if (bargeInConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBargeInConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -479,6 +535,10 @@ public boolean equals(final java.lang.Object obj) { if (!getModel().equals(other.getModel())) return false; if (modelVariant_ != other.modelVariant_) return false; if (getSingleUtterance() != other.getSingleUtterance()) return false; + if (hasBargeInConfig() != other.hasBargeInConfig()) return false; + if (hasBargeInConfig()) { + if (!getBargeInConfig().equals(other.getBargeInConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -506,6 +566,10 @@ public int hashCode() { hash = (53 * hash) + modelVariant_; hash = (37 * hash) + SINGLE_UTTERANCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSingleUtterance()); + if (hasBargeInConfig()) { + hash = (37 * hash) + BARGE_IN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBargeInConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -652,6 +716,11 @@ public Builder clear() { model_ = ""; modelVariant_ = 0; singleUtterance_ = false; + bargeInConfig_ = null; + if (bargeInConfigBuilder_ != null) { + bargeInConfigBuilder_.dispose(); + bargeInConfigBuilder_ = null; + } return this; } @@ -710,6 +779,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.InputAudioConfig re if (((from_bitField0_ & 0x00000040) != 0)) { result.singleUtterance_ = singleUtterance_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.bargeInConfig_ = + bargeInConfigBuilder_ == null ? bargeInConfig_ : bargeInConfigBuilder_.build(); + } } @java.lang.Override @@ -788,6 +861,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.InputAudioConfig othe if (other.getSingleUtterance() != false) { setSingleUtterance(other.getSingleUtterance()); } + if (other.hasBargeInConfig()) { + mergeBargeInConfig(other.getBargeInConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -857,6 +933,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 104 + case 122: + { + input.readMessage(getBargeInConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1685,6 +1767,191 @@ public Builder clearSingleUtterance() { return this; } + private com.google.cloud.dialogflow.cx.v3.BargeInConfig bargeInConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BargeInConfig, + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder> + bargeInConfigBuilder_; + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + public boolean hasBargeInConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + public com.google.cloud.dialogflow.cx.v3.BargeInConfig getBargeInConfig() { + if (bargeInConfigBuilder_ == null) { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } else { + return bargeInConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public Builder setBargeInConfig(com.google.cloud.dialogflow.cx.v3.BargeInConfig value) { + if (bargeInConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bargeInConfig_ = value; + } else { + bargeInConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public Builder setBargeInConfig( + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder builderForValue) { + if (bargeInConfigBuilder_ == null) { + bargeInConfig_ = builderForValue.build(); + } else { + bargeInConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public Builder mergeBargeInConfig(com.google.cloud.dialogflow.cx.v3.BargeInConfig value) { + if (bargeInConfigBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && bargeInConfig_ != null + && bargeInConfig_ + != com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance()) { + getBargeInConfigBuilder().mergeFrom(value); + } else { + bargeInConfig_ = value; + } + } else { + bargeInConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public Builder clearBargeInConfig() { + bitField0_ = (bitField0_ & ~0x00000080); + bargeInConfig_ = null; + if (bargeInConfigBuilder_ != null) { + bargeInConfigBuilder_.dispose(); + bargeInConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder getBargeInConfigBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getBargeInConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + public com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfigOrBuilder() { + if (bargeInConfigBuilder_ != null) { + return bargeInConfigBuilder_.getMessageOrBuilder(); + } else { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BargeInConfig, + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder> + getBargeInConfigFieldBuilder() { + if (bargeInConfigBuilder_ == null) { + bargeInConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BargeInConfig, + com.google.cloud.dialogflow.cx.v3.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder>( + getBargeInConfig(), getParentForChildren(), isClean()); + bargeInConfig_ = null; + } + return bargeInConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java index 4847bf7e798c..2c121e665ffa 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java @@ -261,4 +261,39 @@ public interface InputAudioConfigOrBuilder * @return The singleUtterance. */ boolean getSingleUtterance(); + + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + boolean hasBargeInConfig(); + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + com.google.cloud.dialogflow.cx.v3.BargeInConfig getBargeInConfig(); + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfigOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java index 4c4170ba00d7..77bdd0cbebb7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java @@ -922,6 +922,163 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { return sessionTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : sessionTtl_; } + public static final int END_USER_METADATA_FIELD_NUMBER = 18; + private com.google.protobuf.Struct endUserMetadata_; + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + @java.lang.Override + public boolean hasEndUserMetadata() { + return endUserMetadata_ != null; + } + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getEndUserMetadata() { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + + public static final int SEARCH_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.dialogflow.cx.v3.SearchConfig searchConfig_; + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + @java.lang.Override + public boolean hasSearchConfig() { + return searchConfig_ != null; + } + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SearchConfig getSearchConfig() { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance() + : searchConfig_; + } + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder getSearchConfigOrBuilder() { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance() + : searchConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -971,6 +1128,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sessionTtl_ != null) { output.writeMessage(16, getSessionTtl()); } + if (endUserMetadata_ != null) { + output.writeMessage(18, getEndUserMetadata()); + } + if (searchConfig_ != null) { + output.writeMessage(20, getSearchConfig()); + } getUnknownFields().writeTo(output); } @@ -1029,6 +1192,12 @@ public int getSerializedSize() { if (sessionTtl_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSessionTtl()); } + if (endUserMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEndUserMetadata()); + } + if (searchConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getSearchConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1069,6 +1238,14 @@ public boolean equals(final java.lang.Object obj) { if (hasSessionTtl()) { if (!getSessionTtl().equals(other.getSessionTtl())) return false; } + if (hasEndUserMetadata() != other.hasEndUserMetadata()) return false; + if (hasEndUserMetadata()) { + if (!getEndUserMetadata().equals(other.getEndUserMetadata())) return false; + } + if (hasSearchConfig() != other.hasSearchConfig()) return false; + if (hasSearchConfig()) { + if (!getSearchConfig().equals(other.getSearchConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1118,6 +1295,14 @@ public int hashCode() { hash = (37 * hash) + SESSION_TTL_FIELD_NUMBER; hash = (53 * hash) + getSessionTtl().hashCode(); } + if (hasEndUserMetadata()) { + hash = (37 * hash) + END_USER_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getEndUserMetadata().hashCode(); + } + if (hasSearchConfig()) { + hash = (37 * hash) + SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1311,6 +1496,16 @@ public Builder clear() { sessionTtlBuilder_.dispose(); sessionTtlBuilder_ = null; } + endUserMetadata_ = null; + if (endUserMetadataBuilder_ != null) { + endUserMetadataBuilder_.dispose(); + endUserMetadataBuilder_ = null; + } + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } return this; } @@ -1397,6 +1592,14 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryParameters res if (((from_bitField0_ & 0x00000800) != 0)) { result.sessionTtl_ = sessionTtlBuilder_ == null ? sessionTtl_ : sessionTtlBuilder_.build(); } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.endUserMetadata_ = + endUserMetadataBuilder_ == null ? endUserMetadata_ : endUserMetadataBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.searchConfig_ = + searchConfigBuilder_ == null ? searchConfig_ : searchConfigBuilder_.build(); + } } @java.lang.Override @@ -1517,6 +1720,12 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other if (other.hasSessionTtl()) { mergeSessionTtl(other.getSessionTtl()); } + if (other.hasEndUserMetadata()) { + mergeEndUserMetadata(other.getEndUserMetadata()); + } + if (other.hasSearchConfig()) { + mergeSearchConfig(other.getSearchConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1630,6 +1839,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 130 + case 146: + { + input.readMessage(getEndUserMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 146 + case 162: + { + input.readMessage(getSearchConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4112,6 +4333,554 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { return sessionTtlBuilder_; } + private com.google.protobuf.Struct endUserMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + endUserMetadataBuilder_; + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + public boolean hasEndUserMetadata() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + public com.google.protobuf.Struct getEndUserMetadata() { + if (endUserMetadataBuilder_ == null) { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } else { + return endUserMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserMetadata(com.google.protobuf.Struct value) { + if (endUserMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUserMetadata_ = value; + } else { + endUserMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (endUserMetadataBuilder_ == null) { + endUserMetadata_ = builderForValue.build(); + } else { + endUserMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) { + if (endUserMetadataBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && endUserMetadata_ != null + && endUserMetadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getEndUserMetadataBuilder().mergeFrom(value); + } else { + endUserMetadata_ = value; + } + } else { + endUserMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndUserMetadata() { + bitField0_ = (bitField0_ & ~0x00001000); + endUserMetadata_ = null; + if (endUserMetadataBuilder_ != null) { + endUserMetadataBuilder_.dispose(); + endUserMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getEndUserMetadataBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getEndUserMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { + if (endUserMetadataBuilder_ != null) { + return endUserMetadataBuilder_.getMessageOrBuilder(); + } else { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getEndUserMetadataFieldBuilder() { + if (endUserMetadataBuilder_ == null) { + endUserMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getEndUserMetadata(), getParentForChildren(), isClean()); + endUserMetadata_ = null; + } + return endUserMetadataBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.SearchConfig searchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SearchConfig, + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder> + searchConfigBuilder_; + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + public boolean hasSearchConfig() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + public com.google.cloud.dialogflow.cx.v3.SearchConfig getSearchConfig() { + if (searchConfigBuilder_ == null) { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance() + : searchConfig_; + } else { + return searchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchConfig_ = value; + } else { + searchConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSearchConfig( + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder builderForValue) { + if (searchConfigBuilder_ == null) { + searchConfig_ = builderForValue.build(); + } else { + searchConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && searchConfig_ != null + && searchConfig_ + != com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance()) { + getSearchConfigBuilder().mergeFrom(value); + } else { + searchConfig_ = value; + } + } else { + searchConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSearchConfig() { + bitField0_ = (bitField0_ & ~0x00002000); + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder getSearchConfigBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getSearchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder getSearchConfigOrBuilder() { + if (searchConfigBuilder_ != null) { + return searchConfigBuilder_.getMessageOrBuilder(); + } else { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance() + : searchConfig_; + } + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SearchConfig, + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder> + getSearchConfigFieldBuilder() { + if (searchConfigBuilder_ == null) { + searchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SearchConfig, + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder>( + getSearchConfig(), getParentForChildren(), isClean()); + searchConfig_ = null; + } + return searchConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java index 7ddae4b8c364..39293d9d73b7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java @@ -663,4 +663,131 @@ java.lang.String getWebhookHeadersOrDefault( * */ com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder(); + + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + boolean hasEndUserMetadata(); + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + com.google.protobuf.Struct getEndUserMetadata(); + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + boolean hasSearchConfig(); + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + com.google.cloud.dialogflow.cx.v3.SearchConfig getSearchConfig(); + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder getSearchConfigOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java index ccb4f05a2747..e0ab3882fe8d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java @@ -939,7 +939,7 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return Whether the intent field is set. */ @java.lang.Override @@ -962,7 +962,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return The intent. */ @java.lang.Override @@ -1014,7 +1014,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=738 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1293,6 +1293,25 @@ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings getAdvancedSettings() : advancedSettings_; } + public static final int ALLOW_ANSWER_FEEDBACK_FIELD_NUMBER = 32; + private boolean allowAnswerFeedback_ = false; + /** + * + * + *
+   * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+   * shown for the response in the Dialogflow Messenger widget.
+   * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + @java.lang.Override + public boolean getAllowAnswerFeedback() { + return allowAnswerFeedback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1358,6 +1377,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } + if (allowAnswerFeedback_ != false) { + output.writeBool(32, allowAnswerFeedback_); + } getUnknownFields().writeTo(output); } @@ -1422,6 +1444,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } + if (allowAnswerFeedback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(32, allowAnswerFeedback_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1472,6 +1497,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAdvancedSettings()) { if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; } + if (getAllowAnswerFeedback() != other.getAllowAnswerFeedback()) return false; if (!getQueryCase().equals(other.getQueryCase())) return false; switch (queryCase_) { case 1: @@ -1547,6 +1573,8 @@ public int hashCode() { hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getAdvancedSettings().hashCode(); } + hash = (37 * hash) + ALLOW_ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowAnswerFeedback()); switch (queryCase_) { case 1: hash = (37 * hash) + TEXT_FIELD_NUMBER; @@ -1771,6 +1799,7 @@ public Builder clear() { advancedSettingsBuilder_.dispose(); advancedSettingsBuilder_ = null; } + allowAnswerFeedback_ = false; queryCase_ = 0; query_ = null; return this; @@ -1874,6 +1903,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryResult result) result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.allowAnswerFeedback_ = allowAnswerFeedback_; + } } private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.QueryResult result) { @@ -2039,6 +2071,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { if (other.hasAdvancedSettings()) { mergeAdvancedSettings(other.getAdvancedSettings()); } + if (other.getAllowAnswerFeedback() != false) { + setAllowAnswerFeedback(other.getAllowAnswerFeedback()); + } switch (other.getQueryCase()) { case TEXT: { @@ -2232,6 +2267,12 @@ public Builder mergeFrom( queryCase_ = 23; break; } // case 186 + case 256: + { + allowAnswerFeedback_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 256 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4865,7 +4906,7 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -4887,7 +4928,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return The intent. */ @java.lang.Deprecated @@ -5103,7 +5144,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=738 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5129,7 +5170,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=738 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5159,7 +5200,7 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=738 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 * @return This builder for chaining. */ @java.lang.Deprecated @@ -6127,6 +6168,62 @@ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSet return advancedSettingsBuilder_; } + private boolean allowAnswerFeedback_; + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + @java.lang.Override + public boolean getAllowAnswerFeedback() { + return allowAnswerFeedback_; + } + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @param value The allowAnswerFeedback to set. + * @return This builder for chaining. + */ + public Builder setAllowAnswerFeedback(boolean value) { + + allowAnswerFeedback_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @return This builder for chaining. + */ + public Builder clearAllowAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00020000); + allowAnswerFeedback_ = 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-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java index 2f699cfa5b81..ead9f1489074 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java @@ -577,7 +577,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -597,7 +597,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=727 + * google/cloud/dialogflow/cx/v3/session.proto;l=919 * @return The intent. */ @java.lang.Deprecated @@ -637,7 +637,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=738 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 * @return The intentDetectionConfidence. */ @java.lang.Deprecated @@ -856,5 +856,19 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr */ com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + /** + * + * + *
+   * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+   * shown for the response in the Dialogflow Messenger widget.
+   * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + boolean getAllowAnswerFeedback(); + com.google.cloud.dialogflow.cx.v3.QueryResult.QueryCase getQueryCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfig.java new file mode 100644 index 000000000000..1cd75173521f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfig.java @@ -0,0 +1,1518 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Search configuration for UCS search queries.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SearchConfig} + */ +public final class SearchConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SearchConfig) + SearchConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchConfig.newBuilder() to construct. + private SearchConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchConfig() { + boostSpecs_ = java.util.Collections.emptyList(); + filterSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SearchConfig.class, + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder.class); + } + + public static final int BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List boostSpecs_; + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBoostSpecsList() { + return boostSpecs_; + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBoostSpecsOrBuilderList() { + return boostSpecs_; + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBoostSpecsCount() { + return boostSpecs_.size(); + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecs getBoostSpecs(int index) { + return boostSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder getBoostSpecsOrBuilder(int index) { + return boostSpecs_.get(index); + } + + public static final int FILTER_SPECS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List filterSpecs_; + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFilterSpecsList() { + return filterSpecs_; + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFilterSpecsOrBuilderList() { + return filterSpecs_; + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFilterSpecsCount() { + return filterSpecs_.size(); + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FilterSpecs getFilterSpecs(int index) { + return filterSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder getFilterSpecsOrBuilder(int index) { + return filterSpecs_.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 < boostSpecs_.size(); i++) { + output.writeMessage(1, boostSpecs_.get(i)); + } + for (int i = 0; i < filterSpecs_.size(); i++) { + output.writeMessage(2, filterSpecs_.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 < boostSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, boostSpecs_.get(i)); + } + for (int i = 0; i < filterSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, filterSpecs_.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.cx.v3.SearchConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SearchConfig other = + (com.google.cloud.dialogflow.cx.v3.SearchConfig) obj; + + if (!getBoostSpecsList().equals(other.getBoostSpecsList())) return false; + if (!getFilterSpecsList().equals(other.getFilterSpecsList())) 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 (getBoostSpecsCount() > 0) { + hash = (37 * hash) + BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpecsList().hashCode(); + } + if (getFilterSpecsCount() > 0) { + hash = (37 * hash) + FILTER_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getFilterSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig 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; + } + /** + * + * + *
+   * Search configuration for UCS search queries.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SearchConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SearchConfig) + com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SearchConfig.class, + com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SearchConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (boostSpecsBuilder_ == null) { + boostSpecs_ = java.util.Collections.emptyList(); + } else { + boostSpecs_ = null; + boostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (filterSpecsBuilder_ == null) { + filterSpecs_ = java.util.Collections.emptyList(); + } else { + filterSpecs_ = null; + filterSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SearchConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SearchConfig build() { + com.google.cloud.dialogflow.cx.v3.SearchConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SearchConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.SearchConfig result = + new com.google.cloud.dialogflow.cx.v3.SearchConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.SearchConfig result) { + if (boostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boostSpecs_ = java.util.Collections.unmodifiableList(boostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boostSpecs_ = boostSpecs_; + } else { + result.boostSpecs_ = boostSpecsBuilder_.build(); + } + if (filterSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + filterSpecs_ = java.util.Collections.unmodifiableList(filterSpecs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.filterSpecs_ = filterSpecs_; + } else { + result.filterSpecs_ = filterSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SearchConfig 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.cx.v3.SearchConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SearchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SearchConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance()) return this; + if (boostSpecsBuilder_ == null) { + if (!other.boostSpecs_.isEmpty()) { + if (boostSpecs_.isEmpty()) { + boostSpecs_ = other.boostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoostSpecsIsMutable(); + boostSpecs_.addAll(other.boostSpecs_); + } + onChanged(); + } + } else { + if (!other.boostSpecs_.isEmpty()) { + if (boostSpecsBuilder_.isEmpty()) { + boostSpecsBuilder_.dispose(); + boostSpecsBuilder_ = null; + boostSpecs_ = other.boostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + boostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBoostSpecsFieldBuilder() + : null; + } else { + boostSpecsBuilder_.addAllMessages(other.boostSpecs_); + } + } + } + if (filterSpecsBuilder_ == null) { + if (!other.filterSpecs_.isEmpty()) { + if (filterSpecs_.isEmpty()) { + filterSpecs_ = other.filterSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFilterSpecsIsMutable(); + filterSpecs_.addAll(other.filterSpecs_); + } + onChanged(); + } + } else { + if (!other.filterSpecs_.isEmpty()) { + if (filterSpecsBuilder_.isEmpty()) { + filterSpecsBuilder_.dispose(); + filterSpecsBuilder_ = null; + filterSpecs_ = other.filterSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + filterSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilterSpecsFieldBuilder() + : null; + } else { + filterSpecsBuilder_.addAllMessages(other.filterSpecs_); + } + } + } + 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: + { + com.google.cloud.dialogflow.cx.v3.BoostSpecs m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.BoostSpecs.parser(), extensionRegistry); + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(m); + } else { + boostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3.FilterSpecs m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.FilterSpecs.parser(), extensionRegistry); + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(m); + } else { + filterSpecsBuilder_.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 boostSpecs_ = + java.util.Collections.emptyList(); + + private void ensureBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boostSpecs_ = + new java.util.ArrayList(boostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpecs, + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder> + boostSpecsBuilder_; + + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getBoostSpecsList() { + if (boostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(boostSpecs_); + } else { + return boostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBoostSpecsCount() { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.size(); + } else { + return boostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecs getBoostSpecs(int index) { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.get(index); + } else { + return boostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoostSpecs(int index, com.google.cloud.dialogflow.cx.v3.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.set(index, value); + onChanged(); + } else { + boostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs(com.google.cloud.dialogflow.cx.v3.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.add(value); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs(int index, com.google.cloud.dialogflow.cx.v3.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.add(index, value); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs( + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBoostSpecs( + java.lang.Iterable values) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boostSpecs_); + onChanged(); + } else { + boostSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBoostSpecs() { + if (boostSpecsBuilder_ == null) { + boostSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boostSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBoostSpecs(int index) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.remove(index); + onChanged(); + } else { + boostSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder getBoostSpecsBuilder(int index) { + return getBoostSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder getBoostSpecsOrBuilder(int index) { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.get(index); + } else { + return boostSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBoostSpecsOrBuilderList() { + if (boostSpecsBuilder_ != null) { + return boostSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boostSpecs_); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder addBoostSpecsBuilder() { + return getBoostSpecsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.BoostSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder addBoostSpecsBuilder(int index) { + return getBoostSpecsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.BoostSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBoostSpecsBuilderList() { + return getBoostSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpecs, + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder> + getBoostSpecsFieldBuilder() { + if (boostSpecsBuilder_ == null) { + boostSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.BoostSpecs, + com.google.cloud.dialogflow.cx.v3.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder>( + boostSpecs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + boostSpecs_ = null; + } + return boostSpecsBuilder_; + } + + private java.util.List filterSpecs_ = + java.util.Collections.emptyList(); + + private void ensureFilterSpecsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + filterSpecs_ = + new java.util.ArrayList(filterSpecs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FilterSpecs, + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder> + filterSpecsBuilder_; + + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFilterSpecsList() { + if (filterSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(filterSpecs_); + } else { + return filterSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFilterSpecsCount() { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.size(); + } else { + return filterSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FilterSpecs getFilterSpecs(int index) { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.get(index); + } else { + return filterSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilterSpecs(int index, com.google.cloud.dialogflow.cx.v3.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.set(index, value); + onChanged(); + } else { + filterSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs(com.google.cloud.dialogflow.cx.v3.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.add(value); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs(int index, com.google.cloud.dialogflow.cx.v3.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.add(index, value); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs( + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFilterSpecs( + java.lang.Iterable values) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filterSpecs_); + onChanged(); + } else { + filterSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFilterSpecs() { + if (filterSpecsBuilder_ == null) { + filterSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + filterSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFilterSpecs(int index) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.remove(index); + onChanged(); + } else { + filterSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder getFilterSpecsBuilder(int index) { + return getFilterSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder getFilterSpecsOrBuilder( + int index) { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.get(index); + } else { + return filterSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFilterSpecsOrBuilderList() { + if (filterSpecsBuilder_ != null) { + return filterSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filterSpecs_); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder addFilterSpecsBuilder() { + return getFilterSpecsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.FilterSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder addFilterSpecsBuilder(int index) { + return getFilterSpecsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.FilterSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFilterSpecsBuilderList() { + return getFilterSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FilterSpecs, + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder> + getFilterSpecsFieldBuilder() { + if (filterSpecsBuilder_ == null) { + filterSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FilterSpecs, + com.google.cloud.dialogflow.cx.v3.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder>( + filterSpecs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + filterSpecs_ = null; + } + return filterSpecsBuilder_; + } + + @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.cx.v3.SearchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SearchConfig) + private static final com.google.cloud.dialogflow.cx.v3.SearchConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.SearchConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.SearchConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchConfig 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.cx.v3.SearchConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfigOrBuilder.java new file mode 100644 index 000000000000..152c13ba595c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SearchConfigOrBuilder.java @@ -0,0 +1,149 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface SearchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SearchConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBoostSpecsList(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpecs getBoostSpecs(int index); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBoostSpecsCount(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBoostSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.BoostSpecsOrBuilder getBoostSpecsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFilterSpecsList(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.FilterSpecs getFilterSpecs(int index); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFilterSpecsCount(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFilterSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.FilterSpecsOrBuilder getFilterSpecsOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index aded42427159..74491e9e40be 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -27,6 +27,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -59,6 +71,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_WebhookHeadersEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_WebhookHeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_QueryInput_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -133,208 +165,254 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "logflow/cx/v3/response_message.proto\0327go" + "ogle/cloud/dialogflow/cx/v3/session_enti" + "ty_type.proto\032\036google/protobuf/duration." - + "proto\032\034google/protobuf/struct.proto\032\027goo" - + "gle/rpc/status.proto\032\030google/type/latlng" - + ".proto\"\255\002\n\023DetectIntentRequest\022;\n\007sessio" - + "n\030\001 \001(\tB*\342A\001\002\372A#\n!dialogflow.googleapis." - + "com/Session\022D\n\014query_params\030\002 \001(\0132..goog" - + "le.cloud.dialogflow.cx.v3.QueryParameter" - + "s\022D\n\013query_input\030\003 \001(\0132).google.cloud.di" - + "alogflow.cx.v3.QueryInputB\004\342A\001\002\022M\n\023outpu" - + "t_audio_config\030\004 \001(\01320.google.cloud.dial" - + "ogflow.cx.v3.OutputAudioConfig\"\216\003\n\024Detec" - + "tIntentResponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014" - + "query_result\030\002 \001(\0132*.google.cloud.dialog" - + "flow.cx.v3.QueryResult\022\024\n\014output_audio\030\004" - + " \001(\014\022M\n\023output_audio_config\030\005 \001(\01320.goog" - + "le.cloud.dialogflow.cx.v3.OutputAudioCon" - + "fig\022W\n\rresponse_type\030\006 \001(\0162@.google.clou" - + "d.dialogflow.cx.v3.DetectIntentResponse." - + "ResponseType\022\032\n\022allow_cancellation\030\007 \001(\010" - + "\"E\n\014ResponseType\022\035\n\031RESPONSE_TYPE_UNSPEC" - + "IFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FINAL\020\002\"\362\002\n\034Stre" - + "amingDetectIntentRequest\0227\n\007session\030\001 \001(" - + "\tB&\372A#\n!dialogflow.googleapis.com/Sessio" - + "n\022D\n\014query_params\030\002 \001(\0132..google.cloud.d" - + "ialogflow.cx.v3.QueryParameters\022D\n\013query" - + "_input\030\003 \001(\0132).google.cloud.dialogflow.c" - + "x.v3.QueryInputB\004\342A\001\002\022M\n\023output_audio_co" - + "nfig\030\004 \001(\01320.google.cloud.dialogflow.cx." - + "v3.OutputAudioConfig\022\037\n\027enable_partial_r" - + "esponse\030\005 \001(\010\022\035\n\025enable_debugging_info\030\010" - + " \001(\010\"\260\007\n\036CloudConversationDebuggingInfo\022" - + "\031\n\021audio_data_chunks\030\001 \001(\005\0229\n\026result_end" - + "_time_offset\030\002 \001(\0132\031.google.protobuf.Dur" - + "ation\0227\n\024first_audio_duration\030\003 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\030\n\020single_utteran" - + "ce\030\005 \001(\010\022C\n speech_partial_results_end_t" - + "imes\030\006 \003(\0132\031.google.protobuf.Duration\022A\n" - + "\036speech_final_results_end_times\030\007 \003(\0132\031." - + "google.protobuf.Duration\022\031\n\021partial_resp" - + "onses\030\010 \001(\005\022,\n$speaker_id_passive_latenc" - + "y_ms_offset\030\t \001(\005\022\037\n\027bargein_event_trigg" - + "ered\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.google.protobuf.D" - + "uration\022C\n single_utterance_end_time_off" - + "set\030\016 \001(\0132\031.google.protobuf.Duration\0224\n\021" - + "no_speech_timeout\030\017 \001(\0132\031.google.protobu" - + "f.Duration\0226\n\023endpointing_timeout\030\023 \001(\0132" - + "\031.google.protobuf.Duration\022\025\n\ris_input_t" - + "ext\030\020 \001(\010\022@\n\035client_half_close_time_offs" - + "et\030\021 \001(\0132\031.google.protobuf.Duration\022J\n\'c" - + "lient_half_close_streaming_time_offset\030\022" - + " \001(\0132\031.google.protobuf.Duration\"\262\002\n\035Stre" - + "amingDetectIntentResponse\022W\n\022recognition" - + "_result\030\001 \001(\01329.google.cloud.dialogflow." - + "cx.v3.StreamingRecognitionResultH\000\022U\n\026de" - + "tect_intent_response\030\002 \001(\01323.google.clou" - + "d.dialogflow.cx.v3.DetectIntentResponseH" - + "\000\022U\n\016debugging_info\030\004 \001(\0132=.google.cloud" - + ".dialogflow.cx.v3.CloudConversationDebug" - + "gingInfoB\n\n\010response\"\266\003\n\032StreamingRecogn" - + "itionResult\022[\n\014message_type\030\001 \001(\0162E.goog" - + "le.cloud.dialogflow.cx.v3.StreamingRecog" - + "nitionResult.MessageType\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\022G\n\020speech_word_inf" - + "o\030\007 \003(\0132-.google.cloud.dialogflow.cx.v3." - + "SpeechWordInfo\0224\n\021speech_end_offset\030\010 \001(" - + "\0132\031.google.protobuf.Duration\022\025\n\rlanguage" - + "_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TY" - + "PE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_" - + "OF_SINGLE_UTTERANCE\020\002\"\212\005\n\017QueryParameter" - + "s\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001" - + "(\0132\023.google.type.LatLng\022N\n\024session_entit" - + "y_types\030\003 \003(\01320.google.cloud.dialogflow." - + "cx.v3.SessionEntityType\022(\n\007payload\030\004 \001(\013" - + "2\027.google.protobuf.Struct\022+\n\nparameters\030" - + "\005 \001(\0132\027.google.protobuf.Struct\0229\n\014curren" - + "t_page\030\006 \001(\tB#\372A \n\036dialogflow.googleapis" - + ".com/Page\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034an" - + "alyze_query_text_sentiment\030\010 \001(\010\022[\n\017webh" - + "ook_headers\030\n \003(\0132B.google.cloud.dialogf" - + "low.cx.v3.QueryParameters.WebhookHeaders" - + "Entry\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!dialo" - + "gflow.googleapis.com/Version\022\017\n\007channel\030" - + "\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.google.prot" - + "obuf.DurationB\004\342A\001\001\0325\n\023WebhookHeadersEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\334\002\n\nQ" - + "ueryInput\0228\n\004text\030\002 \001(\0132(.google.cloud.d" - + "ialogflow.cx.v3.TextInputH\000\022<\n\006intent\030\003 " - + "\001(\0132*.google.cloud.dialogflow.cx.v3.Inte" - + "ntInputH\000\022:\n\005audio\030\005 \001(\0132).google.cloud." - + "dialogflow.cx.v3.AudioInputH\000\022:\n\005event\030\006" - + " \001(\0132).google.cloud.dialogflow.cx.v3.Eve" - + "ntInputH\000\0228\n\004dtmf\030\007 \001(\0132(.google.cloud.d" - + "ialogflow.cx.v3.DtmfInputH\000\022\033\n\rlanguage_" - + "code\030\004 \001(\tB\004\342A\001\002B\007\n\005input\"\355\006\n\013QueryResul" - + "t\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030\013 \001(" - + "\tB%\372A\"\n dialogflow.googleapis.com/Intent" - + "H\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger_even" - + "t\030\016 \001(\tH\000\0228\n\004dtmf\030\027 \001(\0132(.google.cloud.d" - + "ialogflow.cx.v3.DtmfInputH\000\022\025\n\rlanguage_" - + "code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132\027.google." - + "protobuf.Struct\022I\n\021response_messages\030\004 \003" - + "(\0132..google.cloud.dialogflow.cx.v3.Respo" - + "nseMessage\022,\n\020webhook_statuses\030\r \003(\0132\022.g" - + "oogle.rpc.Status\0221\n\020webhook_payloads\030\006 \003" - + "(\0132\027.google.protobuf.Struct\0229\n\014current_p" - + "age\030\007 \001(\0132#.google.cloud.dialogflow.cx.v" - + "3.Page\0229\n\006intent\030\010 \001(\0132%.google.cloud.di" - + "alogflow.cx.v3.IntentB\002\030\001\022\'\n\033intent_dete" - + "ction_confidence\030\t \001(\002B\002\030\001\0223\n\005match\030\017 \001(" - + "\0132$.google.cloud.dialogflow.cx.v3.Match\022" - + "0\n\017diagnostic_info\030\n \001(\0132\027.google.protob" - + "uf.Struct\022Y\n\031sentiment_analysis_result\030\021" - + " \001(\01326.google.cloud.dialogflow.cx.v3.Sen" - + "timentAnalysisResult\022J\n\021advanced_setting" - + "s\030\025 \001(\0132/.google.cloud.dialogflow.cx.v3." - + "AdvancedSettingsB\007\n\005query\"\037\n\tTextInput\022\022" - + "\n\004text\030\001 \001(\tB\004\342A\001\002\"H\n\013IntentInput\0229\n\006int" - + "ent\030\001 \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapi" - + "s.com/Intent\"b\n\nAudioInput\022E\n\006config\030\001 \001" - + "(\0132/.google.cloud.dialogflow.cx.v3.Input" - + "AudioConfigB\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEven" - + "tInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006di" - + "gits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002\n\005Mat" - + "ch\0225\n\006intent\030\001 \001(\0132%.google.cloud.dialog" - + "flow.cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n\npara" - + "meters\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n" - + "\016resolved_input\030\003 \001(\t\022B\n\nmatch_type\030\004 \001(" - + "\0162..google.cloud.dialogflow.cx.v3.Match." - + "MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchT" - + "ype\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" - + "T\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILL" - + "ING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVE" - + "NT\020\006\"\200\002\n\022MatchIntentRequest\022;\n\007session\030\001" - + " \001(\tB*\342A\001\002\372A#\n!dialogflow.googleapis.com" - + "/Session\022D\n\014query_params\030\002 \001(\0132..google." - + "cloud.dialogflow.cx.v3.QueryParameters\022D" - + "\n\013query_input\030\003 \001(\0132).google.cloud.dialo" - + "gflow.cx.v3.QueryInputB\004\342A\001\002\022!\n\031persist_" - + "parameter_changes\030\005 \001(\010\"\220\002\n\023MatchIntentR" - + "esponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_inten" - + "t\030\002 \001(\tB%\372A\"\n dialogflow.googleapis.com/" - + "IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigge" - + "r_event\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\0132$.googl" - + "e.cloud.dialogflow.cx.v3.Match\0229\n\014curren" - + "t_page\030\005 \001(\0132#.google.cloud.dialogflow.c" - + "x.v3.PageB\007\n\005query\"\353\001\n\024FulfillIntentRequ" - + "est\022O\n\024match_intent_request\030\001 \001(\01321.goog" - + "le.cloud.dialogflow.cx.v3.MatchIntentReq" - + "uest\0223\n\005match\030\002 \001(\0132$.google.cloud.dialo" - + "gflow.cx.v3.Match\022M\n\023output_audio_config" - + "\030\003 \001(\01320.google.cloud.dialogflow.cx.v3.O" - + "utputAudioConfig\"\323\001\n\025FulfillIntentRespon" - + "se\022\023\n\013response_id\030\001 \001(\t\022@\n\014query_result\030" - + "\002 \001(\0132*.google.cloud.dialogflow.cx.v3.Qu" - + "eryResult\022\024\n\014output_audio\030\003 \001(\014\022M\n\023outpu" - + "t_audio_config\030\004 \001(\01320.google.cloud.dial" - + "ogflow.cx.v3.OutputAudioConfig\";\n\027Sentim" - + "entAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagn" - + "itude\030\002 \001(\0022\304\t\n\010Sessions\022\246\002\n\014DetectInten" - + "t\0222.google.cloud.dialogflow.cx.v3.Detect" - + "IntentRequest\0323.google.cloud.dialogflow." - + "cx.v3.DetectIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v" - + "3/{session=projects/*/locations/*/agents" - + "/*/sessions/*}:detectIntent:\001*ZY\"T/v3/{s" - + "ession=projects/*/locations/*/agents/*/e" - + "nvironments/*/sessions/*}:detectIntent:\001" - + "*\022\230\001\n\025StreamingDetectIntent\022;.google.clo" - + "ud.dialogflow.cx.v3.StreamingDetectInten" - + "tRequest\032<.google.cloud.dialogflow.cx.v3" - + ".StreamingDetectIntentResponse\"\000(\0010\001\022\241\002\n" - + "\013MatchIntent\0221.google.cloud.dialogflow.c" - + "x.v3.MatchIntentRequest\0322.google.cloud.d" - + "ialogflow.cx.v3.MatchIntentResponse\"\252\001\202\323" - + "\344\223\002\243\001\"D/v3/{session=projects/*/locations" - + "/*/agents/*/sessions/*}:matchIntent:\001*ZX" - + "\"S/v3/{session=projects/*/locations/*/ag" - + "ents/*/environments/*/sessions/*}:matchI" - + "ntent:\001*\022\325\002\n\rFulfillIntent\0223.google.clou" - + "d.dialogflow.cx.v3.FulfillIntentRequest\032" - + "4.google.cloud.dialogflow.cx.v3.FulfillI" - + "ntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_inte" - + "nt_request.session=projects/*/locations/" - + "*/agents/*/sessions/*}:fulfillIntent:\001*Z" - + "o\"j/v3/{match_intent_request.session=pro" - + "jects/*/locations/*/agents/*/environment" - + "s/*/sessions/*}:fulfillIntent:\001*\032x\312A\031dia" - + "logflow.googleapis.com\322AYhttps://www.goo" - + "gleapis.com/auth/cloud-platform,https://" - + "www.googleapis.com/auth/dialogflowB\212\003\n!c" - + "om.google.cloud.dialogflow.cx.v3B\014Sessio" - + "nProtoP\001Z1cloud.google.com/go/dialogflow" - + "/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Clo" - + "ud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dia" - + "logflow::CX::V3\352A\324\001\n!dialogflow.googleap" - + "is.com/Session\022Iprojects/{project}/locat" - + "ions/{location}/agents/{agent}/sessions/" - + "{session}\022dprojects/{project}/locations/" - + "{location}/agents/{agent}/environments/{" - + "environment}/sessions/{session}b\006proto3" + + "proto\032 google/protobuf/field_mask.proto\032" + + "\034google/protobuf/struct.proto\032\027google/rp" + + "c/status.proto\032\030google/type/latlng.proto" + + "\"\331\002\n\016AnswerFeedback\022J\n\006rating\030\001 \001(\01624.go" + + "ogle.cloud.dialogflow.cx.v3.AnswerFeedba" + + "ck.RatingB\004\342A\001\001\022W\n\rrating_reason\030\002 \001(\0132:" + + ".google.cloud.dialogflow.cx.v3.AnswerFee" + + "dback.RatingReasonB\004\342A\001\001\022\033\n\rcustom_ratin" + + "g\030\003 \001(\tB\004\342A\001\001\032C\n\014RatingReason\022\033\n\rreason_" + + "labels\030\003 \003(\tB\004\342A\001\001\022\026\n\010feedback\030\002 \001(\tB\004\342A" + + "\001\001\"@\n\006Rating\022\026\n\022RATING_UNSPECIFIED\020\000\022\r\n\t" + + "THUMBS_UP\020\001\022\017\n\013THUMBS_DOWN\020\002\"\372\001\n\033SubmitA" + + "nswerFeedbackRequest\022;\n\007session\030\001 \001(\tB*\342" + + "A\001\002\372A#\n!dialogflow.googleapis.com/Sessio" + + "n\022\031\n\013response_id\030\002 \001(\tB\004\342A\001\002\022L\n\017answer_f" + + "eedback\030\003 \001(\0132-.google.cloud.dialogflow." + + "cx.v3.AnswerFeedbackB\004\342A\001\002\0225\n\013update_mas" + + "k\030\004 \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001" + + "\001\"\255\002\n\023DetectIntentRequest\022;\n\007session\030\001 \001" + + "(\tB*\342A\001\002\372A#\n!dialogflow.googleapis.com/S" + + "ession\022D\n\014query_params\030\002 \001(\0132..google.cl" + + "oud.dialogflow.cx.v3.QueryParameters\022D\n\013" + + "query_input\030\003 \001(\0132).google.cloud.dialogf" + + "low.cx.v3.QueryInputB\004\342A\001\002\022M\n\023output_aud" + + "io_config\030\004 \001(\01320.google.cloud.dialogflo" + + "w.cx.v3.OutputAudioConfig\"\216\003\n\024DetectInte" + + "ntResponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014query" + + "_result\030\002 \001(\0132*.google.cloud.dialogflow." + + "cx.v3.QueryResult\022\024\n\014output_audio\030\004 \001(\014\022" + + "M\n\023output_audio_config\030\005 \001(\01320.google.cl" + + "oud.dialogflow.cx.v3.OutputAudioConfig\022W" + + "\n\rresponse_type\030\006 \001(\0162@.google.cloud.dia" + + "logflow.cx.v3.DetectIntentResponse.Respo" + + "nseType\022\032\n\022allow_cancellation\030\007 \001(\010\"E\n\014R" + + "esponseType\022\035\n\031RESPONSE_TYPE_UNSPECIFIED" + + "\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FINAL\020\002\"\362\002\n\034Streaming" + + "DetectIntentRequest\0227\n\007session\030\001 \001(\tB&\372A" + + "#\n!dialogflow.googleapis.com/Session\022D\n\014" + + "query_params\030\002 \001(\0132..google.cloud.dialog" + + "flow.cx.v3.QueryParameters\022D\n\013query_inpu" + + "t\030\003 \001(\0132).google.cloud.dialogflow.cx.v3." + + "QueryInputB\004\342A\001\002\022M\n\023output_audio_config\030" + + "\004 \001(\01320.google.cloud.dialogflow.cx.v3.Ou" + + "tputAudioConfig\022\037\n\027enable_partial_respon" + + "se\030\005 \001(\010\022\035\n\025enable_debugging_info\030\010 \001(\010\"" + + "\260\007\n\036CloudConversationDebuggingInfo\022\031\n\021au" + + "dio_data_chunks\030\001 \001(\005\0229\n\026result_end_time" + + "_offset\030\002 \001(\0132\031.google.protobuf.Duration" + + "\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\036spee" + + "ch_final_results_end_times\030\007 \003(\0132\031.googl" + + "e.protobuf.Duration\022\031\n\021partial_responses" + + "\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.goo" + + "gle.protobuf.Duration\022;\n\030dtmf_final_resu" + + "lts_times\030\r \003(\0132\031.google.protobuf.Durati" + + "on\022C\n single_utterance_end_time_offset\030\016" + + " \001(\0132\031.google.protobuf.Duration\0224\n\021no_sp" + + "eech_timeout\030\017 \001(\0132\031.google.protobuf.Dur" + + "ation\0226\n\023endpointing_timeout\030\023 \001(\0132\031.goo" + + "gle.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\'client" + + "_half_close_streaming_time_offset\030\022 \001(\0132" + + "\031.google.protobuf.Duration\"\262\002\n\035Streaming" + + "DetectIntentResponse\022W\n\022recognition_resu" + + "lt\030\001 \001(\01329.google.cloud.dialogflow.cx.v3" + + ".StreamingRecognitionResultH\000\022U\n\026detect_" + + "intent_response\030\002 \001(\01323.google.cloud.dia" + + "logflow.cx.v3.DetectIntentResponseH\000\022U\n\016" + + "debugging_info\030\004 \001(\0132=.google.cloud.dial" + + "ogflow.cx.v3.CloudConversationDebuggingI" + + "nfoB\n\n\010response\"\266\003\n\032StreamingRecognition" + + "Result\022[\n\014message_type\030\001 \001(\0162E.google.cl" + + "oud.dialogflow.cx.v3.StreamingRecognitio" + + "nResult.MessageType\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\022G\n\020speech_word_info\030\007 \003" + + "(\0132-.google.cloud.dialogflow.cx.v3.Speec" + + "hWordInfo\0224\n\021speech_end_offset\030\010 \001(\0132\031.g" + + "oogle.protobuf.Duration\022\025\n\rlanguage_code" + + "\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UN" + + "SPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SI" + + "NGLE_UTTERANCE\020\002\"\216\006\n\017QueryParameters\022\021\n\t" + + "time_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023." + + "google.type.LatLng\022N\n\024session_entity_typ" + + "es\030\003 \003(\01320.google.cloud.dialogflow.cx.v3" + + ".SessionEntityType\022(\n\007payload\030\004 \001(\0132\027.go" + + "ogle.protobuf.Struct\022+\n\nparameters\030\005 \001(\013" + + "2\027.google.protobuf.Struct\0229\n\014current_pag" + + "e\030\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/" + + "Page\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034analyze" + + "_query_text_sentiment\030\010 \001(\010\022[\n\017webhook_h" + + "eaders\030\n \003(\0132B.google.cloud.dialogflow.c" + + "x.v3.QueryParameters.WebhookHeadersEntry" + + "\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!dialogflow" + + ".googleapis.com/Version\022\017\n\007channel\030\017 \001(\t" + + "\0224\n\013session_ttl\030\020 \001(\0132\031.google.protobuf." + + "DurationB\004\342A\001\001\0228\n\021end_user_metadata\030\022 \001(" + + "\0132\027.google.protobuf.StructB\004\342A\001\001\022H\n\rsear" + + "ch_config\030\024 \001(\0132+.google.cloud.dialogflo" + + "w.cx.v3.SearchConfigB\004\342A\001\001\0325\n\023WebhookHea" + + "dersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\"\234\001\n\014SearchConfig\022D\n\013boost_specs\030\001 \003(\0132" + + ").google.cloud.dialogflow.cx.v3.BoostSpe" + + "csB\004\342A\001\001\022F\n\014filter_specs\030\002 \003(\0132*.google." + + "cloud.dialogflow.cx.v3.FilterSpecsB\004\342A\001\001" + + "\"\261\001\n\tBoostSpec\022`\n\025condition_boost_specs\030" + + "\001 \003(\0132;.google.cloud.dialogflow.cx.v3.Bo" + + "ostSpec.ConditionBoostSpecB\004\342A\001\001\032B\n\022Cond" + + "itionBoostSpec\022\027\n\tcondition\030\001 \001(\tB\004\342A\001\001\022" + + "\023\n\005boost\030\002 \001(\002B\004\342A\001\001\"\222\001\n\nBoostSpecs\022F\n\013d" + + "ata_stores\030\001 \003(\tB1\342A\001\001\372A*\n(discoveryengi" + + "ne.googleapis.com/DataStore\022<\n\004spec\030\002 \003(" + + "\0132(.google.cloud.dialogflow.cx.v3.BoostS" + + "pecB\004\342A\001\001\"k\n\013FilterSpecs\022F\n\013data_stores\030" + + "\001 \003(\tB1\342A\001\001\372A*\n(discoveryengine.googleap" + + "is.com/DataStore\022\024\n\006filter\030\002 \001(\tB\004\342A\001\001\"\334" + + "\002\n\nQueryInput\0228\n\004text\030\002 \001(\0132(.google.clo" + + "ud.dialogflow.cx.v3.TextInputH\000\022<\n\006inten" + + "t\030\003 \001(\0132*.google.cloud.dialogflow.cx.v3." + + "IntentInputH\000\022:\n\005audio\030\005 \001(\0132).google.cl" + + "oud.dialogflow.cx.v3.AudioInputH\000\022:\n\005eve" + + "nt\030\006 \001(\0132).google.cloud.dialogflow.cx.v3" + + ".EventInputH\000\0228\n\004dtmf\030\007 \001(\0132(.google.clo" + + "ud.dialogflow.cx.v3.DtmfInputH\000\022\033\n\rlangu" + + "age_code\030\004 \001(\tB\004\342A\001\002B\007\n\005input\"\214\007\n\013QueryR" + + "esult\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030" + + "\013 \001(\tB%\372A\"\n dialogflow.googleapis.com/In" + + "tentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger_" + + "event\030\016 \001(\tH\000\0228\n\004dtmf\030\027 \001(\0132(.google.clo" + + "ud.dialogflow.cx.v3.DtmfInputH\000\022\025\n\rlangu" + + "age_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132\027.goo" + + "gle.protobuf.Struct\022I\n\021response_messages" + + "\030\004 \003(\0132..google.cloud.dialogflow.cx.v3.R" + + "esponseMessage\022,\n\020webhook_statuses\030\r \003(\013" + + "2\022.google.rpc.Status\0221\n\020webhook_payloads" + + "\030\006 \003(\0132\027.google.protobuf.Struct\0229\n\014curre" + + "nt_page\030\007 \001(\0132#.google.cloud.dialogflow." + + "cx.v3.Page\0229\n\006intent\030\010 \001(\0132%.google.clou" + + "d.dialogflow.cx.v3.IntentB\002\030\001\022\'\n\033intent_" + + "detection_confidence\030\t \001(\002B\002\030\001\0223\n\005match\030" + + "\017 \001(\0132$.google.cloud.dialogflow.cx.v3.Ma" + + "tch\0220\n\017diagnostic_info\030\n \001(\0132\027.google.pr" + + "otobuf.Struct\022Y\n\031sentiment_analysis_resu" + + "lt\030\021 \001(\01326.google.cloud.dialogflow.cx.v3" + + ".SentimentAnalysisResult\022J\n\021advanced_set" + + "tings\030\025 \001(\0132/.google.cloud.dialogflow.cx" + + ".v3.AdvancedSettings\022\035\n\025allow_answer_fee" + + "dback\030 \001(\010B\007\n\005query\"\037\n\tTextInput\022\022\n\004tex" + + "t\030\001 \001(\tB\004\342A\001\002\"H\n\013IntentInput\0229\n\006intent\030\001" + + " \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapis.com" + + "/Intent\"b\n\nAudioInput\022E\n\006config\030\001 \001(\0132/." + + "google.cloud.dialogflow.cx.v3.InputAudio" + + "ConfigB\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInpu" + + "t\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030" + + "\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002\n\005Match\0225\n" + + "\006intent\030\001 \001(\0132%.google.cloud.dialogflow." + + "cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameter" + + "s\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n\016reso" + + "lved_input\030\003 \001(\t\022B\n\nmatch_type\030\004 \001(\0162..g" + + "oogle.cloud.dialogflow.cx.v3.Match.Match" + + "Type\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032" + + "\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021" + + "\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILLING\020\003" + + "\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"" + + "\200\002\n\022MatchIntentRequest\022;\n\007session\030\001 \001(\tB" + + "*\342A\001\002\372A#\n!dialogflow.googleapis.com/Sess" + + "ion\022D\n\014query_params\030\002 \001(\0132..google.cloud" + + ".dialogflow.cx.v3.QueryParameters\022D\n\013que" + + "ry_input\030\003 \001(\0132).google.cloud.dialogflow" + + ".cx.v3.QueryInputB\004\342A\001\002\022!\n\031persist_param" + + "eter_changes\030\005 \001(\010\"\220\002\n\023MatchIntentRespon" + + "se\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001" + + "(\tB%\372A\"\n dialogflow.googleapis.com/Inten" + + "tH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigger_eve" + + "nt\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\0132$.google.clo" + + "ud.dialogflow.cx.v3.Match\0229\n\014current_pag" + + "e\030\005 \001(\0132#.google.cloud.dialogflow.cx.v3." + + "PageB\007\n\005query\"\353\001\n\024FulfillIntentRequest\022O" + + "\n\024match_intent_request\030\001 \001(\01321.google.cl" + + "oud.dialogflow.cx.v3.MatchIntentRequest\022" + + "3\n\005match\030\002 \001(\0132$.google.cloud.dialogflow" + + ".cx.v3.Match\022M\n\023output_audio_config\030\003 \001(" + + "\01320.google.cloud.dialogflow.cx.v3.Output" + + "AudioConfig\"\323\001\n\025FulfillIntentResponse\022\023\n" + + "\013response_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\013" + + "2*.google.cloud.dialogflow.cx.v3.QueryRe" + + "sult\022\024\n\014output_audio\030\003 \001(\014\022M\n\023output_aud" + + "io_config\030\004 \001(\01320.google.cloud.dialogflo" + + "w.cx.v3.OutputAudioConfig\";\n\027SentimentAn" + + "alysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude" + + "\030\002 \001(\0022\242\013\n\010Sessions\022\246\002\n\014DetectIntent\0222.g" + + "oogle.cloud.dialogflow.cx.v3.DetectInten" + + "tRequest\0323.google.cloud.dialogflow.cx.v3" + + ".DetectIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{se" + + "ssion=projects/*/locations/*/agents/*/se" + + "ssions/*}:detectIntent:\001*ZY\"T/v3/{sessio" + + "n=projects/*/locations/*/agents/*/enviro" + + "nments/*/sessions/*}:detectIntent:\001*\022\230\001\n" + + "\025StreamingDetectIntent\022;.google.cloud.di" + + "alogflow.cx.v3.StreamingDetectIntentRequ" + + "est\032<.google.cloud.dialogflow.cx.v3.Stre" + + "amingDetectIntentResponse\"\000(\0010\001\022\241\002\n\013Matc" + + "hIntent\0221.google.cloud.dialogflow.cx.v3." + + "MatchIntentRequest\0322.google.cloud.dialog" + + "flow.cx.v3.MatchIntentResponse\"\252\001\202\323\344\223\002\243\001" + + "\"D/v3/{session=projects/*/locations/*/ag" + + "ents/*/sessions/*}:matchIntent:\001*ZX\"S/v3" + + "/{session=projects/*/locations/*/agents/" + + "*/environments/*/sessions/*}:matchIntent" + + ":\001*\022\325\002\n\rFulfillIntent\0223.google.cloud.dia" + + "logflow.cx.v3.FulfillIntentRequest\0324.goo" + + "gle.cloud.dialogflow.cx.v3.FulfillIntent" + + "Response\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_intent_re" + + "quest.session=projects/*/locations/*/age" + + "nts/*/sessions/*}:fulfillIntent:\001*Zo\"j/v" + + "3/{match_intent_request.session=projects" + + "/*/locations/*/agents/*/environments/*/s" + + "essions/*}:fulfillIntent:\001*\022\333\001\n\024SubmitAn" + + "swerFeedback\022:.google.cloud.dialogflow.c" + + "x.v3.SubmitAnswerFeedbackRequest\032-.googl" + + "e.cloud.dialogflow.cx.v3.AnswerFeedback\"" + + "X\202\323\344\223\002R\"M/v3/{session=projects/*/locatio" + + "ns/*/agents/*/sessions/*}:submitAnswerFe" + + "edback:\001*\032x\312A\031dialogflow.googleapis.com\322" + + "AYhttps://www.googleapis.com/auth/cloud-" + + "platform,https://www.googleapis.com/auth" + + "/dialogflowB\323\004\n!com.google.cloud.dialogf" + + "low.cx.v3B\014SessionProtoP\001Z1cloud.google." + + "com/go/dialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242" + + "\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!G" + + "oogle::Cloud::Dialogflow::CX::V3\352A\324\001\n!di" + + "alogflow.googleapis.com/Session\022Iproject" + + "s/{project}/locations/{location}/agents/" + + "{agent}/sessions/{session}\022dprojects/{pr" + + "oject}/locations/{location}/agents/{agen" + + "t}/environments/{environment}/sessions/{" + + "session}\352A\305\001\n(discoveryengine.googleapis" + + ".com/DataStore\022?projects/{project}/locat" + + "ions/{location}/dataStores/{data_store}\022" + + "Xprojects/{project}/locations/{location}" + + "/collections/{collection}/dataStores/{da" + + "ta_store}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -351,12 +429,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.SessionEntityTypeProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), com.google.type.LatLngProto.getDescriptor(), }); - internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor, + new java.lang.String[] { + "Rating", "RatingReason", "CustomRating", + }); + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AnswerFeedback_RatingReason_descriptor, + new java.lang.String[] { + "ReasonLabels", "Feedback", + }); + internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor, + new java.lang.String[] { + "Session", "ResponseId", "AnswerFeedback", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_descriptor, @@ -364,7 +469,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Session", "QueryParams", "QueryInput", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3_DetectIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_dialogflow_cx_v3_DetectIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DetectIntentResponse_descriptor, @@ -377,7 +482,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AllowCancellation", }); internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_descriptor, @@ -390,7 +495,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnableDebuggingInfo", }); internal_static_google_cloud_dialogflow_cx_v3_CloudConversationDebuggingInfo_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_dialogflow_cx_v3_CloudConversationDebuggingInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CloudConversationDebuggingInfo_descriptor, @@ -415,7 +520,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientHalfCloseStreamingTimeOffset", }); internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentResponse_descriptor, @@ -423,7 +528,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RecognitionResult", "DetectIntentResponse", "DebuggingInfo", "Response", }); internal_static_google_cloud_dialogflow_cx_v3_StreamingRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3_StreamingRecognitionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_StreamingRecognitionResult_descriptor, @@ -438,7 +543,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_descriptor, @@ -455,6 +560,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FlowVersions", "Channel", "SessionTtl", + "EndUserMetadata", + "SearchConfig", }); internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_WebhookHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_descriptor @@ -466,8 +573,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SearchConfig_descriptor, + new java.lang.String[] { + "BoostSpecs", "FilterSpecs", + }); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor, + new java.lang.String[] { + "ConditionBoostSpecs", + }); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BoostSpec_ConditionBoostSpec_descriptor, + new java.lang.String[] { + "Condition", "Boost", + }); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BoostSpecs_descriptor, + new java.lang.String[] { + "DataStores", "Spec", + }); + internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_FilterSpecs_descriptor, + new java.lang.String[] { + "DataStores", "Filter", + }); internal_static_google_cloud_dialogflow_cx_v3_QueryInput_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_dialogflow_cx_v3_QueryInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_QueryInput_descriptor, @@ -475,7 +622,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", "Intent", "Audio", "Event", "Dtmf", "LanguageCode", "Input", }); internal_static_google_cloud_dialogflow_cx_v3_QueryResult_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3_QueryResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_QueryResult_descriptor, @@ -497,10 +644,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiagnosticInfo", "SentimentAnalysisResult", "AdvancedSettings", + "AllowAnswerFeedback", "Query", }); internal_static_google_cloud_dialogflow_cx_v3_TextInput_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3_TextInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_TextInput_descriptor, @@ -508,7 +656,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", }); internal_static_google_cloud_dialogflow_cx_v3_IntentInput_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3_IntentInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_IntentInput_descriptor, @@ -516,7 +664,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", }); internal_static_google_cloud_dialogflow_cx_v3_AudioInput_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_cx_v3_AudioInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_AudioInput_descriptor, @@ -524,7 +672,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "Audio", }); internal_static_google_cloud_dialogflow_cx_v3_EventInput_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_cx_v3_EventInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_EventInput_descriptor, @@ -532,7 +680,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Event", }); internal_static_google_cloud_dialogflow_cx_v3_DtmfInput_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_cx_v3_DtmfInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DtmfInput_descriptor, @@ -540,7 +688,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Digits", "FinishDigit", }); internal_static_google_cloud_dialogflow_cx_v3_Match_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_cx_v3_Match_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Match_descriptor, @@ -548,7 +696,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", "Event", "Parameters", "ResolvedInput", "MatchType", "Confidence", }); internal_static_google_cloud_dialogflow_cx_v3_MatchIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_cx_v3_MatchIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_MatchIntentRequest_descriptor, @@ -556,7 +704,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Session", "QueryParams", "QueryInput", "PersistParameterChanges", }); internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_descriptor, @@ -570,7 +718,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Query", }); internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentRequest_descriptor, @@ -578,7 +726,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MatchIntentRequest", "Match", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_FulfillIntentResponse_descriptor, @@ -586,7 +734,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResponseId", "QueryResult", "OutputAudio", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3_SentimentAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_cx_v3_SentimentAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_SentimentAnalysisResult_descriptor, @@ -614,6 +762,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.SessionEntityTypeProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); com.google.type.LatLngProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequest.java new file mode 100644 index 000000000000..4920a92c5bee --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequest.java @@ -0,0 +1,1407 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request to set the feedback for a bot answer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} + */ +public final class SubmitAnswerFeedbackRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) + SubmitAnswerFeedbackRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubmitAnswerFeedbackRequest.newBuilder() to construct. + private SubmitAnswerFeedbackRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubmitAnswerFeedbackRequest() { + session_ = ""; + responseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubmitAnswerFeedbackRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.class, + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.Builder.class); + } + + public static final int SESSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseId_ = ""; + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + @java.lang.Override + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + 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(); + responseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANSWER_FEEDBACK_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.AnswerFeedback answerFeedback_; + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + @java.lang.Override + public boolean hasAnswerFeedback() { + return answerFeedback_ != null; + } + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback getAnswerFeedback() { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder getAnswerFeedbackOrBuilder() { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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(session_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, responseId_); + } + if (answerFeedback_ != null) { + output.writeMessage(3, getAnswerFeedback()); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + 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(session_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, responseId_); + } + if (answerFeedback_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnswerFeedback()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateMask()); + } + 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.cx.v3.SubmitAnswerFeedbackRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest other = + (com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) obj; + + if (!getSession().equals(other.getSession())) return false; + if (!getResponseId().equals(other.getResponseId())) return false; + if (hasAnswerFeedback() != other.hasAnswerFeedback()) return false; + if (hasAnswerFeedback()) { + if (!getAnswerFeedback().equals(other.getAnswerFeedback())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + hash = (37 * hash) + RESPONSE_ID_FIELD_NUMBER; + hash = (53 * hash) + getResponseId().hashCode(); + if (hasAnswerFeedback()) { + hash = (37 * hash) + ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getAnswerFeedback().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest 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 to set the feedback for a bot answer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.class, + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + session_ = ""; + responseId_ = ""; + answerFeedback_ = null; + if (answerFeedbackBuilder_ != null) { + answerFeedbackBuilder_.dispose(); + answerFeedbackBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest build() { + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest result = + new com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.session_ = session_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.responseId_ = responseId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.answerFeedback_ = + answerFeedbackBuilder_ == null ? answerFeedback_ : answerFeedbackBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.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.cx.v3.SubmitAnswerFeedbackRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.getDefaultInstance()) + return this; + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResponseId().isEmpty()) { + responseId_ = other.responseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAnswerFeedback()) { + mergeAnswerFeedback(other.getAnswerFeedback()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + responseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAnswerFeedbackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 session_ = ""; + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object responseId_ = ""; + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResponseId() { + responseId_ = getDefaultInstance().getResponseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.AnswerFeedback answerFeedback_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder> + answerFeedbackBuilder_; + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + public boolean hasAnswerFeedback() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback getAnswerFeedback() { + if (answerFeedbackBuilder_ == null) { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } else { + return answerFeedbackBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnswerFeedback(com.google.cloud.dialogflow.cx.v3.AnswerFeedback value) { + if (answerFeedbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answerFeedback_ = value; + } else { + answerFeedbackBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnswerFeedback( + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder builderForValue) { + if (answerFeedbackBuilder_ == null) { + answerFeedback_ = builderForValue.build(); + } else { + answerFeedbackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnswerFeedback(com.google.cloud.dialogflow.cx.v3.AnswerFeedback value) { + if (answerFeedbackBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && answerFeedback_ != null + && answerFeedback_ + != com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance()) { + getAnswerFeedbackBuilder().mergeFrom(value); + } else { + answerFeedback_ = value; + } + } else { + answerFeedbackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00000004); + answerFeedback_ = null; + if (answerFeedbackBuilder_ != null) { + answerFeedbackBuilder_.dispose(); + answerFeedbackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder getAnswerFeedbackBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAnswerFeedbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder getAnswerFeedbackOrBuilder() { + if (answerFeedbackBuilder_ != null) { + return answerFeedbackBuilder_.getMessageOrBuilder(); + } else { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder> + getAnswerFeedbackFieldBuilder() { + if (answerFeedbackBuilder_ == null) { + answerFeedbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder>( + getAnswerFeedback(), getParentForChildren(), isClean()); + answerFeedback_ = null; + } + return answerFeedbackBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000008); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.cx.v3.SubmitAnswerFeedbackRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) + private static final com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubmitAnswerFeedbackRequest 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.cx.v3.SubmitAnswerFeedbackRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequestOrBuilder.java new file mode 100644 index 000000000000..cbdf809a8d64 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SubmitAnswerFeedbackRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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/cx/v3/session.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface SubmitAnswerFeedbackRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + java.lang.String getSession(); + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + java.lang.String getResponseId(); + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + com.google.protobuf.ByteString getResponseIdBytes(); + + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + boolean hasAnswerFeedback(); + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + com.google.cloud.dialogflow.cx.v3.AnswerFeedback getAnswerFeedback(); + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.AnswerFeedbackOrBuilder getAnswerFeedbackOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 7a086796fced..9a937500c125 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -245,6 +245,15 @@ message Agent { string engine = 1 [(google.api.field_behavior) = REQUIRED]; } + // Settings for answer feedback collection. + message AnswerFeedbackSettings { + // Optional. If enabled, end users will be able to provide + // [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + // Dialogflow responses. Feature works only if interaction logging is + // enabled in the Dialogflow agent. + bool enable_answer_feedback = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] @@ -335,6 +344,10 @@ message Agent { // Gen App Builder-related agent-level settings. optional GenAppBuilderSettings gen_app_builder_settings = 33; + + // Optional. Answer feedback collection settings. + AnswerFeedbackSettings answer_feedback_settings = 38 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index 7f18827cb96c..de62d4313a7e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -151,6 +151,39 @@ message SpeechWordInfo { float confidence = 4; } +// Configuration of the barge-in behavior. Barge-in instructs the API to return +// a detected utterance at a proper time while the client is playing back the +// response audio from a previous request. When the client sees the +// utterance, it should stop the playback and immediately get ready for +// receiving the responses for the current request. +// +// The barge-in handling requires the client to start streaming audio input +// as soon as it starts playing back the audio from the previous response. The +// playback is modeled into two phases: +// +// * No barge-in phase: which goes first and during which speech detection +// should not be carried out. +// +// * Barge-in phase: which follows the no barge-in phase and during which +// the API starts speech detection and may inform the client that an utterance +// has been detected. Note that no-speech event is not expected in this +// phase. +// +// The client provides this configuration in terms of the durations of those +// two phases. The durations are measured in terms of the audio length from the +// the start of the input audio. +// +// No-speech event is a response with END_OF_UTTERANCE without any transcript +// following up. +message BargeInConfig { + // Duration that is not eligible for barge-in at the beginning of the input + // audio. + google.protobuf.Duration no_barge_in_duration = 1; + + // Total duration for the playback at the beginning of the input audio. + google.protobuf.Duration total_duration = 2; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -211,6 +244,9 @@ message InputAudioConfig { // needed. // Note: This setting is relevant only for streaming methods. bool single_utterance = 8; + + // Configuration of barge-in behavior during the streaming of input audio. + BargeInConfig barge_in_config = 15; } // Gender of the voice as described in diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index 28b68b5d9937..c3f6d2f3d69f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -39,15 +39,6 @@ service EntityTypes { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/dialogflow"; - // Returns the list of all entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) - returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" - }; - option (google.api.method_signature) = "parent"; - } - // Retrieves the specified entity type. rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { option (google.api.http) = { @@ -94,6 +85,15 @@ service EntityTypes { }; option (google.api.method_signature) = "name"; } + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) + returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + } } // Entities are extracted from user input and represent parameters that are diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto index 9c322fd516f4..5dcddf330400 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto @@ -27,6 +27,7 @@ import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; import "google/cloud/dialogflow/cx/v3/session_entity_type.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; @@ -44,6 +45,11 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}" pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/DataStore" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the @@ -114,6 +120,78 @@ service Sessions { } }; } + + // Updates the feedback received from the user for a single turn of the bot + // response. + rpc SubmitAnswerFeedback(SubmitAnswerFeedbackRequest) + returns (AnswerFeedback) { + option (google.api.http) = { + post: "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback" + body: "*" + }; + } +} + +// Stores information about feedback provided by users about a response. +message AnswerFeedback { + // Represents thumbs up/down rating provided by user about a response. + enum Rating { + // Rating not specified. + RATING_UNSPECIFIED = 0; + + // Thumbs up feedback from user. + THUMBS_UP = 1; + + // Thumbs down feedback from user. + THUMBS_DOWN = 2; + } + + // Stores extra information about why users provided thumbs down rating. + message RatingReason { + // Optional. Custom reason labels for thumbs down rating provided by the + // user. The maximum number of labels allowed is 10 and the maximum length + // of a single label is 128 characters. + repeated string reason_labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional feedback about the rating. + // This field can be populated without choosing a predefined `reason`. + string feedback = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Rating from user for the specific Dialogflow response. + Rating rating = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. In case of thumbs down rating provided, users can optionally + // provide context about the rating. + RatingReason rating_reason = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom rating from the user about the provided answer, with + // maximum length of 1024 characters. For example, client could use a + // customized JSON object to indicate the rating. + string custom_rating = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to set the feedback for a bot answer. +message SubmitAnswerFeedbackRequest { + // Required. The name of the session the feedback was sent to. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // Required. ID of the response to update its feedback. This is the same as + // DetectIntentResponse.response_id. + string response_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feedback provided for a bot answer. + AnswerFeedback answer_feedback = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields to update. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The request to detect user's intent. @@ -607,6 +685,120 @@ message QueryParameters { // This value should be no longer than 1 day. google.protobuf.Duration session_ttl = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about the end-user to improve the relevance and + // accuracy of generative answers. + // + // This will be interpreted and used by a language model, so, for good + // results, the data should be self-descriptive, and in a simple structure. + // + // Example: + // + // ```json + // { + // "subscription plan": "Business Premium Plus", + // "devices owned": [ + // {"model": "Google Pixel 7"}, + // {"model": "Google Pixel Tablet"} + // ] + // } + // ``` + google.protobuf.Struct end_user_metadata = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Search configuration for UCS search queries. + SearchConfig search_config = 20 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search configuration for UCS search queries. +message SearchConfig { + // Optional. Boosting configuration for the datastores. + repeated BoostSpecs boost_specs = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter configuration for the datastores. + repeated FilterSpecs filter_specs = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specification to boost certain documents. +// A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation +// is available at +// https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec +message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // Optional. An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Condition boost specifications. If a document matches multiple + // conditions in the specifictions, boost scores from these specifications are + // all applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specifications for data stores. +message BoostSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. A list of boosting specifications. + repeated BoostSpec spec = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Filter specifications for data stores. +message FilterSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. The filter expression to be applied. + // Expression syntax is documented at + // https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; } // Represents the query input. It can contain one of: @@ -772,6 +964,10 @@ message QueryResult { // Dialogflow exports audio to Google Cloud Storage, then the client may need // to wait for the resulting object to appear in the bucket before proceeding. AdvancedSettings advanced_settings = 21; + + // Indicates whether the Thumbs up/Thumbs down rating controls are need to be + // shown for the response in the Dialogflow Messenger widget. + bool allow_answer_feedback = 32; } // Represents the natural language text to be processed. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java index 7123ec8ad4ce..7011f2fe8bb7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java @@ -3345,6 +3345,572 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface AnswerFeedbackSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. If enabled, end users will be able to provide
+     * [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to
+     * Dialogflow responses. Feature works only if interaction logging is
+     * enabled in the Dialogflow agent.
+     * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + boolean getEnableAnswerFeedback(); + } + /** + * + * + *
+   * Settings for answer feedback collection.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} + */ + public static final class AnswerFeedbackSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) + AnswerFeedbackSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerFeedbackSettings.newBuilder() to construct. + private AnswerFeedbackSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerFeedbackSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerFeedbackSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder.class); + } + + public static final int ENABLE_ANSWER_FEEDBACK_FIELD_NUMBER = 1; + private boolean enableAnswerFeedback_ = false; + /** + * + * + *
+     * Optional. If enabled, end users will be able to provide
+     * [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to
+     * Dialogflow responses. Feature works only if interaction logging is
+     * enabled in the Dialogflow agent.
+     * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + @java.lang.Override + public boolean getEnableAnswerFeedback() { + return enableAnswerFeedback_; + } + + 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 (enableAnswerFeedback_ != false) { + output.writeBool(1, enableAnswerFeedback_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableAnswerFeedback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableAnswerFeedback_); + } + 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.cx.v3beta1.Agent.AnswerFeedbackSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) obj; + + if (getEnableAnswerFeedback() != other.getEnableAnswerFeedback()) 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) + ENABLE_ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAnswerFeedback()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings 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.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings 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.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings 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.cx.v3beta1.Agent.AnswerFeedbackSettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + 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.cx.v3beta1.Agent.AnswerFeedbackSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings 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.cx.v3beta1.Agent.AnswerFeedbackSettings 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; + } + /** + * + * + *
+     * Settings for answer feedback collection.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableAnswerFeedback_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableAnswerFeedback_ = enableAnswerFeedback_; + } + } + + @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.cx.v3beta1.Agent.AnswerFeedbackSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + .getDefaultInstance()) return this; + if (other.getEnableAnswerFeedback() != false) { + setEnableAnswerFeedback(other.getEnableAnswerFeedback()); + } + 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: + { + enableAnswerFeedback_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 enableAnswerFeedback_; + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableAnswerFeedback. + */ + @java.lang.Override + public boolean getEnableAnswerFeedback() { + return enableAnswerFeedback_; + } + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableAnswerFeedback to set. + * @return This builder for chaining. + */ + public Builder setEnableAnswerFeedback(boolean value) { + + enableAnswerFeedback_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If enabled, end users will be able to provide
+       * [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to
+       * Dialogflow responses. Feature works only if interaction logging is
+       * enabled in the Dialogflow agent.
+       * 
+ * + * bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00000001); + enableAnswerFeedback_ = false; + 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.cx.v3beta1.Agent.AnswerFeedbackSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerFeedbackSettings 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.cx.v3beta1.Agent.AnswerFeedbackSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -3947,7 +4513,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -4222,6 +4788,65 @@ public boolean hasGenAppBuilderSettings() { : genAppBuilderSettings_; } + public static final int ANSWER_FEEDBACK_SETTINGS_FIELD_NUMBER = 38; + private com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + answerFeedbackSettings_; + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + @java.lang.Override + public boolean hasAnswerFeedbackSettings() { + return answerFeedbackSettings_ != null; + } + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + getAnswerFeedbackSettings() { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder() { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.getDefaultInstance() + : answerFeedbackSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4288,6 +4913,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(33, getGenAppBuilderSettings()); } + if (answerFeedbackSettings_ != null) { + output.writeMessage(38, getAnswerFeedbackSettings()); + } getUnknownFields().writeTo(output); } @@ -4357,6 +4985,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, getGenAppBuilderSettings()); } + if (answerFeedbackSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAnswerFeedbackSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4406,6 +5038,10 @@ public boolean equals(final java.lang.Object obj) { if (hasGenAppBuilderSettings()) { if (!getGenAppBuilderSettings().equals(other.getGenAppBuilderSettings())) return false; } + if (hasAnswerFeedbackSettings() != other.hasAnswerFeedbackSettings()) return false; + if (hasAnswerFeedbackSettings()) { + if (!getAnswerFeedbackSettings().equals(other.getAnswerFeedbackSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4463,6 +5099,10 @@ public int hashCode() { hash = (37 * hash) + GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getGenAppBuilderSettings().hashCode(); } + if (hasAnswerFeedbackSettings()) { + hash = (37 * hash) + ANSWER_FEEDBACK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAnswerFeedbackSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4620,6 +5260,7 @@ private void maybeForceBuilderInitialization() { getGitIntegrationSettingsFieldBuilder(); getTextToSpeechSettingsFieldBuilder(); getGenAppBuilderSettingsFieldBuilder(); + getAnswerFeedbackSettingsFieldBuilder(); } } @@ -4664,6 +5305,11 @@ public Builder clear() { genAppBuilderSettingsBuilder_.dispose(); genAppBuilderSettingsBuilder_ = null; } + answerFeedbackSettings_ = null; + if (answerFeedbackSettingsBuilder_ != null) { + answerFeedbackSettingsBuilder_.dispose(); + answerFeedbackSettingsBuilder_ = null; + } return this; } @@ -4767,6 +5413,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Agent result) : genAppBuilderSettingsBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.answerFeedbackSettings_ = + answerFeedbackSettingsBuilder_ == null + ? answerFeedbackSettings_ + : answerFeedbackSettingsBuilder_.build(); + } result.bitField0_ |= to_bitField0_; } @@ -4889,6 +5541,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { if (other.hasGenAppBuilderSettings()) { mergeGenAppBuilderSettings(other.getGenAppBuilderSettings()); } + if (other.hasAnswerFeedbackSettings()) { + mergeAnswerFeedbackSettings(other.getAnswerFeedbackSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -5023,6 +5678,13 @@ public Builder mergeFrom( bitField0_ |= 0x00010000; break; } // case 266 + case 306: + { + input.readMessage( + getAnswerFeedbackSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 306 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6427,7 +7089,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -6448,7 +7110,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -6473,7 +7135,7 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 * @return This builder for chaining. */ @java.lang.Deprecated @@ -7428,6 +8090,219 @@ public Builder clearGenAppBuilderSettings() { return genAppBuilderSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + answerFeedbackSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder> + answerFeedbackSettingsBuilder_; + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + public boolean hasAnswerFeedbackSettings() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + getAnswerFeedbackSettings() { + if (answerFeedbackSettingsBuilder_ == null) { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + .getDefaultInstance() + : answerFeedbackSettings_; + } else { + return answerFeedbackSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings value) { + if (answerFeedbackSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answerFeedbackSettings_ = value; + } else { + answerFeedbackSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder + builderForValue) { + if (answerFeedbackSettingsBuilder_ == null) { + answerFeedbackSettings_ = builderForValue.build(); + } else { + answerFeedbackSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAnswerFeedbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings value) { + if (answerFeedbackSettingsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && answerFeedbackSettings_ != null + && answerFeedbackSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + .getDefaultInstance()) { + getAnswerFeedbackSettingsBuilder().mergeFrom(value); + } else { + answerFeedbackSettings_ = value; + } + } else { + answerFeedbackSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAnswerFeedbackSettings() { + bitField0_ = (bitField0_ & ~0x00020000); + answerFeedbackSettings_ = null; + if (answerFeedbackSettingsBuilder_ != null) { + answerFeedbackSettingsBuilder_.dispose(); + answerFeedbackSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder + getAnswerFeedbackSettingsBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getAnswerFeedbackSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder() { + if (answerFeedbackSettingsBuilder_ != null) { + return answerFeedbackSettingsBuilder_.getMessageOrBuilder(); + } else { + return answerFeedbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + .getDefaultInstance() + : answerFeedbackSettings_; + } + } + /** + * + * + *
+     * Optional. Answer feedback collection settings.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder> + getAnswerFeedbackSettingsFieldBuilder() { + if (answerFeedbackSettingsBuilder_ == null) { + answerFeedbackSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder>( + getAnswerFeedbackSettings(), getParentForChildren(), isClean()); + answerFeedbackSettings_ = null; + } + return answerFeedbackSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java index 1dfa1de91cf8..e960eb93e5f8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java @@ -386,7 +386,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -583,4 +583,46 @@ public interface AgentOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder getGenAppBuilderSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerFeedbackSettings field is set. + */ + boolean hasAnswerFeedbackSettings(); + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerFeedbackSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings getAnswerFeedbackSettings(); + /** + * + * + *
+   * Optional. Answer feedback collection settings.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettingsOrBuilder + getAnswerFeedbackSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java index 53ca46baa70f..0a593cd200ef 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GenAppBuilderSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GenAppBuilderSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ListAgentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,7 +139,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pty.proto\032 google/protobuf/field_mask.pr" + "oto\032\034google/protobuf/struct.proto\"8\n\024Spe" + "echToTextSettings\022 \n\030enable_speech_adapt" - + "ation\030\001 \001(\010\"\262\n\n\005Agent\022\014\n\004name\030\001 \001(\t\022\032\n\014d" + + "ation\030\001 \001(\010\"\334\013\n\005Agent\022\014\n\004name\030\001 \001(\t\022\032\n\014d" + "isplay_name\030\002 \001(\tB\004\342A\001\002\022$\n\025default_langu" + "age_code\030\003 \001(\tB\005\342A\002\002\005\022 \n\030supported_langu" + "age_codes\030\004 \003(\t\022\027\n\ttime_zone\030\005 \001(\tB\004\342A\001\002" @@ -157,149 +161,154 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "x.v3beta1.TextToSpeechSettings\022f\n\030gen_ap" + "p_builder_settings\030! \001(\0132?.google.cloud." + "dialogflow.cx.v3beta1.Agent.GenAppBuilde" - + "rSettingsH\000\210\001\001\032\225\002\n\026GitIntegrationSetting" - + "s\022j\n\017github_settings\030\001 \001(\0132O.google.clou" - + "d.dialogflow.cx.v3beta1.Agent.GitIntegra" - + "tionSettings.GithubSettingsH\000\032\177\n\016GithubS" - + "ettings\022\024\n\014display_name\030\001 \001(\t\022\026\n\016reposit" - + "ory_uri\030\002 \001(\t\022\027\n\017tracking_branch\030\003 \001(\t\022\024" - + "\n\014access_token\030\004 \001(\t\022\020\n\010branches\030\005 \003(\tB\016" - + "\n\014git_settings\032-\n\025GenAppBuilderSettings\022" - + "\024\n\006engine\030\001 \001(\tB\004\342A\001\002:\\\352AY\n\037dialogflow.g" - + "oogleapis.com/Agent\0226projects/{project}/" - + "locations/{location}/agents/{agent}B\033\n\031_" - + "gen_app_builder_settings\"t\n\021ListAgentsRe" - + "quest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogfl" - + "ow.googleapis.com/Agent\022\021\n\tpage_size\030\002 \001" - + "(\005\022\022\n\npage_token\030\003 \001(\t\"h\n\022ListAgentsResp" - + "onse\0229\n\006agents\030\001 \003(\0132).google.cloud.dial" - + "ogflow.cx.v3beta1.Agent\022\027\n\017next_page_tok" - + "en\030\002 \001(\t\"I\n\017GetAgentRequest\0226\n\004name\030\001 \001(" - + "\tB(\342A\001\002\372A!\n\037dialogflow.googleapis.com/Ag" - + "ent\"\216\001\n\022CreateAgentRequest\0228\n\006parent\030\001 \001" - + "(\tB(\342A\001\002\372A!\022\037dialogflow.googleapis.com/A" - + "gent\022>\n\005agent\030\002 \001(\0132).google.cloud.dialo" - + "gflow.cx.v3beta1.AgentB\004\342A\001\002\"\205\001\n\022UpdateA" - + "gentRequest\022>\n\005agent\030\001 \001(\0132).google.clou" - + "d.dialogflow.cx.v3beta1.AgentB\004\342A\001\002\022/\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "Mask\"L\n\022DeleteAgentRequest\0226\n\004name\030\001 \001(\t" - + "B(\342A\001\002\372A!\n\037dialogflow.googleapis.com/Age" - + "nt\"\250\004\n\022ExportAgentRequest\0226\n\004name\030\001 \001(\tB" - + "(\342A\001\002\372A!\n\037dialogflow.googleapis.com/Agen" - + "t\022\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022\\\n\013data_forma" - + "t\030\003 \001(\0162A.google.cloud.dialogflow.cx.v3b" - + "eta1.ExportAgentRequest.DataFormatB\004\342A\001\001" - + "\022C\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'\n%dialogfl" - + "ow.googleapis.com/Environment\022d\n\017git_des" - + "tination\030\006 \001(\0132E.google.cloud.dialogflow" - + ".cx.v3beta1.ExportAgentRequest.GitDestin" - + "ationB\004\342A\001\001\022.\n include_bigquery_export_s" - + "ettings\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDestination\022\027\n" - + "\017tracking_branch\030\001 \001(\t\022\026\n\016commit_message" - + "\030\002 \001(\t\"E\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSP" - + "ECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n" - + "\023ExportAgentResponse\022\023\n\tagent_uri\030\001 \001(\tH" - + "\000\022\027\n\ragent_content\030\002 \001(\014H\000\022\024\n\ncommit_sha" - + "\030\003 \001(\tH\000B\007\n\005agent\"\253\003\n\023RestoreAgentReques" + + "rSettingsH\000\210\001\001\022h\n\030answer_feedback_settin" + + "gs\030& \001(\0132@.google.cloud.dialogflow.cx.v3" + + "beta1.Agent.AnswerFeedbackSettingsB\004\342A\001\001" + + "\032\225\002\n\026GitIntegrationSettings\022j\n\017github_se" + + "ttings\030\001 \001(\0132O.google.cloud.dialogflow.c" + + "x.v3beta1.Agent.GitIntegrationSettings.G" + + "ithubSettingsH\000\032\177\n\016GithubSettings\022\024\n\014dis" + + "play_name\030\001 \001(\t\022\026\n\016repository_uri\030\002 \001(\t\022" + + "\027\n\017tracking_branch\030\003 \001(\t\022\024\n\014access_token" + + "\030\004 \001(\t\022\020\n\010branches\030\005 \003(\tB\016\n\014git_settings" + + "\032-\n\025GenAppBuilderSettings\022\024\n\006engine\030\001 \001(" + + "\tB\004\342A\001\002\032>\n\026AnswerFeedbackSettings\022$\n\026ena" + + "ble_answer_feedback\030\001 \001(\010B\004\342A\001\001:\\\352AY\n\037di" + + "alogflow.googleapis.com/Agent\0226projects/" + + "{project}/locations/{location}/agents/{a" + + "gent}B\033\n\031_gen_app_builder_settings\"t\n\021Li" + + "stAgentsRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!" + + "\022\037dialogflow.googleapis.com/Agent\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"h\n\022List" + + "AgentsResponse\0229\n\006agents\030\001 \003(\0132).google." + + "cloud.dialogflow.cx.v3beta1.Agent\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"I\n\017GetAgentRequest\0226\n" + + "\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googlea" + + "pis.com/Agent\"\216\001\n\022CreateAgentRequest\0228\n\006" + + "parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogflow.google" + + "apis.com/Agent\022>\n\005agent\030\002 \001(\0132).google.c" + + "loud.dialogflow.cx.v3beta1.AgentB\004\342A\001\002\"\205" + + "\001\n\022UpdateAgentRequest\022>\n\005agent\030\001 \001(\0132).g" + + "oogle.cloud.dialogflow.cx.v3beta1.AgentB" + + "\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMask\"L\n\022DeleteAgentRequest\0226\n\004" + + "name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleap" + + "is.com/Agent\"\250\004\n\022ExportAgentRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleapi" + + "s.com/Agent\022\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022\\\n\013" + + "data_format\030\003 \001(\0162A.google.cloud.dialogf" + + "low.cx.v3beta1.ExportAgentRequest.DataFo" + + "rmatB\004\342A\001\001\022C\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'" + + "\n%dialogflow.googleapis.com/Environment\022" + + "d\n\017git_destination\030\006 \001(\0132E.google.cloud." + + "dialogflow.cx.v3beta1.ExportAgentRequest" + + ".GitDestinationB\004\342A\001\001\022.\n include_bigquer" + + "y_export_settings\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDest" + + "ination\022\027\n\017tracking_branch\030\001 \001(\t\022\026\n\016comm" + + "it_message\030\002 \001(\t\"E\n\nDataFormat\022\033\n\027DATA_F" + + "ORMAT_UNSPECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PA" + + "CKAGE\020\004\"b\n\023ExportAgentResponse\022\023\n\tagent_" + + "uri\030\001 \001(\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000\022\024\n\n" + + "commit_sha\030\003 \001(\tH\000B\007\n\005agent\"\253\003\n\023RestoreA" + + "gentRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dial" + + "ogflow.googleapis.com/Agent\022\023\n\tagent_uri" + + "\030\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(\014H\000\022W\n\ngit" + + "_source\030\006 \001(\0132A.google.cloud.dialogflow." + + "cx.v3beta1.RestoreAgentRequest.GitSource" + + "H\000\022]\n\016restore_option\030\005 \001(\0162E.google.clou" + + "d.dialogflow.cx.v3beta1.RestoreAgentRequ" + + "est.RestoreOption\032$\n\tGitSource\022\027\n\017tracki" + + "ng_branch\030\001 \001(\t\"G\n\rRestoreOption\022\036\n\032REST" + + "ORE_OPTION_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FA" + + "LLBACK\020\002B\007\n\005agent\"e\n\024ValidateAgentReques" + "t\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.goo" - + "gleapis.com/Agent\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027" - + "\n\ragent_content\030\003 \001(\014H\000\022W\n\ngit_source\030\006 " - + "\001(\0132A.google.cloud.dialogflow.cx.v3beta1" - + ".RestoreAgentRequest.GitSourceH\000\022]\n\016rest" - + "ore_option\030\005 \001(\0162E.google.cloud.dialogfl" - + "ow.cx.v3beta1.RestoreAgentRequest.Restor" - + "eOption\032$\n\tGitSource\022\027\n\017tracking_branch\030" - + "\001 \001(\t\"G\n\rRestoreOption\022\036\n\032RESTORE_OPTION" - + "_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007" - + "\n\005agent\"e\n\024ValidateAgentRequest\0226\n\004name\030" - + "\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googleapis.co" - + "m/Agent\022\025\n\rlanguage_code\030\002 \001(\t\"\200\001\n\037GetAg" - + "entValidationResultRequest\022F\n\004name\030\001 \001(\t" - + "B8\342A\001\002\372A1\n/dialogflow.googleapis.com/Age" - + "ntValidationResult\022\025\n\rlanguage_code\030\002 \001(" - + "\t\"\377\001\n\025AgentValidationResult\022\014\n\004name\030\001 \001(" - + "\t\022Y\n\027flow_validation_results\030\002 \003(\01328.goo" - + "gle.cloud.dialogflow.cx.v3beta1.FlowVali" - + "dationResult:}\352Az\n/dialogflow.googleapis" - + ".com/AgentValidationResult\022Gprojects/{pr" - + "oject}/locations/{location}/agents/{agen" - + "t}/validationResult\"\205\001\n\034GetGenerativeSet" - + "tingsRequest\022H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1dia" - + "logflow.googleapis.com/AgentGenerativeSe" - + "ttings\022\033\n\rlanguage_code\030\002 \001(\tB\004\342A\001\002\"\263\001\n\037" - + "UpdateGenerativeSettingsRequest\022Y\n\023gener" - + "ative_settings\030\001 \001(\01326.google.cloud.dial" - + "ogflow.cx.v3beta1.GenerativeSettingsB\004\342A" - + "\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.protobu" - + "f.FieldMaskB\004\342A\001\0012\270\023\n\006Agents\022\275\001\n\nListAge" - + "nts\0225.google.cloud.dialogflow.cx.v3beta1" - + ".ListAgentsRequest\0326.google.cloud.dialog" - + "flow.cx.v3beta1.ListAgentsResponse\"@\332A\006p" - + "arent\202\323\344\223\0021\022//v3beta1/{parent=projects/*" - + "/locations/*}/agents\022\252\001\n\010GetAgent\0223.goog" - + "le.cloud.dialogflow.cx.v3beta1.GetAgentR" - + "equest\032).google.cloud.dialogflow.cx.v3be" - + "ta1.Agent\">\332A\004name\202\323\344\223\0021\022//v3beta1/{name" - + "=projects/*/locations/*/agents/*}\022\277\001\n\013Cr" - + "eateAgent\0226.google.cloud.dialogflow.cx.v" - + "3beta1.CreateAgentRequest\032).google.cloud" - + ".dialogflow.cx.v3beta1.Agent\"M\332A\014parent," - + "agent\202\323\344\223\0028\"//v3beta1/{parent=projects/*" - + "/locations/*}/agents:\005agent\022\312\001\n\013UpdateAg" - + "ent\0226.google.cloud.dialogflow.cx.v3beta1" - + ".UpdateAgentRequest\032).google.cloud.dialo" - + "gflow.cx.v3beta1.Agent\"X\332A\021agent,update_" - + "mask\202\323\344\223\002>25/v3beta1/{agent.name=project" - + "s/*/locations/*/agents/*}:\005agent\022\235\001\n\013Del" - + "eteAgent\0226.google.cloud.dialogflow.cx.v3" - + "beta1.DeleteAgentRequest\032\026.google.protob" - + "uf.Empty\">\332A\004name\202\323\344\223\0021*//v3beta1/{name=" - + "projects/*/locations/*/agents/*}\022\327\001\n\013Exp" - + "ortAgent\0226.google.cloud.dialogflow.cx.v3" - + "beta1.ExportAgentRequest\032\035.google.longru" - + "nning.Operation\"q\312A-\n\023ExportAgentRespons" - + "e\022\026google.protobuf.Struct\202\323\344\223\002;\"6/v3beta" - + "1/{name=projects/*/locations/*/agents/*}" - + ":export:\001*\022\334\001\n\014RestoreAgent\0227.google.clo" - + "ud.dialogflow.cx.v3beta1.RestoreAgentReq" - + "uest\032\035.google.longrunning.Operation\"t\312A/" - + "\n\025google.protobuf.Empty\022\026google.protobuf" - + ".Struct\202\323\344\223\002<\"7/v3beta1/{name=projects/*" - + "/locations/*/agents/*}:restore:\001*\022\311\001\n\rVa" - + "lidateAgent\0228.google.cloud.dialogflow.cx" - + ".v3beta1.ValidateAgentRequest\0329.google.c" - + "loud.dialogflow.cx.v3beta1.AgentValidati" - + "onResult\"C\202\323\344\223\002=\"8/v3beta1/{name=project" - + "s/*/locations/*/agents/*}:validate:\001*\022\353\001" - + "\n\030GetAgentValidationResult\022C.google.clou" - + "d.dialogflow.cx.v3beta1.GetAgentValidati" - + "onResultRequest\0329.google.cloud.dialogflo" - + "w.cx.v3beta1.AgentValidationResult\"O\332A\004n" - + "ame\202\323\344\223\002B\022@/v3beta1/{name=projects/*/loc" - + "ations/*/agents/*/validationResult}\022\362\001\n\025" - + "GetGenerativeSettings\022@.google.cloud.dia" - + "logflow.cx.v3beta1.GetGenerativeSettings" - + "Request\0326.google.cloud.dialogflow.cx.v3b" - + "eta1.GenerativeSettings\"_\332A\022name,languag" - + "e_code\202\323\344\223\002D\022B/v3beta1/{name=projects/*/" - + "locations/*/agents/*/generativeSettings}" - + "\022\257\002\n\030UpdateGenerativeSettings\022C.google.c" - + "loud.dialogflow.cx.v3beta1.UpdateGenerat" - + "iveSettingsRequest\0326.google.cloud.dialog" - + "flow.cx.v3beta1.GenerativeSettings\"\225\001\332A\037" - + "generative_settings,update_mask\202\323\344\223\002m2V/" - + "v3beta1/{generative_settings.name=projec" - + "ts/*/locations/*/agents/*/generativeSett" - + "ings}:\023generative_settings\032x\312A\031dialogflo" - + "w.googleapis.com\322AYhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/dialogflowB\304\001\n&com.goo" - + "gle.cloud.dialogflow.cx.v3beta1B\nAgentPr" - + "otoP\001Z6cloud.google.com/go/dialogflow/cx" - + "/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.C" - + "loud.Dialogflow.Cx.V3Beta1\352\002&Google::Clo" - + "ud::Dialogflow::CX::V3beta1b\006proto3" + + "gleapis.com/Agent\022\025\n\rlanguage_code\030\002 \001(\t" + + "\"\200\001\n\037GetAgentValidationResultRequest\022F\n\004" + + "name\030\001 \001(\tB8\342A\001\002\372A1\n/dialogflow.googleap" + + "is.com/AgentValidationResult\022\025\n\rlanguage" + + "_code\030\002 \001(\t\"\377\001\n\025AgentValidationResult\022\014\n" + + "\004name\030\001 \001(\t\022Y\n\027flow_validation_results\030\002" + + " \003(\01328.google.cloud.dialogflow.cx.v3beta" + + "1.FlowValidationResult:}\352Az\n/dialogflow." + + "googleapis.com/AgentValidationResult\022Gpr" + + "ojects/{project}/locations/{location}/ag" + + "ents/{agent}/validationResult\"\205\001\n\034GetGen" + + "erativeSettingsRequest\022H\n\004name\030\001 \001(\tB:\342A" + + "\001\002\372A3\n1dialogflow.googleapis.com/AgentGe" + + "nerativeSettings\022\033\n\rlanguage_code\030\002 \001(\tB" + + "\004\342A\001\002\"\263\001\n\037UpdateGenerativeSettingsReques" + + "t\022Y\n\023generative_settings\030\001 \001(\01326.google." + + "cloud.dialogflow.cx.v3beta1.GenerativeSe" + + "ttingsB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMaskB\004\342A\001\0012\270\023\n\006Agents\022\275" + + "\001\n\nListAgents\0225.google.cloud.dialogflow." + + "cx.v3beta1.ListAgentsRequest\0326.google.cl" + + "oud.dialogflow.cx.v3beta1.ListAgentsResp" + + "onse\"@\332A\006parent\202\323\344\223\0021\022//v3beta1/{parent=" + + "projects/*/locations/*}/agents\022\252\001\n\010GetAg" + + "ent\0223.google.cloud.dialogflow.cx.v3beta1" + + ".GetAgentRequest\032).google.cloud.dialogfl" + + "ow.cx.v3beta1.Agent\">\332A\004name\202\323\344\223\0021\022//v3b" + + "eta1/{name=projects/*/locations/*/agents" + + "/*}\022\277\001\n\013CreateAgent\0226.google.cloud.dialo" + + "gflow.cx.v3beta1.CreateAgentRequest\032).go" + + "ogle.cloud.dialogflow.cx.v3beta1.Agent\"M" + + "\332A\014parent,agent\202\323\344\223\0028\"//v3beta1/{parent=" + + "projects/*/locations/*}/agents:\005agent\022\312\001" + + "\n\013UpdateAgent\0226.google.cloud.dialogflow." + + "cx.v3beta1.UpdateAgentRequest\032).google.c" + + "loud.dialogflow.cx.v3beta1.Agent\"X\332A\021age" + + "nt,update_mask\202\323\344\223\002>25/v3beta1/{agent.na" + + "me=projects/*/locations/*/agents/*}:\005age" + + "nt\022\235\001\n\013DeleteAgent\0226.google.cloud.dialog" + + "flow.cx.v3beta1.DeleteAgentRequest\032\026.goo" + + "gle.protobuf.Empty\">\332A\004name\202\323\344\223\0021*//v3be" + + "ta1/{name=projects/*/locations/*/agents/" + + "*}\022\327\001\n\013ExportAgent\0226.google.cloud.dialog" + + "flow.cx.v3beta1.ExportAgentRequest\032\035.goo" + + "gle.longrunning.Operation\"q\312A-\n\023ExportAg" + + "entResponse\022\026google.protobuf.Struct\202\323\344\223\002" + + ";\"6/v3beta1/{name=projects/*/locations/*" + + "/agents/*}:export:\001*\022\334\001\n\014RestoreAgent\0227." + + "google.cloud.dialogflow.cx.v3beta1.Resto" + + "reAgentRequest\032\035.google.longrunning.Oper" + + "ation\"t\312A/\n\025google.protobuf.Empty\022\026googl" + + "e.protobuf.Struct\202\323\344\223\002<\"7/v3beta1/{name=" + + "projects/*/locations/*/agents/*}:restore" + + ":\001*\022\311\001\n\rValidateAgent\0228.google.cloud.dia" + + "logflow.cx.v3beta1.ValidateAgentRequest\032" + + "9.google.cloud.dialogflow.cx.v3beta1.Age" + + "ntValidationResult\"C\202\323\344\223\002=\"8/v3beta1/{na" + + "me=projects/*/locations/*/agents/*}:vali" + + "date:\001*\022\353\001\n\030GetAgentValidationResult\022C.g" + + "oogle.cloud.dialogflow.cx.v3beta1.GetAge" + + "ntValidationResultRequest\0329.google.cloud" + + ".dialogflow.cx.v3beta1.AgentValidationRe" + + "sult\"O\332A\004name\202\323\344\223\002B\022@/v3beta1/{name=proj" + + "ects/*/locations/*/agents/*/validationRe" + + "sult}\022\362\001\n\025GetGenerativeSettings\022@.google" + + ".cloud.dialogflow.cx.v3beta1.GetGenerati" + + "veSettingsRequest\0326.google.cloud.dialogf" + + "low.cx.v3beta1.GenerativeSettings\"_\332A\022na" + + "me,language_code\202\323\344\223\002D\022B/v3beta1/{name=p" + + "rojects/*/locations/*/agents/*/generativ" + + "eSettings}\022\257\002\n\030UpdateGenerativeSettings\022" + + "C.google.cloud.dialogflow.cx.v3beta1.Upd" + + "ateGenerativeSettingsRequest\0326.google.cl" + + "oud.dialogflow.cx.v3beta1.GenerativeSett" + + "ings\"\225\001\332A\037generative_settings,update_mas" + + "k\202\323\344\223\002m2V/v3beta1/{generative_settings.n" + + "ame=projects/*/locations/*/agents/*/gene" + + "rativeSettings}:\023generative_settings\032x\312A" + + "\031dialogflow.googleapis.com\322AYhttps://www" + + ".googleapis.com/auth/cloud-platform,http" + + "s://www.googleapis.com/auth/dialogflowB\304" + + "\001\n&com.google.cloud.dialogflow.cx.v3beta" + + "1B\nAgentProtoP\001Z6cloud.google.com/go/dia" + + "logflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252" + + "\002\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&G" + + "oogle::Cloud::Dialogflow::CX::V3beta1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -349,6 +358,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitIntegrationSettings", "TextToSpeechSettings", "GenAppBuilderSettings", + "AnswerFeedbackSettings", "GenAppBuilderSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GitIntegrationSettings_descriptor = @@ -377,6 +387,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Engine", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_AnswerFeedbackSettings_descriptor, + new java.lang.String[] { + "EnableAnswerFeedback", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListAgentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3beta1_ListAgentsRequest_fieldAccessorTable = diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedback.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedback.java new file mode 100644 index 000000000000..790d73b141c5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedback.java @@ -0,0 +1,2304 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Stores information about feedback provided by users about a response.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AnswerFeedback} + */ +public final class AnswerFeedback extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) + AnswerFeedbackOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnswerFeedback.newBuilder() to construct. + private AnswerFeedback(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnswerFeedback() { + rating_ = 0; + customRating_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnswerFeedback(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.class, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder.class); + } + + /** + * + * + *
+   * Represents thumbs up/down rating provided by user about a response.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating} + */ + public enum Rating implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Rating not specified.
+     * 
+ * + * RATING_UNSPECIFIED = 0; + */ + RATING_UNSPECIFIED(0), + /** + * + * + *
+     * Thumbs up feedback from user.
+     * 
+ * + * THUMBS_UP = 1; + */ + THUMBS_UP(1), + /** + * + * + *
+     * Thumbs down feedback from user.
+     * 
+ * + * THUMBS_DOWN = 2; + */ + THUMBS_DOWN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Rating not specified.
+     * 
+ * + * RATING_UNSPECIFIED = 0; + */ + public static final int RATING_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Thumbs up feedback from user.
+     * 
+ * + * THUMBS_UP = 1; + */ + public static final int THUMBS_UP_VALUE = 1; + /** + * + * + *
+     * Thumbs down feedback from user.
+     * 
+ * + * THUMBS_DOWN = 2; + */ + public static final int THUMBS_DOWN_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 Rating 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 Rating forNumber(int value) { + switch (value) { + case 0: + return RATING_UNSPECIFIED; + case 1: + return THUMBS_UP; + case 2: + return THUMBS_DOWN; + 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 Rating findValueByNumber(int number) { + return Rating.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.cx.v3beta1.AnswerFeedback.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Rating[] VALUES = values(); + + public static Rating 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 Rating(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating) + } + + public interface RatingReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + java.util.List getReasonLabelsList(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + int getReasonLabelsCount(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + java.lang.String getReasonLabels(int index); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + com.google.protobuf.ByteString getReasonLabelsBytes(int index); + + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + java.lang.String getFeedback(); + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + com.google.protobuf.ByteString getFeedbackBytes(); + } + /** + * + * + *
+   * Stores extra information about why users provided thumbs down rating.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason} + */ + public static final class RatingReason extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) + RatingReasonOrBuilder { + private static final long serialVersionUID = 0L; + // Use RatingReason.newBuilder() to construct. + private RatingReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RatingReason() { + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + feedback_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RatingReason(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.class, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder.class); + } + + public static final int REASON_LABELS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList reasonLabels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + public com.google.protobuf.ProtocolStringList getReasonLabelsList() { + return reasonLabels_; + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + public int getReasonLabelsCount() { + return reasonLabels_.size(); + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + public java.lang.String getReasonLabels(int index) { + return reasonLabels_.get(index); + } + /** + * + * + *
+     * Optional. Custom reason labels for thumbs down rating provided by the
+     * user. The maximum number of labels allowed is 10 and the maximum length
+     * of a single label is 128 characters.
+     * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + public com.google.protobuf.ByteString getReasonLabelsBytes(int index) { + return reasonLabels_.getByteString(index); + } + + public static final int FEEDBACK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object feedback_ = ""; + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + @java.lang.Override + public java.lang.String getFeedback() { + java.lang.Object ref = feedback_; + 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(); + feedback_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Additional feedback about the rating.
+     * This field can be populated without choosing a predefined `reason`.
+     * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeedbackBytes() { + java.lang.Object ref = feedback_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + feedback_ = 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(feedback_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedback_); + } + for (int i = 0; i < reasonLabels_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reasonLabels_.getRaw(i)); + } + 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(feedback_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedback_); + } + { + int dataSize = 0; + for (int i = 0; i < reasonLabels_.size(); i++) { + dataSize += computeStringSizeNoTag(reasonLabels_.getRaw(i)); + } + size += dataSize; + size += 1 * getReasonLabelsList().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.cx.v3beta1.AnswerFeedback.RatingReason)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason other = + (com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) obj; + + if (!getReasonLabelsList().equals(other.getReasonLabelsList())) return false; + if (!getFeedback().equals(other.getFeedback())) 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 (getReasonLabelsCount() > 0) { + hash = (37 * hash) + REASON_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getReasonLabelsList().hashCode(); + } + hash = (37 * hash) + FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getFeedback().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason 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.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason 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.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason 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.cx.v3beta1.AnswerFeedback.RatingReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + 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.cx.v3beta1.AnswerFeedback.RatingReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason 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.cx.v3beta1.AnswerFeedback.RatingReason 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; + } + /** + * + * + *
+     * Stores extra information about why users provided thumbs down rating.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.class, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + feedback_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason build() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason result = + new com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + reasonLabels_.makeImmutable(); + result.reasonLabels_ = reasonLabels_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.feedback_ = feedback_; + } + } + + @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.cx.v3beta1.AnswerFeedback.RatingReason) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + .getDefaultInstance()) return this; + if (!other.reasonLabels_.isEmpty()) { + if (reasonLabels_.isEmpty()) { + reasonLabels_ = other.reasonLabels_; + bitField0_ |= 0x00000001; + } else { + ensureReasonLabelsIsMutable(); + reasonLabels_.addAll(other.reasonLabels_); + } + onChanged(); + } + if (!other.getFeedback().isEmpty()) { + feedback_ = other.feedback_; + bitField0_ |= 0x00000002; + 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 18: + { + feedback_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReasonLabelsIsMutable(); + reasonLabels_.add(s); + 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 com.google.protobuf.LazyStringArrayList reasonLabels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReasonLabelsIsMutable() { + if (!reasonLabels_.isModifiable()) { + reasonLabels_ = new com.google.protobuf.LazyStringArrayList(reasonLabels_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reasonLabels. + */ + public com.google.protobuf.ProtocolStringList getReasonLabelsList() { + reasonLabels_.makeImmutable(); + return reasonLabels_; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reasonLabels. + */ + public int getReasonLabelsCount() { + return reasonLabels_.size(); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reasonLabels at the given index. + */ + public java.lang.String getReasonLabels(int index) { + return reasonLabels_.get(index); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reasonLabels at the given index. + */ + public com.google.protobuf.ByteString getReasonLabelsBytes(int index) { + return reasonLabels_.getByteString(index); + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The reasonLabels to set. + * @return This builder for chaining. + */ + public Builder setReasonLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonLabelsIsMutable(); + reasonLabels_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addReasonLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonLabelsIsMutable(); + reasonLabels_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addAllReasonLabels(java.lang.Iterable values) { + ensureReasonLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reasonLabels_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReasonLabels() { + reasonLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Custom reason labels for thumbs down rating provided by the
+       * user. The maximum number of labels allowed is 10 and the maximum length
+       * of a single label is 128 characters.
+       * 
+ * + * repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the reasonLabels to add. + * @return This builder for chaining. + */ + public Builder addReasonLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReasonLabelsIsMutable(); + reasonLabels_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object feedback_ = ""; + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The feedback. + */ + public java.lang.String getFeedback() { + java.lang.Object ref = feedback_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedback_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for feedback. + */ + public com.google.protobuf.ByteString getFeedbackBytes() { + java.lang.Object ref = feedback_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + feedback_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The feedback to set. + * @return This builder for chaining. + */ + public Builder setFeedback(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + feedback_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFeedback() { + feedback_ = getDefaultInstance().getFeedback(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Additional feedback about the rating.
+       * This field can be populated without choosing a predefined `reason`.
+       * 
+ * + * string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for feedback to set. + * @return This builder for chaining. + */ + public Builder setFeedbackBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + feedback_ = 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.cx.v3beta1.AnswerFeedback.RatingReason) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) + private static final com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RatingReason 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.cx.v3beta1.AnswerFeedback.RatingReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RATING_FIELD_NUMBER = 1; + private int rating_ = 0; + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + @java.lang.Override + public int getRatingValue() { + return rating_; + } + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating getRating() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating result = + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.forNumber(rating_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.UNRECOGNIZED + : result; + } + + public static final int RATING_REASON_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason ratingReason_; + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + @java.lang.Override + public boolean hasRatingReason() { + return ratingReason_ != null; + } + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason getRatingReason() { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder + getRatingReasonOrBuilder() { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.getDefaultInstance() + : ratingReason_; + } + + public static final int CUSTOM_RATING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object customRating_ = ""; + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + @java.lang.Override + public java.lang.String getCustomRating() { + java.lang.Object ref = customRating_; + 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(); + customRating_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomRatingBytes() { + java.lang.Object ref = customRating_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRating_ = 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 (rating_ + != com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.RATING_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, rating_); + } + if (ratingReason_ != null) { + output.writeMessage(2, getRatingReason()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customRating_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, customRating_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rating_ + != com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.RATING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rating_); + } + if (ratingReason_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRatingReason()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customRating_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, customRating_); + } + 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.cx.v3beta1.AnswerFeedback)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback other = + (com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) obj; + + if (rating_ != other.rating_) return false; + if (hasRatingReason() != other.hasRatingReason()) return false; + if (hasRatingReason()) { + if (!getRatingReason().equals(other.getRatingReason())) return false; + } + if (!getCustomRating().equals(other.getCustomRating())) 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) + RATING_FIELD_NUMBER; + hash = (53 * hash) + rating_; + if (hasRatingReason()) { + hash = (37 * hash) + RATING_REASON_FIELD_NUMBER; + hash = (53 * hash) + getRatingReason().hashCode(); + } + hash = (37 * hash) + CUSTOM_RATING_FIELD_NUMBER; + hash = (53 * hash) + getCustomRating().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback 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.cx.v3beta1.AnswerFeedback parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback 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.cx.v3beta1.AnswerFeedback parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback 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.cx.v3beta1.AnswerFeedback parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback 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.cx.v3beta1.AnswerFeedback parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback 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.cx.v3beta1.AnswerFeedback 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; + } + /** + * + * + *
+   * Stores information about feedback provided by users about a response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AnswerFeedback} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.class, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rating_ = 0; + ratingReason_ = null; + if (ratingReasonBuilder_ != null) { + ratingReasonBuilder_.dispose(); + ratingReasonBuilder_ = null; + } + customRating_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback build() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback result = + new com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rating_ = rating_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ratingReason_ = + ratingReasonBuilder_ == null ? ratingReason_ : ratingReasonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customRating_ = customRating_; + } + } + + @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.cx.v3beta1.AnswerFeedback) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance()) + return this; + if (other.rating_ != 0) { + setRatingValue(other.getRatingValue()); + } + if (other.hasRatingReason()) { + mergeRatingReason(other.getRatingReason()); + } + if (!other.getCustomRating().isEmpty()) { + customRating_ = other.customRating_; + 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 8: + { + rating_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getRatingReasonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + customRating_ = 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 int rating_ = 0; + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + @java.lang.Override + public int getRatingValue() { + return rating_; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for rating to set. + * @return This builder for chaining. + */ + public Builder setRatingValue(int value) { + rating_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating getRating() { + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating result = + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.forNumber(rating_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rating to set. + * @return This builder for chaining. + */ + public Builder setRating(com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rating_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Rating from user for the specific Dialogflow response.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRating() { + bitField0_ = (bitField0_ & ~0x00000001); + rating_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason ratingReason_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder> + ratingReasonBuilder_; + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + public boolean hasRatingReason() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason getRatingReason() { + if (ratingReasonBuilder_ == null) { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + .getDefaultInstance() + : ratingReason_; + } else { + return ratingReasonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingReason( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason value) { + if (ratingReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ratingReason_ = value; + } else { + ratingReasonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingReason( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder + builderForValue) { + if (ratingReasonBuilder_ == null) { + ratingReason_ = builderForValue.build(); + } else { + ratingReasonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRatingReason( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason value) { + if (ratingReasonBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ratingReason_ != null + && ratingReason_ + != com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + .getDefaultInstance()) { + getRatingReasonBuilder().mergeFrom(value); + } else { + ratingReason_ = value; + } + } else { + ratingReasonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRatingReason() { + bitField0_ = (bitField0_ & ~0x00000002); + ratingReason_ = null; + if (ratingReasonBuilder_ != null) { + ratingReasonBuilder_.dispose(); + ratingReasonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder + getRatingReasonBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRatingReasonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder + getRatingReasonOrBuilder() { + if (ratingReasonBuilder_ != null) { + return ratingReasonBuilder_.getMessageOrBuilder(); + } else { + return ratingReason_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + .getDefaultInstance() + : ratingReason_; + } + } + /** + * + * + *
+     * Optional. In case of thumbs down rating provided, users can optionally
+     * provide context about the rating.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder> + getRatingReasonFieldBuilder() { + if (ratingReasonBuilder_ == null) { + ratingReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder>( + getRatingReason(), getParentForChildren(), isClean()); + ratingReason_ = null; + } + return ratingReasonBuilder_; + } + + private java.lang.Object customRating_ = ""; + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + public java.lang.String getCustomRating() { + java.lang.Object ref = customRating_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customRating_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + public com.google.protobuf.ByteString getCustomRatingBytes() { + java.lang.Object ref = customRating_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRating_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The customRating to set. + * @return This builder for chaining. + */ + public Builder setCustomRating(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customRating_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRating() { + customRating_ = getDefaultInstance().getCustomRating(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Custom rating from the user about the provided answer, with
+     * maximum length of 1024 characters. For example, client could use a
+     * customized JSON object to indicate the rating.
+     * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for customRating to set. + * @return This builder for chaining. + */ + public Builder setCustomRatingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customRating_ = 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.cx.v3beta1.AnswerFeedback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) + private static final com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerFeedback 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.cx.v3beta1.AnswerFeedback getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedbackOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedbackOrBuilder.java new file mode 100644 index 000000000000..63ae3ef44acc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AnswerFeedbackOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface AnswerFeedbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rating. + */ + int getRatingValue(); + /** + * + * + *
+   * Optional. Rating from user for the specific Dialogflow response.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rating. + */ + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating getRating(); + + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingReason field is set. + */ + boolean hasRatingReason(); + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingReason. + */ + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason getRatingReason(); + /** + * + * + *
+   * Optional. In case of thumbs down rating provided, users can optionally
+   * provide context about the rating.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReasonOrBuilder + getRatingReasonOrBuilder(); + + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRating. + */ + java.lang.String getCustomRating(); + /** + * + * + *
+   * Optional. Custom rating from the user about the provided answer, with
+   * maximum length of 1024 characters. For example, client could use a
+   * customized JSON object to indicate the rating.
+   * 
+ * + * string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customRating. + */ + com.google.protobuf.ByteString getCustomRatingBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java index d9e230360c8b..a219636540c9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_SpeechWordInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_SpeechWordInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_InputAudioConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -72,61 +76,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "fo\022\014\n\004word\030\003 \001(\t\022/\n\014start_offset\030\001 \001(\0132\031" + ".google.protobuf.Duration\022-\n\nend_offset\030" + "\002 \001(\0132\031.google.protobuf.Duration\022\022\n\nconf" - + "idence\030\004 \001(\002\"\246\002\n\020InputAudioConfig\022O\n\016aud" - + "io_encoding\030\001 \001(\01621.google.cloud.dialogf" - + "low.cx.v3beta1.AudioEncodingB\004\342A\001\002\022\031\n\021sa" - + "mple_rate_hertz\030\002 \001(\005\022\030\n\020enable_word_inf" - + "o\030\r \001(\010\022\024\n\014phrase_hints\030\004 \003(\t\022\r\n\005model\030\007" - + " \001(\t\022M\n\rmodel_variant\030\n \001(\01626.google.clo" - + "ud.dialogflow.cx.v3beta1.SpeechModelVari" - + "ant\022\030\n\020single_utterance\030\010 \001(\010\"n\n\024VoiceSe" - + "lectionParams\022\014\n\004name\030\001 \001(\t\022H\n\013ssml_gend" - + "er\030\002 \001(\01623.google.cloud.dialogflow.cx.v3" - + "beta1.SsmlVoiceGender\"\273\001\n\026SynthesizeSpee" - + "chConfig\022\025\n\rspeaking_rate\030\001 \001(\001\022\r\n\005pitch" - + "\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(\001\022\032\n\022effect" - + "s_profile_id\030\005 \003(\t\022G\n\005voice\030\004 \001(\01328.goog" - + "le.cloud.dialogflow.cx.v3beta1.VoiceSele" - + "ctionParams\"\343\001\n\021OutputAudioConfig\022U\n\016aud" - + "io_encoding\030\001 \001(\01627.google.cloud.dialogf" - + "low.cx.v3beta1.OutputAudioEncodingB\004\342A\001\002" - + "\022\031\n\021sample_rate_hertz\030\002 \001(\005\022\\\n\030synthesiz" - + "e_speech_config\030\003 \001(\0132:.google.cloud.dia" - + "logflow.cx.v3beta1.SynthesizeSpeechConfi" - + "g\"\214\002\n\024TextToSpeechSettings\022x\n\031synthesize" - + "_speech_configs\030\001 \003(\0132U.google.cloud.dia" - + "logflow.cx.v3beta1.TextToSpeechSettings." - + "SynthesizeSpeechConfigsEntry\032z\n\034Synthesi" - + "zeSpeechConfigsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005val" - + "ue\030\002 \001(\0132:.google.cloud.dialogflow.cx.v3" - + "beta1.SynthesizeSpeechConfig:\0028\001*\373\001\n\rAud" - + "ioEncoding\022\036\n\032AUDIO_ENCODING_UNSPECIFIED" - + "\020\000\022\034\n\030AUDIO_ENCODING_LINEAR_16\020\001\022\027\n\023AUDI" - + "O_ENCODING_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MULA" - + "W\020\003\022\026\n\022AUDIO_ENCODING_AMR\020\004\022\031\n\025AUDIO_ENC" - + "ODING_AMR_WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_OPU" - + "S\020\006\022)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_" - + "BYTE\020\007*v\n\022SpeechModelVariant\022$\n SPEECH_M" - + "ODEL_VARIANT_UNSPECIFIED\020\000\022\026\n\022USE_BEST_A" - + "VAILABLE\020\001\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_ENHA" - + "NCED\020\003*\215\001\n\017SsmlVoiceGender\022!\n\035SSML_VOICE" - + "_GENDER_UNSPECIFIED\020\000\022\032\n\026SSML_VOICE_GEND" - + "ER_MALE\020\001\022\034\n\030SSML_VOICE_GENDER_FEMALE\020\002\022" - + "\035\n\031SSML_VOICE_GENDER_NEUTRAL\020\003*\354\001\n\023Outpu" - + "tAudioEncoding\022%\n!OUTPUT_AUDIO_ENCODING_" - + "UNSPECIFIED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_L" - + "INEAR_16\020\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3\020" - + "\002\022%\n!OUTPUT_AUDIO_ENCODING_MP3_64_KBPS\020\004" - + "\022\"\n\036OUTPUT_AUDIO_ENCODING_OGG_OPUS\020\003\022\037\n\033" - + "OUTPUT_AUDIO_ENCODING_MULAW\020\005B\242\002\n&com.go" - + "ogle.cloud.dialogflow.cx.v3beta1B\020AudioC" - + "onfigProtoP\001Z6cloud.google.com/go/dialog" - + "flow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"G" - + "oogle.Cloud.Dialogflow.Cx.V3Beta1\352\002&Goog" - + "le::Cloud::Dialogflow::CX::V3beta1\352AU\n\033a" - + "utoml.googleapis.com/Model\0226projects/{pr" - + "oject}/locations/{location}/models/{mode" - + "l}b\006proto3" + + "idence\030\004 \001(\002\"{\n\rBargeInConfig\0227\n\024no_barg" + + "e_in_duration\030\001 \001(\0132\031.google.protobuf.Du" + + "ration\0221\n\016total_duration\030\002 \001(\0132\031.google." + + "protobuf.Duration\"\362\002\n\020InputAudioConfig\022O" + + "\n\016audio_encoding\030\001 \001(\01621.google.cloud.di" + + "alogflow.cx.v3beta1.AudioEncodingB\004\342A\001\002\022" + + "\031\n\021sample_rate_hertz\030\002 \001(\005\022\030\n\020enable_wor" + + "d_info\030\r \001(\010\022\024\n\014phrase_hints\030\004 \003(\t\022\r\n\005mo" + + "del\030\007 \001(\t\022M\n\rmodel_variant\030\n \001(\01626.googl" + + "e.cloud.dialogflow.cx.v3beta1.SpeechMode" + + "lVariant\022\030\n\020single_utterance\030\010 \001(\010\022J\n\017ba" + + "rge_in_config\030\017 \001(\01321.google.cloud.dialo" + + "gflow.cx.v3beta1.BargeInConfig\"n\n\024VoiceS" + + "electionParams\022\014\n\004name\030\001 \001(\t\022H\n\013ssml_gen" + + "der\030\002 \001(\01623.google.cloud.dialogflow.cx.v" + + "3beta1.SsmlVoiceGender\"\273\001\n\026SynthesizeSpe" + + "echConfig\022\025\n\rspeaking_rate\030\001 \001(\001\022\r\n\005pitc" + + "h\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(\001\022\032\n\022effec" + + "ts_profile_id\030\005 \003(\t\022G\n\005voice\030\004 \001(\01328.goo" + + "gle.cloud.dialogflow.cx.v3beta1.VoiceSel" + + "ectionParams\"\343\001\n\021OutputAudioConfig\022U\n\016au" + + "dio_encoding\030\001 \001(\01627.google.cloud.dialog" + + "flow.cx.v3beta1.OutputAudioEncodingB\004\342A\001" + + "\002\022\031\n\021sample_rate_hertz\030\002 \001(\005\022\\\n\030synthesi" + + "ze_speech_config\030\003 \001(\0132:.google.cloud.di" + + "alogflow.cx.v3beta1.SynthesizeSpeechConf" + + "ig\"\214\002\n\024TextToSpeechSettings\022x\n\031synthesiz" + + "e_speech_configs\030\001 \003(\0132U.google.cloud.di" + + "alogflow.cx.v3beta1.TextToSpeechSettings" + + ".SynthesizeSpeechConfigsEntry\032z\n\034Synthes" + + "izeSpeechConfigsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005va" + + "lue\030\002 \001(\0132:.google.cloud.dialogflow.cx.v" + + "3beta1.SynthesizeSpeechConfig:\0028\001*\373\001\n\rAu" + + "dioEncoding\022\036\n\032AUDIO_ENCODING_UNSPECIFIE" + + "D\020\000\022\034\n\030AUDIO_ENCODING_LINEAR_16\020\001\022\027\n\023AUD" + + "IO_ENCODING_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MUL" + + "AW\020\003\022\026\n\022AUDIO_ENCODING_AMR\020\004\022\031\n\025AUDIO_EN" + + "CODING_AMR_WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_OP" + + "US\020\006\022)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER" + + "_BYTE\020\007*v\n\022SpeechModelVariant\022$\n SPEECH_" + + "MODEL_VARIANT_UNSPECIFIED\020\000\022\026\n\022USE_BEST_" + + "AVAILABLE\020\001\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_ENH" + + "ANCED\020\003*\215\001\n\017SsmlVoiceGender\022!\n\035SSML_VOIC" + + "E_GENDER_UNSPECIFIED\020\000\022\032\n\026SSML_VOICE_GEN" + + "DER_MALE\020\001\022\034\n\030SSML_VOICE_GENDER_FEMALE\020\002" + + "\022\035\n\031SSML_VOICE_GENDER_NEUTRAL\020\003*\354\001\n\023Outp" + + "utAudioEncoding\022%\n!OUTPUT_AUDIO_ENCODING" + + "_UNSPECIFIED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_" + + "LINEAR_16\020\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3" + + "\020\002\022%\n!OUTPUT_AUDIO_ENCODING_MP3_64_KBPS\020" + + "\004\022\"\n\036OUTPUT_AUDIO_ENCODING_OGG_OPUS\020\003\022\037\n" + + "\033OUTPUT_AUDIO_ENCODING_MULAW\020\005B\242\002\n&com.g" + + "oogle.cloud.dialogflow.cx.v3beta1B\020Audio" + + "ConfigProtoP\001Z6cloud.google.com/go/dialo" + + "gflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"" + + "Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Goo" + + "gle::Cloud::Dialogflow::CX::V3beta1\352AU\n\033" + + "automl.googleapis.com/Model\0226projects/{p" + + "roject}/locations/{location}/models/{mod" + + "el}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -144,8 +153,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Word", "StartOffset", "EndOffset", "Confidence", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_InputAudioConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor, + new java.lang.String[] { + "NoBargeInDuration", "TotalDuration", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_InputAudioConfig_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3beta1_InputAudioConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_InputAudioConfig_descriptor, @@ -157,9 +174,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Model", "ModelVariant", "SingleUtterance", + "BargeInConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_VoiceSelectionParams_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_dialogflow_cx_v3beta1_VoiceSelectionParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_VoiceSelectionParams_descriptor, @@ -167,7 +185,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SsmlGender", }); internal_static_google_cloud_dialogflow_cx_v3beta1_SynthesizeSpeechConfig_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_dialogflow_cx_v3beta1_SynthesizeSpeechConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_SynthesizeSpeechConfig_descriptor, @@ -175,7 +193,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SpeakingRate", "Pitch", "VolumeGainDb", "EffectsProfileId", "Voice", }); internal_static_google_cloud_dialogflow_cx_v3beta1_OutputAudioConfig_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_dialogflow_cx_v3beta1_OutputAudioConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_OutputAudioConfig_descriptor, @@ -183,7 +201,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AudioEncoding", "SampleRateHertz", "SynthesizeSpeechConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TextToSpeechSettings_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_cx_v3beta1_TextToSpeechSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_TextToSpeechSettings_descriptor, diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfig.java new file mode 100644 index 000000000000..87bdf9acf1e2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfig.java @@ -0,0 +1,1032 @@ +/* + * 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/cx/v3beta1/audio_config.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Configuration of the barge-in behavior. Barge-in instructs the API to return
+ * a detected utterance at a proper time while the client is playing back the
+ * response audio from a previous request. When the client sees the
+ * utterance, it should stop the playback and immediately get ready for
+ * receiving the responses for the current request.
+ *
+ * The barge-in handling requires the client to start streaming audio input
+ * as soon as it starts playing back the audio from the previous response. The
+ * playback is modeled into two phases:
+ *
+ * * No barge-in phase: which goes first and during which speech detection
+ *   should not be carried out.
+ *
+ * * Barge-in phase: which follows the no barge-in phase and during which
+ *   the API starts speech detection and may inform the client that an utterance
+ *   has been detected. Note that no-speech event is not expected in this
+ *   phase.
+ *
+ * The client provides this configuration in terms of the durations of those
+ * two phases. The durations are measured in terms of the audio length from the
+ * the start of the input audio.
+ *
+ * No-speech event is a response with END_OF_UTTERANCE without any transcript
+ * following up.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BargeInConfig} + */ +public final class BargeInConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BargeInConfig) + BargeInConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BargeInConfig.newBuilder() to construct. + private BargeInConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BargeInConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BargeInConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder.class); + } + + public static final int NO_BARGE_IN_DURATION_FIELD_NUMBER = 1; + private com.google.protobuf.Duration noBargeInDuration_; + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + @java.lang.Override + public boolean hasNoBargeInDuration() { + return noBargeInDuration_ != null; + } + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getNoBargeInDuration() { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder() { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + + public static final int TOTAL_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration totalDuration_; + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + @java.lang.Override + public boolean hasTotalDuration() { + return totalDuration_ != null; + } + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTotalDuration() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + + 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 (noBargeInDuration_ != null) { + output.writeMessage(1, getNoBargeInDuration()); + } + if (totalDuration_ != null) { + output.writeMessage(2, getTotalDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (noBargeInDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNoBargeInDuration()); + } + if (totalDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTotalDuration()); + } + 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.cx.v3beta1.BargeInConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig) obj; + + if (hasNoBargeInDuration() != other.hasNoBargeInDuration()) return false; + if (hasNoBargeInDuration()) { + if (!getNoBargeInDuration().equals(other.getNoBargeInDuration())) return false; + } + if (hasTotalDuration() != other.hasTotalDuration()) return false; + if (hasTotalDuration()) { + if (!getTotalDuration().equals(other.getTotalDuration())) 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 (hasNoBargeInDuration()) { + hash = (37 * hash) + NO_BARGE_IN_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getNoBargeInDuration().hashCode(); + } + if (hasTotalDuration()) { + hash = (37 * hash) + TOTAL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTotalDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig 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.cx.v3beta1.BargeInConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig 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.cx.v3beta1.BargeInConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig 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.cx.v3beta1.BargeInConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig 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.cx.v3beta1.BargeInConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig 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.cx.v3beta1.BargeInConfig 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; + } + /** + * + * + *
+   * Configuration of the barge-in behavior. Barge-in instructs the API to return
+   * a detected utterance at a proper time while the client is playing back the
+   * response audio from a previous request. When the client sees the
+   * utterance, it should stop the playback and immediately get ready for
+   * receiving the responses for the current request.
+   *
+   * The barge-in handling requires the client to start streaming audio input
+   * as soon as it starts playing back the audio from the previous response. The
+   * playback is modeled into two phases:
+   *
+   * * No barge-in phase: which goes first and during which speech detection
+   *   should not be carried out.
+   *
+   * * Barge-in phase: which follows the no barge-in phase and during which
+   *   the API starts speech detection and may inform the client that an utterance
+   *   has been detected. Note that no-speech event is not expected in this
+   *   phase.
+   *
+   * The client provides this configuration in terms of the durations of those
+   * two phases. The durations are measured in terms of the audio length from the
+   * the start of the input audio.
+   *
+   * No-speech event is a response with END_OF_UTTERANCE without any transcript
+   * following up.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BargeInConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BargeInConfig) + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + noBargeInDuration_ = null; + if (noBargeInDurationBuilder_ != null) { + noBargeInDurationBuilder_.dispose(); + noBargeInDurationBuilder_ = null; + } + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BargeInConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.noBargeInDuration_ = + noBargeInDurationBuilder_ == null + ? noBargeInDuration_ + : noBargeInDurationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalDuration_ = + totalDurationBuilder_ == null ? totalDuration_ : totalDurationBuilder_.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.cx.v3beta1.BargeInConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance()) + return this; + if (other.hasNoBargeInDuration()) { + mergeNoBargeInDuration(other.getNoBargeInDuration()); + } + if (other.hasTotalDuration()) { + mergeTotalDuration(other.getTotalDuration()); + } + 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( + getNoBargeInDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTotalDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.Duration noBargeInDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + noBargeInDurationBuilder_; + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + public boolean hasNoBargeInDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + public com.google.protobuf.Duration getNoBargeInDuration() { + if (noBargeInDurationBuilder_ == null) { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } else { + return noBargeInDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder setNoBargeInDuration(com.google.protobuf.Duration value) { + if (noBargeInDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + noBargeInDuration_ = value; + } else { + noBargeInDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder setNoBargeInDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (noBargeInDurationBuilder_ == null) { + noBargeInDuration_ = builderForValue.build(); + } else { + noBargeInDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder mergeNoBargeInDuration(com.google.protobuf.Duration value) { + if (noBargeInDurationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && noBargeInDuration_ != null + && noBargeInDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getNoBargeInDurationBuilder().mergeFrom(value); + } else { + noBargeInDuration_ = value; + } + } else { + noBargeInDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public Builder clearNoBargeInDuration() { + bitField0_ = (bitField0_ & ~0x00000001); + noBargeInDuration_ = null; + if (noBargeInDurationBuilder_ != null) { + noBargeInDurationBuilder_.dispose(); + noBargeInDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public com.google.protobuf.Duration.Builder getNoBargeInDurationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNoBargeInDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + public com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder() { + if (noBargeInDurationBuilder_ != null) { + return noBargeInDurationBuilder_.getMessageOrBuilder(); + } else { + return noBargeInDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : noBargeInDuration_; + } + } + /** + * + * + *
+     * Duration that is not eligible for barge-in at the beginning of the input
+     * audio.
+     * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getNoBargeInDurationFieldBuilder() { + if (noBargeInDurationBuilder_ == null) { + noBargeInDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getNoBargeInDuration(), getParentForChildren(), isClean()); + noBargeInDuration_ = null; + } + return noBargeInDurationBuilder_; + } + + private com.google.protobuf.Duration totalDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + totalDurationBuilder_; + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + public boolean hasTotalDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + public com.google.protobuf.Duration getTotalDuration() { + if (totalDurationBuilder_ == null) { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } else { + return totalDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + totalDuration_ = value; + } else { + totalDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (totalDurationBuilder_ == null) { + totalDuration_ = builderForValue.build(); + } else { + totalDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder mergeTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && totalDuration_ != null + && totalDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTotalDurationBuilder().mergeFrom(value); + } else { + totalDuration_ = value; + } + } else { + totalDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder clearTotalDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.Duration.Builder getTotalDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTotalDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + if (totalDurationBuilder_ != null) { + return totalDurationBuilder_.getMessageOrBuilder(); + } else { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + } + /** + * + * + *
+     * Total duration for the playback at the beginning of the input audio.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTotalDurationFieldBuilder() { + if (totalDurationBuilder_ == null) { + totalDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTotalDuration(), getParentForChildren(), isClean()); + totalDuration_ = null; + } + return totalDurationBuilder_; + } + + @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.cx.v3beta1.BargeInConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BargeInConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BargeInConfig 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.cx.v3beta1.BargeInConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfigOrBuilder.java new file mode 100644 index 000000000000..6d898e91d135 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BargeInConfigOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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/cx/v3beta1/audio_config.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BargeInConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BargeInConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return Whether the noBargeInDuration field is set. + */ + boolean hasNoBargeInDuration(); + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + * + * @return The noBargeInDuration. + */ + com.google.protobuf.Duration getNoBargeInDuration(); + /** + * + * + *
+   * Duration that is not eligible for barge-in at the beginning of the input
+   * audio.
+   * 
+ * + * .google.protobuf.Duration no_barge_in_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder(); + + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + boolean hasTotalDuration(); + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + com.google.protobuf.Duration getTotalDuration(); + /** + * + * + *
+   * Total duration for the playback at the beginning of the input audio.
+   * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpec.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpec.java new file mode 100644 index 000000000000..779cf441e5c3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpec.java @@ -0,0 +1,1997 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Boost specification to boost certain documents.
+ * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
+ * is available at
+ * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec} + */ +public final class BoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec) + BoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostSpec.newBuilder() to construct. + private BoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoostSpec() { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder.class); + } + + public interface ConditionBoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + java.lang.String getCondition(); + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * Optional. Strength of the condition boost, which should be in [-1, 1].
+     * Negative boost means demotion. Default is 0.0.
+     *
+     * Setting to 1.0 gives the document a big promotion. However, it does not
+     * necessarily mean that the boosted document will be the top result at
+     * all times, nor that other documents will be excluded. Results could
+     * still be shown even when none of them matches the condition. And
+     * results that are significantly more relevant to the search query can
+     * still trump your heavily favored but irrelevant documents.
+     *
+     * Setting to -1.0 gives the document a big demotion. However, results
+     * that are deeply relevant might still be shown. The document will have
+     * an upstream battle to get a fairly high ranking, but it is not blocked
+     * out completely.
+     *
+     * Setting to 0.0 means no boost applied. The boosting condition is
+     * ignored.
+     * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + float getBoost(); + } + /** + * + * + *
+   * Boost applies to documents which match a condition.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} + */ + public static final class ConditionBoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) + ConditionBoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionBoostSpec.newBuilder() to construct. + private ConditionBoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConditionBoostSpec() { + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionBoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder.class); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + 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(); + condition_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. An expression which specifies a boost condition. The syntax and
+     * supported fields are the same as a filter expression.
+     * Examples:
+     *
+     * * To boost documents with document ID "doc_1" or "doc_2", and
+     * color
+     *   "Red" or "Blue":
+     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+     * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_FIELD_NUMBER = 2; + private float boost_ = 0F; + /** + * + * + *
+     * Optional. Strength of the condition boost, which should be in [-1, 1].
+     * Negative boost means demotion. Default is 0.0.
+     *
+     * Setting to 1.0 gives the document a big promotion. However, it does not
+     * necessarily mean that the boosted document will be the top result at
+     * all times, nor that other documents will be excluded. Results could
+     * still be shown even when none of them matches the condition. And
+     * results that are significantly more relevant to the search query can
+     * still trump your heavily favored but irrelevant documents.
+     *
+     * Setting to -1.0 gives the document a big demotion. However, results
+     * that are deeply relevant might still be shown. The document will have
+     * an upstream battle to get a fairly high ranking, but it is not blocked
+     * out completely.
+     *
+     * Setting to 0.0 means no boost applied. The boosting condition is
+     * ignored.
+     * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + + 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(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + output.writeFloat(2, boost_); + } + 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(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + } + 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.cx.v3beta1.BoostSpec.ConditionBoostSpec)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec other = + (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) 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) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.cx.v3beta1.BoostSpec.ConditionBoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + 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.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.cx.v3beta1.BoostSpec.ConditionBoostSpec 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; + } + /** + * + * + *
+     * Boost applies to documents which match a condition.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + condition_ = ""; + boost_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec build() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result = + new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boost_ = boost_; + } + } + + @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.cx.v3beta1.BoostSpec.ConditionBoostSpec) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + .getDefaultInstance()) return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + 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: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + 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 condition_ = ""; + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression.
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float boost_; + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Strength of the condition boost, which should be in [-1, 1].
+       * Negative boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + bitField0_ = (bitField0_ & ~0x00000002); + boost_ = 0F; + 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.cx.v3beta1.BoostSpec.ConditionBoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) + private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionBoostSpec 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.cx.v3beta1.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + conditionBoostSpecs_; + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getConditionBoostSpecsList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getConditionBoostSpecsCount() { + return conditionBoostSpecs_.size(); + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getConditionBoostSpecs( + int index) { + return conditionBoostSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + return conditionBoostSpecs_.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 < conditionBoostSpecs_.size(); i++) { + output.writeMessage(1, conditionBoostSpecs_.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 < conditionBoostSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, conditionBoostSpecs_.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.cx.v3beta1.BoostSpec)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec other = + (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec) obj; + + if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) 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 (getConditionBoostSpecsCount() > 0) { + hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec 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; + } + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
+   * is available at
+   * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec) + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } else { + conditionBoostSpecs_ = null; + conditionBoostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec build() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result = + new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result) { + if (conditionBoostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionBoostSpecs_ = conditionBoostSpecs_; + } else { + result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.cx.v3beta1.BoostSpec) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance()) + return this; + if (conditionBoostSpecsBuilder_ == null) { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecs_.isEmpty()) { + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); + } + onChanged(); + } + } else { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecsBuilder_.isEmpty()) { + conditionBoostSpecsBuilder_.dispose(); + conditionBoostSpecsBuilder_ = null; + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionBoostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionBoostSpecsFieldBuilder() + : null; + } else { + conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); + } + } + } + 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: + { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + 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.util.List + conditionBoostSpecs_ = java.util.Collections.emptyList(); + + private void ensureConditionBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec>( + conditionBoostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> + conditionBoostSpecsBuilder_; + + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getConditionBoostSpecsList() { + if (conditionBoostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } else { + return conditionBoostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getConditionBoostSpecsCount() { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.size(); + } else { + return conditionBoostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConditionBoostSpecs( + int index, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllConditionBoostSpecs( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec> + values) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditionBoostSpecs_); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConditionBoostSpecs() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionBoostSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.remove(index); + onChanged(); + } else { + conditionBoostSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + getConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + if (conditionBoostSpecsBuilder_ != null) { + return conditionBoostSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + addConditionBoostSpecsBuilder() { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder + addConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Condition boost specifications. If a document matches multiple
+     * conditions in the specifictions, boost scores from these specifications are
+     * all applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder> + getConditionBoostSpecsBuilderList() { + return getConditionBoostSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsFieldBuilder() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder>( + conditionBoostSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditionBoostSpecs_ = null; + } + return conditionBoostSpecsBuilder_; + } + + @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.cx.v3beta1.BoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpec) + private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostSpec 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.cx.v3beta1.BoostSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecOrBuilder.java new file mode 100644 index 000000000000..67c956a31b42 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecOrBuilder.java @@ -0,0 +1,106 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getConditionBoostSpecsList(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getConditionBoostSpecs( + int index); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getConditionBoostSpecsCount(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Condition boost specifications. If a document matches multiple
+   * conditions in the specifictions, boost scores from these specifications are
+   * all applied and combined in a non-linear way. Maximum number of
+   * specifications is 20.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecs.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecs.java new file mode 100644 index 000000000000..03a5e0cb816d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecs.java @@ -0,0 +1,1325 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Boost specifications for data stores.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpecs} + */ +public final class BoostSpecs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpecs) + BoostSpecsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostSpecs.newBuilder() to construct. + private BoostSpecs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoostSpecs() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + spec_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostSpecs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder.class); + } + + public static final int DATA_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + return dataStores_; + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + + public static final int SPEC_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List spec_; + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getSpecList() { + return spec_; + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSpecOrBuilderList() { + return spec_; + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSpecCount() { + return spec_.size(); + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getSpec(int index) { + return spec_.get(index); + } + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder getSpecOrBuilder(int index) { + return spec_.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 < dataStores_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStores_.getRaw(i)); + } + for (int i = 0; i < spec_.size(); i++) { + output.writeMessage(2, spec_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < dataStores_.size(); i++) { + dataSize += computeStringSizeNoTag(dataStores_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataStoresList().size(); + } + for (int i = 0; i < spec_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spec_.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.cx.v3beta1.BoostSpecs)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs other = + (com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs) obj; + + if (!getDataStoresList().equals(other.getDataStoresList())) return false; + if (!getSpecList().equals(other.getSpecList())) 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 (getDataStoresCount() > 0) { + hash = (37 * hash) + DATA_STORES_FIELD_NUMBER; + hash = (53 * hash) + getDataStoresList().hashCode(); + } + if (getSpecCount() > 0) { + hash = (37 * hash) + SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpecList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.cx.v3beta1.BoostSpecs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.cx.v3beta1.BoostSpecs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.cx.v3beta1.BoostSpecs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.cx.v3beta1.BoostSpecs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.cx.v3beta1.BoostSpecs 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; + } + /** + * + * + *
+   * Boost specifications for data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpecs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpecs) + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.class, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (specBuilder_ == null) { + spec_ = java.util.Collections.emptyList(); + } else { + spec_ = null; + specBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs build() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result = + new com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result) { + if (specBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + spec_ = java.util.Collections.unmodifiableList(spec_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.spec_ = spec_; + } else { + result.spec_ = specBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + dataStores_.makeImmutable(); + result.dataStores_ = dataStores_; + } + } + + @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.cx.v3beta1.BoostSpecs) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance()) + return this; + if (!other.dataStores_.isEmpty()) { + if (dataStores_.isEmpty()) { + dataStores_ = other.dataStores_; + bitField0_ |= 0x00000001; + } else { + ensureDataStoresIsMutable(); + dataStores_.addAll(other.dataStores_); + } + onChanged(); + } + if (specBuilder_ == null) { + if (!other.spec_.isEmpty()) { + if (spec_.isEmpty()) { + spec_ = other.spec_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSpecIsMutable(); + spec_.addAll(other.spec_); + } + onChanged(); + } + } else { + if (!other.spec_.isEmpty()) { + if (specBuilder_.isEmpty()) { + specBuilder_.dispose(); + specBuilder_ = null; + spec_ = other.spec_; + bitField0_ = (bitField0_ & ~0x00000002); + specBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpecFieldBuilder() + : null; + } else { + specBuilder_.addAllMessages(other.spec_); + } + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataStoresIsMutable(); + dataStores_.add(s); + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.parser(), + extensionRegistry); + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(m); + } else { + specBuilder_.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 com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataStoresIsMutable() { + if (!dataStores_.isModifiable()) { + dataStores_ = new com.google.protobuf.LazyStringArrayList(dataStores_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + dataStores_.makeImmutable(); + return dataStores_; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The dataStores to set. + * @return This builder for chaining. + */ + public Builder setDataStores(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStores(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The dataStores to add. + * @return This builder for chaining. + */ + public Builder addAllDataStores(java.lang.Iterable values) { + ensureDataStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStores_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStores() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStoresBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List spec_ = + java.util.Collections.emptyList(); + + private void ensureSpecIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + spec_ = new java.util.ArrayList(spec_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder> + specBuilder_; + + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getSpecList() { + if (specBuilder_ == null) { + return java.util.Collections.unmodifiableList(spec_); + } else { + return specBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSpecCount() { + if (specBuilder_ == null) { + return spec_.size(); + } else { + return specBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getSpec(int index) { + if (specBuilder_ == null) { + return spec_.get(index); + } else { + return specBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSpec(int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.set(index, value); + onChanged(); + } else { + specBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSpec( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.set(index, builderForValue.build()); + onChanged(); + } else { + specBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.add(value); + onChanged(); + } else { + specBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec(int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) { + if (specBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecIsMutable(); + spec_.add(index, value); + onChanged(); + } else { + specBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(builderForValue.build()); + onChanged(); + } else { + specBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSpec( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.add(index, builderForValue.build()); + onChanged(); + } else { + specBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSpec( + java.lang.Iterable values) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spec_); + onChanged(); + } else { + specBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSpec() { + if (specBuilder_ == null) { + spec_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + specBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSpec(int index) { + if (specBuilder_ == null) { + ensureSpecIsMutable(); + spec_.remove(index); + onChanged(); + } else { + specBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder getSpecBuilder(int index) { + return getSpecFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder getSpecOrBuilder(int index) { + if (specBuilder_ == null) { + return spec_.get(index); + } else { + return specBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSpecOrBuilderList() { + if (specBuilder_ != null) { + return specBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spec_); + } + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder addSpecBuilder() { + return getSpecFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder addSpecBuilder(int index) { + return getSpecFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of boosting specifications.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSpecBuilderList() { + return getSpecFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder> + getSpecFieldBuilder() { + if (specBuilder_ == null) { + specBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>( + spec_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + spec_ = null; + } + return specBuilder_; + } + + @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.cx.v3beta1.BoostSpecs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpecs) + private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostSpecs 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.cx.v3beta1.BoostSpecs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecsOrBuilder.java new file mode 100644 index 000000000000..fd924ed4668d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BoostSpecsOrBuilder.java @@ -0,0 +1,158 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BoostSpecsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BoostSpecs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + java.util.List getDataStoresList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + int getDataStoresCount(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + java.lang.String getDataStores(int index); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + com.google.protobuf.ByteString getDataStoresBytes(int index); + + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSpecList(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getSpec(int index); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSpecCount(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSpecOrBuilderList(); + /** + * + * + *
+   * Optional. A list of boosting specifications.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder getSpecOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java index bb13c8ea873d..03dcd0151e43 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java @@ -120,35 +120,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "sk\030\003 \001(\0132\032.google.protobuf.FieldMask\"e\n\027" + "DeleteEntityTypeRequest\022;\n\004name\030\001 \001(\tB-\342" + "A\001\002\372A&\n$dialogflow.googleapis.com/Entity" - + "Type\022\r\n\005force\030\002 \001(\0102\315\t\n\013EntityTypes\022\332\001\n\017" - + "ListEntityTypes\022:.google.cloud.dialogflo" - + "w.cx.v3beta1.ListEntityTypesRequest\032;.go" - + "ogle.cloud.dialogflow.cx.v3beta1.ListEnt" - + "ityTypesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v3be" - + "ta1/{parent=projects/*/locations/*/agent" - + "s/*}/entityTypes\022\307\001\n\rGetEntityType\0228.goo" - + "gle.cloud.dialogflow.cx.v3beta1.GetEntit" - + "yTypeRequest\032..google.cloud.dialogflow.c" - + "x.v3beta1.EntityType\"L\332A\004name\202\323\344\223\002?\022=/v3" - + "beta1/{name=projects/*/locations/*/agent" - + "s/*/entityTypes/*}\022\350\001\n\020CreateEntityType\022" - + ";.google.cloud.dialogflow.cx.v3beta1.Cre" - + "ateEntityTypeRequest\032..google.cloud.dial" - + "ogflow.cx.v3beta1.EntityType\"g\332A\022parent," - + "entity_type\202\323\344\223\002L\"=/v3beta1/{parent=proj" - + "ects/*/locations/*/agents/*}/entityTypes" - + ":\013entity_type\022\371\001\n\020UpdateEntityType\022;.goo" - + "gle.cloud.dialogflow.cx.v3beta1.UpdateEn" - + "tityTypeRequest\032..google.cloud.dialogflo" - + "w.cx.v3beta1.EntityType\"x\332A\027entity_type," - + "update_mask\202\323\344\223\002X2I/v3beta1/{entity_type" - + ".name=projects/*/locations/*/agents/*/en" - + "tityTypes/*}:\013entity_type\022\265\001\n\020DeleteEnti" - + "tyType\022;.google.cloud.dialogflow.cx.v3be" - + "ta1.DeleteEntityTypeRequest\032\026.google.pro" - + "tobuf.Empty\"L\332A\004name\202\323\344\223\002?*=/v3beta1/{na" - + "me=projects/*/locations/*/agents/*/entit" - + "yTypes/*}\032x\312A\031dialogflow.googleapis.com\322" + + "Type\022\r\n\005force\030\002 \001(\0102\315\t\n\013EntityTypes\022\307\001\n\r" + + "GetEntityType\0228.google.cloud.dialogflow." + + "cx.v3beta1.GetEntityTypeRequest\032..google" + + ".cloud.dialogflow.cx.v3beta1.EntityType\"" + + "L\332A\004name\202\323\344\223\002?\022=/v3beta1/{name=projects/" + + "*/locations/*/agents/*/entityTypes/*}\022\350\001" + + "\n\020CreateEntityType\022;.google.cloud.dialog" + + "flow.cx.v3beta1.CreateEntityTypeRequest\032" + + "..google.cloud.dialogflow.cx.v3beta1.Ent" + + "ityType\"g\332A\022parent,entity_type\202\323\344\223\002L\"=/v" + + "3beta1/{parent=projects/*/locations/*/ag" + + "ents/*}/entityTypes:\013entity_type\022\371\001\n\020Upd" + + "ateEntityType\022;.google.cloud.dialogflow." + + "cx.v3beta1.UpdateEntityTypeRequest\032..goo" + + "gle.cloud.dialogflow.cx.v3beta1.EntityTy" + + "pe\"x\332A\027entity_type,update_mask\202\323\344\223\002X2I/v" + + "3beta1/{entity_type.name=projects/*/loca" + + "tions/*/agents/*/entityTypes/*}:\013entity_" + + "type\022\265\001\n\020DeleteEntityType\022;.google.cloud" + + ".dialogflow.cx.v3beta1.DeleteEntityTypeR" + + "equest\032\026.google.protobuf.Empty\"L\332A\004name\202" + + "\323\344\223\002?*=/v3beta1/{name=projects/*/locatio" + + "ns/*/agents/*/entityTypes/*}\022\332\001\n\017ListEnt" + + "ityTypes\022:.google.cloud.dialogflow.cx.v3" + + "beta1.ListEntityTypesRequest\032;.google.cl" + + "oud.dialogflow.cx.v3beta1.ListEntityType" + + "sResponse\"N\332A\006parent\202\323\344\223\002?\022=/v3beta1/{pa" + + "rent=projects/*/locations/*/agents/*}/en" + + "tityTypes\032x\312A\031dialogflow.googleapis.com\322" + "AYhttps://www.googleapis.com/auth/cloud-" + "platform,https://www.googleapis.com/auth" + "/dialogflowB\311\001\n&com.google.cloud.dialogf" diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecs.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecs.java new file mode 100644 index 000000000000..421e67815d52 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecs.java @@ -0,0 +1,980 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Filter specifications for data stores.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FilterSpecs} + */ +public final class FilterSpecs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.FilterSpecs) + FilterSpecsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FilterSpecs.newBuilder() to construct. + private FilterSpecs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FilterSpecs() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FilterSpecs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.class, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder.class); + } + + public static final int DATA_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + return dataStores_; + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 { + for (int i = 0; i < dataStores_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStores_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < dataStores_.size(); i++) { + dataSize += computeStringSizeNoTag(dataStores_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataStoresList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + 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.cx.v3beta1.FilterSpecs)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs other = + (com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs) obj; + + if (!getDataStoresList().equals(other.getDataStoresList())) return false; + if (!getFilter().equals(other.getFilter())) 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 (getDataStoresCount() > 0) { + hash = (37 * hash) + DATA_STORES_FIELD_NUMBER; + hash = (53 * hash) + getDataStoresList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs 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.cx.v3beta1.FilterSpecs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs 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.cx.v3beta1.FilterSpecs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs 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.cx.v3beta1.FilterSpecs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs 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.cx.v3beta1.FilterSpecs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs 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.cx.v3beta1.FilterSpecs 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; + } + /** + * + * + *
+   * Filter specifications for data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FilterSpecs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.FilterSpecs) + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.class, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs build() { + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs result = + new com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + dataStores_.makeImmutable(); + result.dataStores_ = dataStores_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + } + + @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.cx.v3beta1.FilterSpecs) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.getDefaultInstance()) + return this; + if (!other.dataStores_.isEmpty()) { + if (dataStores_.isEmpty()) { + dataStores_ = other.dataStores_; + bitField0_ |= 0x00000001; + } else { + ensureDataStoresIsMutable(); + dataStores_.addAll(other.dataStores_); + } + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataStoresIsMutable(); + dataStores_.add(s); + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.LazyStringArrayList dataStores_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataStoresIsMutable() { + if (!dataStores_.isModifiable()) { + dataStores_ = new com.google.protobuf.LazyStringArrayList(dataStores_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + public com.google.protobuf.ProtocolStringList getDataStoresList() { + dataStores_.makeImmutable(); + return dataStores_; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + public int getDataStoresCount() { + return dataStores_.size(); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + public java.lang.String getDataStores(int index) { + return dataStores_.get(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + public com.google.protobuf.ByteString getDataStoresBytes(int index) { + return dataStores_.getByteString(index); + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The dataStores to set. + * @return This builder for chaining. + */ + public Builder setDataStores(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStores(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The dataStores to add. + * @return This builder for chaining. + */ + public Builder addAllDataStores(java.lang.Iterable values) { + ensureDataStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStores_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStores() { + dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Data Stores where the boosting configuration is applied. The full
+     * names of the referenced data stores. Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}
+     * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the dataStores to add. + * @return This builder for chaining. + */ + public Builder addDataStoresBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataStoresIsMutable(); + dataStores_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter expression to be applied.
+     * Expression syntax is documented at
+     * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = 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.cx.v3beta1.FilterSpecs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.FilterSpecs) + private static final com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FilterSpecs 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.cx.v3beta1.FilterSpecs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecsOrBuilder.java new file mode 100644 index 000000000000..a9091fb4185f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FilterSpecsOrBuilder.java @@ -0,0 +1,125 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface FilterSpecsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.FilterSpecs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dataStores. + */ + java.util.List getDataStoresList(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dataStores. + */ + int getDataStoresCount(); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dataStores at the given index. + */ + java.lang.String getDataStores(int index); + /** + * + * + *
+   * Optional. Data Stores where the boosting configuration is applied. The full
+   * names of the referenced data stores. Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}
+   * 
+ * + * + * repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dataStores at the given index. + */ + com.google.protobuf.ByteString getDataStoresBytes(int index); + + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The filter expression to be applied.
+   * Expression syntax is documented at
+   * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java index d944765867b7..ed9294904491 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java @@ -382,6 +382,56 @@ public boolean getSingleUtterance() { return singleUtterance_; } + public static final int BARGE_IN_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig bargeInConfig_; + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + @java.lang.Override + public boolean hasBargeInConfig() { + return bargeInConfig_ != null; + } + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig getBargeInConfig() { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder getBargeInConfigOrBuilder() { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -422,6 +472,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableWordInfo_ != false) { output.writeBool(13, enableWordInfo_); } + if (bargeInConfig_ != null) { + output.writeMessage(15, getBargeInConfig()); + } getUnknownFields().writeTo(output); } @@ -462,6 +515,9 @@ public int getSerializedSize() { if (enableWordInfo_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableWordInfo_); } + if (bargeInConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBargeInConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -485,6 +541,10 @@ public boolean equals(final java.lang.Object obj) { if (!getModel().equals(other.getModel())) return false; if (modelVariant_ != other.modelVariant_) return false; if (getSingleUtterance() != other.getSingleUtterance()) return false; + if (hasBargeInConfig() != other.hasBargeInConfig()) return false; + if (hasBargeInConfig()) { + if (!getBargeInConfig().equals(other.getBargeInConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -512,6 +572,10 @@ public int hashCode() { hash = (53 * hash) + modelVariant_; hash = (37 * hash) + SINGLE_UTTERANCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSingleUtterance()); + if (hasBargeInConfig()) { + hash = (37 * hash) + BARGE_IN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBargeInConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -659,6 +723,11 @@ public Builder clear() { model_ = ""; modelVariant_ = 0; singleUtterance_ = false; + bargeInConfig_ = null; + if (bargeInConfigBuilder_ != null) { + bargeInConfigBuilder_.dispose(); + bargeInConfigBuilder_ = null; + } return this; } @@ -717,6 +786,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.InputAudioConf if (((from_bitField0_ & 0x00000040) != 0)) { result.singleUtterance_ = singleUtterance_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.bargeInConfig_ = + bargeInConfigBuilder_ == null ? bargeInConfig_ : bargeInConfigBuilder_.build(); + } } @java.lang.Override @@ -795,6 +868,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig if (other.getSingleUtterance() != false) { setSingleUtterance(other.getSingleUtterance()); } + if (other.hasBargeInConfig()) { + mergeBargeInConfig(other.getBargeInConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -864,6 +940,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 104 + case 122: + { + input.readMessage(getBargeInConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1695,6 +1777,192 @@ public Builder clearSingleUtterance() { return this; } + private com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig bargeInConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder> + bargeInConfigBuilder_; + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + public boolean hasBargeInConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig getBargeInConfig() { + if (bargeInConfigBuilder_ == null) { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } else { + return bargeInConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public Builder setBargeInConfig(com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig value) { + if (bargeInConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bargeInConfig_ = value; + } else { + bargeInConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public Builder setBargeInConfig( + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder builderForValue) { + if (bargeInConfigBuilder_ == null) { + bargeInConfig_ = builderForValue.build(); + } else { + bargeInConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public Builder mergeBargeInConfig(com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig value) { + if (bargeInConfigBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && bargeInConfig_ != null + && bargeInConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance()) { + getBargeInConfigBuilder().mergeFrom(value); + } else { + bargeInConfig_ = value; + } + } else { + bargeInConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public Builder clearBargeInConfig() { + bitField0_ = (bitField0_ & ~0x00000080); + bargeInConfig_ = null; + if (bargeInConfigBuilder_ != null) { + bargeInConfigBuilder_.dispose(); + bargeInConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder getBargeInConfigBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getBargeInConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder + getBargeInConfigOrBuilder() { + if (bargeInConfigBuilder_ != null) { + return bargeInConfigBuilder_.getMessageOrBuilder(); + } else { + return bargeInConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.getDefaultInstance() + : bargeInConfig_; + } + } + /** + * + * + *
+     * Configuration of barge-in behavior during the streaming of input audio.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder> + getBargeInConfigFieldBuilder() { + if (bargeInConfigBuilder_ == null) { + bargeInConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder>( + getBargeInConfig(), getParentForChildren(), isClean()); + bargeInConfig_ = null; + } + return bargeInConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java index f262577a8a20..2492e776e289 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java @@ -261,4 +261,39 @@ public interface InputAudioConfigOrBuilder * @return The singleUtterance. */ boolean getSingleUtterance(); + + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return Whether the bargeInConfig field is set. + */ + boolean hasBargeInConfig(); + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + * + * @return The bargeInConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig getBargeInConfig(); + /** + * + * + *
+   * Configuration of barge-in behavior during the streaming of input audio.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; + */ + com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder getBargeInConfigOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java index c9f0984e653a..18cf5c98cf55 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java @@ -927,6 +927,163 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { return sessionTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : sessionTtl_; } + public static final int END_USER_METADATA_FIELD_NUMBER = 18; + private com.google.protobuf.Struct endUserMetadata_; + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + @java.lang.Override + public boolean hasEndUserMetadata() { + return endUserMetadata_ != null; + } + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getEndUserMetadata() { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + + public static final int SEARCH_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.dialogflow.cx.v3beta1.SearchConfig searchConfig_; + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + @java.lang.Override + public boolean hasSearchConfig() { + return searchConfig_ != null; + } + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig getSearchConfig() { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder getSearchConfigOrBuilder() { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -976,6 +1133,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sessionTtl_ != null) { output.writeMessage(16, getSessionTtl()); } + if (endUserMetadata_ != null) { + output.writeMessage(18, getEndUserMetadata()); + } + if (searchConfig_ != null) { + output.writeMessage(20, getSearchConfig()); + } getUnknownFields().writeTo(output); } @@ -1034,6 +1197,12 @@ public int getSerializedSize() { if (sessionTtl_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSessionTtl()); } + if (endUserMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEndUserMetadata()); + } + if (searchConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getSearchConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1074,6 +1243,14 @@ public boolean equals(final java.lang.Object obj) { if (hasSessionTtl()) { if (!getSessionTtl().equals(other.getSessionTtl())) return false; } + if (hasEndUserMetadata() != other.hasEndUserMetadata()) return false; + if (hasEndUserMetadata()) { + if (!getEndUserMetadata().equals(other.getEndUserMetadata())) return false; + } + if (hasSearchConfig() != other.hasSearchConfig()) return false; + if (hasSearchConfig()) { + if (!getSearchConfig().equals(other.getSearchConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1123,6 +1300,14 @@ public int hashCode() { hash = (37 * hash) + SESSION_TTL_FIELD_NUMBER; hash = (53 * hash) + getSessionTtl().hashCode(); } + if (hasEndUserMetadata()) { + hash = (37 * hash) + END_USER_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getEndUserMetadata().hashCode(); + } + if (hasSearchConfig()) { + hash = (37 * hash) + SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1317,6 +1502,16 @@ public Builder clear() { sessionTtlBuilder_.dispose(); sessionTtlBuilder_ = null; } + endUserMetadata_ = null; + if (endUserMetadataBuilder_ != null) { + endUserMetadataBuilder_.dispose(); + endUserMetadataBuilder_ = null; + } + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } return this; } @@ -1403,6 +1598,14 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryParameter if (((from_bitField0_ & 0x00000800) != 0)) { result.sessionTtl_ = sessionTtlBuilder_ == null ? sessionTtl_ : sessionTtlBuilder_.build(); } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.endUserMetadata_ = + endUserMetadataBuilder_ == null ? endUserMetadata_ : endUserMetadataBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.searchConfig_ = + searchConfigBuilder_ == null ? searchConfig_ : searchConfigBuilder_.build(); + } } @java.lang.Override @@ -1523,6 +1726,12 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryParameters if (other.hasSessionTtl()) { mergeSessionTtl(other.getSessionTtl()); } + if (other.hasEndUserMetadata()) { + mergeEndUserMetadata(other.getEndUserMetadata()); + } + if (other.hasSearchConfig()) { + mergeSearchConfig(other.getSearchConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1636,6 +1845,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 130 + case 146: + { + input.readMessage(getEndUserMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 146 + case 162: + { + input.readMessage(getSearchConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4152,6 +4373,554 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { return sessionTtlBuilder_; } + private com.google.protobuf.Struct endUserMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + endUserMetadataBuilder_; + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + public boolean hasEndUserMetadata() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + public com.google.protobuf.Struct getEndUserMetadata() { + if (endUserMetadataBuilder_ == null) { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } else { + return endUserMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserMetadata(com.google.protobuf.Struct value) { + if (endUserMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUserMetadata_ = value; + } else { + endUserMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (endUserMetadataBuilder_ == null) { + endUserMetadata_ = builderForValue.build(); + } else { + endUserMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) { + if (endUserMetadataBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && endUserMetadata_ != null + && endUserMetadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getEndUserMetadataBuilder().mergeFrom(value); + } else { + endUserMetadata_ = value; + } + } else { + endUserMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndUserMetadata() { + bitField0_ = (bitField0_ & ~0x00001000); + endUserMetadata_ = null; + if (endUserMetadataBuilder_ != null) { + endUserMetadataBuilder_.dispose(); + endUserMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getEndUserMetadataBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getEndUserMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { + if (endUserMetadataBuilder_ != null) { + return endUserMetadataBuilder_.getMessageOrBuilder(); + } else { + return endUserMetadata_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : endUserMetadata_; + } + } + /** + * + * + *
+     * Optional. Information about the end-user to improve the relevance and
+     * accuracy of generative answers.
+     *
+     * This will be interpreted and used by a language model, so, for good
+     * results, the data should be self-descriptive, and in a simple structure.
+     *
+     * Example:
+     *
+     * ```json
+     * {
+     *   "subscription plan": "Business Premium Plus",
+     *   "devices owned": [
+     *     {"model": "Google Pixel 7"},
+     *     {"model": "Google Pixel Tablet"}
+     *   ]
+     * }
+     * ```
+     * 
+ * + * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getEndUserMetadataFieldBuilder() { + if (endUserMetadataBuilder_ == null) { + endUserMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getEndUserMetadata(), getParentForChildren(), isClean()); + endUserMetadata_ = null; + } + return endUserMetadataBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.SearchConfig searchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder> + searchConfigBuilder_; + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + public boolean hasSearchConfig() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig getSearchConfig() { + if (searchConfigBuilder_ == null) { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance() + : searchConfig_; + } else { + return searchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchConfig_ = value; + } else { + searchConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSearchConfig( + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder builderForValue) { + if (searchConfigBuilder_ == null) { + searchConfig_ = builderForValue.build(); + } else { + searchConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && searchConfig_ != null + && searchConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance()) { + getSearchConfigBuilder().mergeFrom(value); + } else { + searchConfig_ = value; + } + } else { + searchConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSearchConfig() { + bitField0_ = (bitField0_ & ~0x00002000); + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder getSearchConfigBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getSearchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder getSearchConfigOrBuilder() { + if (searchConfigBuilder_ != null) { + return searchConfigBuilder_.getMessageOrBuilder(); + } else { + return searchConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + } + /** + * + * + *
+     * Optional. Search configuration for UCS search queries.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder> + getSearchConfigFieldBuilder() { + if (searchConfigBuilder_ == null) { + searchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder>( + getSearchConfig(), getParentForChildren(), isClean()); + searchConfig_ = null; + } + return searchConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java index 809a83591a47..baa286e7c4c3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java @@ -668,4 +668,131 @@ java.lang.String getWebhookHeadersOrDefault( * */ com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder(); + + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserMetadata field is set. + */ + boolean hasEndUserMetadata(); + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserMetadata. + */ + com.google.protobuf.Struct getEndUserMetadata(); + /** + * + * + *
+   * Optional. Information about the end-user to improve the relevance and
+   * accuracy of generative answers.
+   *
+   * This will be interpreted and used by a language model, so, for good
+   * results, the data should be self-descriptive, and in a simple structure.
+   *
+   * Example:
+   *
+   * ```json
+   * {
+   *   "subscription plan": "Business Premium Plus",
+   *   "devices owned": [
+   *     {"model": "Google Pixel 7"},
+   *     {"model": "Google Pixel Tablet"}
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchConfig field is set. + */ + boolean hasSearchConfig(); + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig getSearchConfig(); + /** + * + * + *
+   * Optional. Search configuration for UCS search queries.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder getSearchConfigOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java index 3728edcf4f4c..92aa284e2c95 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java @@ -944,7 +944,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return Whether the intent field is set. */ @java.lang.Override @@ -967,7 +967,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return The intent. */ @java.lang.Override @@ -1019,7 +1019,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1306,6 +1306,25 @@ public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettin : advancedSettings_; } + public static final int ALLOW_ANSWER_FEEDBACK_FIELD_NUMBER = 32; + private boolean allowAnswerFeedback_ = false; + /** + * + * + *
+   * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+   * shown for the response in the Dialogflow Messenger widget.
+   * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + @java.lang.Override + public boolean getAllowAnswerFeedback() { + return allowAnswerFeedback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1371,6 +1390,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) query_); } + if (allowAnswerFeedback_ != false) { + output.writeBool(32, allowAnswerFeedback_); + } getUnknownFields().writeTo(output); } @@ -1435,6 +1457,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) query_); } + if (allowAnswerFeedback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(32, allowAnswerFeedback_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1485,6 +1510,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAdvancedSettings()) { if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; } + if (getAllowAnswerFeedback() != other.getAllowAnswerFeedback()) return false; if (!getQueryCase().equals(other.getQueryCase())) return false; switch (queryCase_) { case 1: @@ -1560,6 +1586,8 @@ public int hashCode() { hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getAdvancedSettings().hashCode(); } + hash = (37 * hash) + ALLOW_ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowAnswerFeedback()); switch (queryCase_) { case 1: hash = (37 * hash) + TEXT_FIELD_NUMBER; @@ -1784,6 +1812,7 @@ public Builder clear() { advancedSettingsBuilder_.dispose(); advancedSettingsBuilder_ = null; } + allowAnswerFeedback_ = false; queryCase_ = 0; query_ = null; return this; @@ -1888,6 +1917,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryResult re result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.allowAnswerFeedback_ = allowAnswerFeedback_; + } } private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.QueryResult result) { @@ -2054,6 +2086,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe if (other.hasAdvancedSettings()) { mergeAdvancedSettings(other.getAdvancedSettings()); } + if (other.getAllowAnswerFeedback() != false) { + setAllowAnswerFeedback(other.getAllowAnswerFeedback()); + } switch (other.getQueryCase()) { case TEXT: { @@ -2247,6 +2282,12 @@ public Builder mergeFrom( queryCase_ = 23; break; } // case 186 + case 256: + { + allowAnswerFeedback_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 256 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4903,7 +4944,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -4925,7 +4966,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return The intent. */ @java.lang.Deprecated @@ -5142,7 +5183,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5168,7 +5209,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5198,7 +5239,7 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 * @return This builder for chaining. */ @java.lang.Deprecated @@ -6180,6 +6221,62 @@ public Builder clearAdvancedSettings() { return advancedSettingsBuilder_; } + private boolean allowAnswerFeedback_; + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + @java.lang.Override + public boolean getAllowAnswerFeedback() { + return allowAnswerFeedback_; + } + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @param value The allowAnswerFeedback to set. + * @return This builder for chaining. + */ + public Builder setAllowAnswerFeedback(boolean value) { + + allowAnswerFeedback_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+     * shown for the response in the Dialogflow Messenger widget.
+     * 
+ * + * bool allow_answer_feedback = 32; + * + * @return This builder for chaining. + */ + public Builder clearAllowAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00020000); + allowAnswerFeedback_ = 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-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java index 4375ecb061c9..c634a16940dc 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java @@ -582,7 +582,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -602,7 +602,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 * @return The intent. */ @java.lang.Deprecated @@ -642,7 +642,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 * @return The intentDetectionConfidence. */ @java.lang.Deprecated @@ -864,5 +864,19 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa */ com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + /** + * + * + *
+   * Indicates whether the Thumbs up/Thumbs down rating controls are need to be
+   * shown for the response in the Dialogflow Messenger widget.
+   * 
+ * + * bool allow_answer_feedback = 32; + * + * @return The allowAnswerFeedback. + */ + boolean getAllowAnswerFeedback(); + com.google.cloud.dialogflow.cx.v3beta1.QueryResult.QueryCase getQueryCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfig.java new file mode 100644 index 000000000000..802c52538a05 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfig.java @@ -0,0 +1,1536 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Search configuration for UCS search queries.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SearchConfig} + */ +public final class SearchConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.SearchConfig) + SearchConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchConfig.newBuilder() to construct. + private SearchConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchConfig() { + boostSpecs_ = java.util.Collections.emptyList(); + filterSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder.class); + } + + public static final int BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List boostSpecs_; + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBoostSpecsList() { + return boostSpecs_; + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBoostSpecsOrBuilderList() { + return boostSpecs_; + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBoostSpecsCount() { + return boostSpecs_.size(); + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getBoostSpecs(int index) { + return boostSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder getBoostSpecsOrBuilder( + int index) { + return boostSpecs_.get(index); + } + + public static final int FILTER_SPECS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List filterSpecs_; + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFilterSpecsList() { + return filterSpecs_; + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFilterSpecsOrBuilderList() { + return filterSpecs_; + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFilterSpecsCount() { + return filterSpecs_.size(); + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs getFilterSpecs(int index) { + return filterSpecs_.get(index); + } + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder getFilterSpecsOrBuilder( + int index) { + return filterSpecs_.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 < boostSpecs_.size(); i++) { + output.writeMessage(1, boostSpecs_.get(i)); + } + for (int i = 0; i < filterSpecs_.size(); i++) { + output.writeMessage(2, filterSpecs_.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 < boostSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, boostSpecs_.get(i)); + } + for (int i = 0; i < filterSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, filterSpecs_.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.cx.v3beta1.SearchConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.SearchConfig) obj; + + if (!getBoostSpecsList().equals(other.getBoostSpecsList())) return false; + if (!getFilterSpecsList().equals(other.getFilterSpecsList())) 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 (getBoostSpecsCount() > 0) { + hash = (37 * hash) + BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpecsList().hashCode(); + } + if (getFilterSpecsCount() > 0) { + hash = (37 * hash) + FILTER_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getFilterSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig 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; + } + /** + * + * + *
+   * Search configuration for UCS search queries.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SearchConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.SearchConfig) + com.google.cloud.dialogflow.cx.v3beta1.SearchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (boostSpecsBuilder_ == null) { + boostSpecs_ = java.util.Collections.emptyList(); + } else { + boostSpecs_ = null; + boostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (filterSpecsBuilder_ == null) { + filterSpecs_ = java.util.Collections.emptyList(); + } else { + filterSpecs_ = null; + filterSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.SearchConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.SearchConfig result) { + if (boostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boostSpecs_ = java.util.Collections.unmodifiableList(boostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boostSpecs_ = boostSpecs_; + } else { + result.boostSpecs_ = boostSpecsBuilder_.build(); + } + if (filterSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + filterSpecs_ = java.util.Collections.unmodifiableList(filterSpecs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.filterSpecs_ = filterSpecs_; + } else { + result.filterSpecs_ = filterSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.SearchConfig 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.cx.v3beta1.SearchConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.SearchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.SearchConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance()) + return this; + if (boostSpecsBuilder_ == null) { + if (!other.boostSpecs_.isEmpty()) { + if (boostSpecs_.isEmpty()) { + boostSpecs_ = other.boostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoostSpecsIsMutable(); + boostSpecs_.addAll(other.boostSpecs_); + } + onChanged(); + } + } else { + if (!other.boostSpecs_.isEmpty()) { + if (boostSpecsBuilder_.isEmpty()) { + boostSpecsBuilder_.dispose(); + boostSpecsBuilder_ = null; + boostSpecs_ = other.boostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + boostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBoostSpecsFieldBuilder() + : null; + } else { + boostSpecsBuilder_.addAllMessages(other.boostSpecs_); + } + } + } + if (filterSpecsBuilder_ == null) { + if (!other.filterSpecs_.isEmpty()) { + if (filterSpecs_.isEmpty()) { + filterSpecs_ = other.filterSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFilterSpecsIsMutable(); + filterSpecs_.addAll(other.filterSpecs_); + } + onChanged(); + } + } else { + if (!other.filterSpecs_.isEmpty()) { + if (filterSpecsBuilder_.isEmpty()) { + filterSpecsBuilder_.dispose(); + filterSpecsBuilder_ = null; + filterSpecs_ = other.filterSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + filterSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilterSpecsFieldBuilder() + : null; + } else { + filterSpecsBuilder_.addAllMessages(other.filterSpecs_); + } + } + } + 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: + { + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.parser(), + extensionRegistry); + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(m); + } else { + boostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.parser(), + extensionRegistry); + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(m); + } else { + filterSpecsBuilder_.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 boostSpecs_ = + java.util.Collections.emptyList(); + + private void ensureBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boostSpecs_ = + new java.util.ArrayList(boostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder> + boostSpecsBuilder_; + + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getBoostSpecsList() { + if (boostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(boostSpecs_); + } else { + return boostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBoostSpecsCount() { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.size(); + } else { + return boostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getBoostSpecs(int index) { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.get(index); + } else { + return boostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.set(index, value); + onChanged(); + } else { + boostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.add(value); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs value) { + if (boostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoostSpecsIsMutable(); + boostSpecs_.add(index, value); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs( + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBoostSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder builderForValue) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + boostSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBoostSpecs( + java.lang.Iterable values) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boostSpecs_); + onChanged(); + } else { + boostSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBoostSpecs() { + if (boostSpecsBuilder_ == null) { + boostSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boostSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBoostSpecs(int index) { + if (boostSpecsBuilder_ == null) { + ensureBoostSpecsIsMutable(); + boostSpecs_.remove(index); + onChanged(); + } else { + boostSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder getBoostSpecsBuilder( + int index) { + return getBoostSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder getBoostSpecsOrBuilder( + int index) { + if (boostSpecsBuilder_ == null) { + return boostSpecs_.get(index); + } else { + return boostSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBoostSpecsOrBuilderList() { + if (boostSpecsBuilder_ != null) { + return boostSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boostSpecs_); + } + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder addBoostSpecsBuilder() { + return getBoostSpecsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder addBoostSpecsBuilder( + int index) { + return getBoostSpecsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Boosting configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBoostSpecsBuilderList() { + return getBoostSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder> + getBoostSpecsFieldBuilder() { + if (boostSpecsBuilder_ == null) { + boostSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder>( + boostSpecs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + boostSpecs_ = null; + } + return boostSpecsBuilder_; + } + + private java.util.List filterSpecs_ = + java.util.Collections.emptyList(); + + private void ensureFilterSpecsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + filterSpecs_ = + new java.util.ArrayList( + filterSpecs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder> + filterSpecsBuilder_; + + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFilterSpecsList() { + if (filterSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(filterSpecs_); + } else { + return filterSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFilterSpecsCount() { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.size(); + } else { + return filterSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs getFilterSpecs(int index) { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.get(index); + } else { + return filterSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.set(index, value); + onChanged(); + } else { + filterSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs(com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.add(value); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs value) { + if (filterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterSpecsIsMutable(); + filterSpecs_.add(index, value); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs( + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilterSpecs( + int index, com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder builderForValue) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + filterSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFilterSpecs( + java.lang.Iterable values) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filterSpecs_); + onChanged(); + } else { + filterSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFilterSpecs() { + if (filterSpecsBuilder_ == null) { + filterSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + filterSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFilterSpecs(int index) { + if (filterSpecsBuilder_ == null) { + ensureFilterSpecsIsMutable(); + filterSpecs_.remove(index); + onChanged(); + } else { + filterSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder getFilterSpecsBuilder( + int index) { + return getFilterSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder getFilterSpecsOrBuilder( + int index) { + if (filterSpecsBuilder_ == null) { + return filterSpecs_.get(index); + } else { + return filterSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFilterSpecsOrBuilderList() { + if (filterSpecsBuilder_ != null) { + return filterSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filterSpecs_); + } + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder addFilterSpecsBuilder() { + return getFilterSpecsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder addFilterSpecsBuilder( + int index) { + return getFilterSpecsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Filter configuration for the datastores.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFilterSpecsBuilderList() { + return getFilterSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder> + getFilterSpecsFieldBuilder() { + if (filterSpecsBuilder_ == null) { + filterSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder>( + filterSpecs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + filterSpecs_ = null; + } + return filterSpecsBuilder_; + } + + @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.cx.v3beta1.SearchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.SearchConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.SearchConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.SearchConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SearchConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchConfig 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.cx.v3beta1.SearchConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfigOrBuilder.java new file mode 100644 index 000000000000..18d7b83344ce --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SearchConfigOrBuilder.java @@ -0,0 +1,149 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface SearchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.SearchConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBoostSpecsList(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getBoostSpecs(int index); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBoostSpecsCount(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBoostSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Boosting configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder getBoostSpecsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFilterSpecsList(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs getFilterSpecs(int index); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFilterSpecsCount(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFilterSpecsOrBuilderList(); + /** + * + * + *
+   * Optional. Filter configuration for the datastores.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FilterSpecsOrBuilder getFilterSpecsOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java index f88b162f1eed..b81e932ac2d4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java @@ -27,6 +27,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -59,6 +71,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_WebhookHeadersEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_WebhookHeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -134,216 +166,263 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/v3beta1/response_message.proto\032.google.cl" + + "oud.dialogflow.cx.v3beta1.StreamingRecog" + + "nitionResultH\000\022Z\n\026detect_intent_response" + + "\030\002 \001(\01328.google.cloud.dialogflow.cx.v3be" + + "ta1.DetectIntentResponseH\000\022Z\n\016debugging_" + + "info\030\004 \001(\0132B.google.cloud.dialogflow.cx." + + "v3beta1.CloudConversationDebuggingInfoB\n" + + "\n\010response\"\300\003\n\032StreamingRecognitionResul" + + "t\022`\n\014message_type\030\001 \001(\0162J.google.cloud.d" + + "ialogflow.cx.v3beta1.StreamingRecognitio" + + "nResult.MessageType\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\022L\n\020speech_word_info\030\007 \003" + + "(\01322.google.cloud.dialogflow.cx.v3beta1." + + "SpeechWordInfo\0224\n\021speech_end_offset\030\010 \001(" + + "\0132\031.google.protobuf.Duration\022\025\n\rlanguage" + + "_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TY" + + "PE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_" + + "OF_SINGLE_UTTERANCE\020\002\"\235\006\n\017QueryParameter" + + "s\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001" + + "(\0132\023.google.type.LatLng\022S\n\024session_entit" + + "y_types\030\003 \003(\01325.google.cloud.dialogflow." + + "cx.v3beta1.SessionEntityType\022(\n\007payload\030" + + "\004 \001(\0132\027.google.protobuf.Struct\022+\n\nparame" + + "ters\030\005 \001(\0132\027.google.protobuf.Struct\0229\n\014c" + + "urrent_page\030\006 \001(\tB#\372A \n\036dialogflow.googl" + + "eapis.com/Page\022\027\n\017disable_webhook\030\007 \001(\010\022" + + "$\n\034analyze_query_text_sentiment\030\010 \001(\010\022`\n" + + "\017webhook_headers\030\n \003(\0132G.google.cloud.di" + + "alogflow.cx.v3beta1.QueryParameters.Webh" + + "ookHeadersEntry\022=\n\rflow_versions\030\016 \003(\tB&" + + "\372A#\n!dialogflow.googleapis.com/Version\022\017" + + "\n\007channel\030\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.g" + + "oogle.protobuf.DurationB\004\342A\001\001\0228\n\021end_use" + + "r_metadata\030\022 \001(\0132\027.google.protobuf.Struc" + + "tB\004\342A\001\001\022M\n\rsearch_config\030\024 \001(\01320.google." + + "cloud.dialogflow.cx.v3beta1.SearchConfig" + + "B\004\342A\001\001\0325\n\023WebhookHeadersEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\246\001\n\014SearchConfig\022I" + + "\n\013boost_specs\030\001 \003(\0132..google.cloud.dialo" + + "gflow.cx.v3beta1.BoostSpecsB\004\342A\001\001\022K\n\014fil" + + "ter_specs\030\002 \003(\0132/.google.cloud.dialogflo" + + "w.cx.v3beta1.FilterSpecsB\004\342A\001\001\"\266\001\n\tBoost" + + "Spec\022e\n\025condition_boost_specs\030\001 \003(\0132@.go" + + "ogle.cloud.dialogflow.cx.v3beta1.BoostSp" + + "ec.ConditionBoostSpecB\004\342A\001\001\032B\n\022Condition" + + "BoostSpec\022\027\n\tcondition\030\001 \001(\tB\004\342A\001\001\022\023\n\005bo" + + "ost\030\002 \001(\002B\004\342A\001\001\"\227\001\n\nBoostSpecs\022F\n\013data_s" + + "tores\030\001 \003(\tB1\342A\001\001\372A*\n(discoveryengine.go" + + "ogleapis.com/DataStore\022A\n\004spec\030\002 \003(\0132-.g" + + "oogle.cloud.dialogflow.cx.v3beta1.BoostS" + + "pecB\004\342A\001\001\"k\n\013FilterSpecs\022F\n\013data_stores\030" + + "\001 \003(\tB1\342A\001\001\372A*\n(discoveryengine.googleap" + + "is.com/DataStore\022\024\n\006filter\030\002 \001(\tB\004\342A\001\001\"\365" + + "\002\n\nQueryInput\022=\n\004text\030\002 \001(\0132-.google.clo" + + "ud.dialogflow.cx.v3beta1.TextInputH\000\022A\n\006" + + "intent\030\003 \001(\0132/.google.cloud.dialogflow.c" + + "x.v3beta1.IntentInputH\000\022?\n\005audio\030\005 \001(\0132." + + ".google.cloud.dialogflow.cx.v3beta1.Audi" + + "oInputH\000\022?\n\005event\030\006 \001(\0132..google.cloud.d" + + "ialogflow.cx.v3beta1.EventInputH\000\022=\n\004dtm" + + "f\030\007 \001(\0132-.google.cloud.dialogflow.cx.v3b" + + "eta1.DtmfInputH\000\022\033\n\rlanguage_code\030\004 \001(\tB" + + "\004\342A\001\002B\007\n\005input\"\257\007\n\013QueryResult\022\016\n\004text\030\001" + + " \001(\tH\000\022?\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dia" + + "logflow.googleapis.com/IntentH\000\022\024\n\ntrans" + + "cript\030\014 \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022=" + + "\n\004dtmf\030\027 \001(\0132-.google.cloud.dialogflow.c" + + "x.v3beta1.DtmfInputH\000\022\025\n\rlanguage_code\030\002" + + " \001(\t\022+\n\nparameters\030\003 \001(\0132\027.google.protob" + + "uf.Struct\022N\n\021response_messages\030\004 \003(\01323.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Respon" + + "seMessage\022,\n\020webhook_statuses\030\r \003(\0132\022.go" + + "ogle.rpc.Status\0221\n\020webhook_payloads\030\006 \003(" + + "\0132\027.google.protobuf.Struct\022>\n\014current_pa" + + "ge\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3" + + "beta1.Page\022>\n\006intent\030\010 \001(\0132*.google.clou" + + "d.dialogflow.cx.v3beta1.IntentB\002\030\001\022\'\n\033in" + + "tent_detection_confidence\030\t \001(\002B\002\030\001\0228\n\005m" + + "atch\030\017 \001(\0132).google.cloud.dialogflow.cx." + + "v3beta1.Match\0220\n\017diagnostic_info\030\n \001(\0132\027" + + ".google.protobuf.Struct\022^\n\031sentiment_ana" + + "lysis_result\030\021 \001(\0132;.google.cloud.dialog" + + "flow.cx.v3beta1.SentimentAnalysisResult\022" + + "O\n\021advanced_settings\030\025 \001(\01324.google.clou" + + "d.dialogflow.cx.v3beta1.AdvancedSettings" + + "\022\035\n\025allow_answer_feedback\030 \001(\010B\007\n\005query" + + "\"\037\n\tTextInput\022\022\n\004text\030\001 \001(\tB\004\342A\001\002\"H\n\013Int" + + "entInput\0229\n\006intent\030\001 \001(\tB)\342A\001\002\372A\"\n dialo" + + "gflow.googleapis.com/Intent\"g\n\nAudioInpu" + + "t\022J\n\006config\030\001 \001(\01324.google.cloud.dialogf" + + "low.cx.v3beta1.InputAudioConfigB\004\342A\001\002\022\r\n" + + "\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event\030\001 \001(" + + "\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014finish" + + "_digit\030\002 \001(\t\"\373\002\n\005Match\022:\n\006intent\030\001 \001(\0132*" + + ".google.cloud.dialogflow.cx.v3beta1.Inte" + + "nt\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001(\0132\027." + + "google.protobuf.Struct\022\026\n\016resolved_input" + + "\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623.google.clou" + + "d.dialogflow.cx.v3beta1.Match.MatchType\022" + + "\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032\n\026MAT" + + "CH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIR" + + "ECT_INTENT\020\002\022\025\n\021PARAMETER_FILLING\020\003\022\014\n\010N" + + "O_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"\212\002\n\022M" + + "atchIntentRequest\022;\n\007session\030\001 \001(\tB*\342A\001\002" + + "\372A#\n!dialogflow.googleapis.com/Session\022I" + + "\n\014query_params\030\002 \001(\01323.google.cloud.dial" + + "ogflow.cx.v3beta1.QueryParameters\022I\n\013que" + + "ry_input\030\003 \001(\0132..google.cloud.dialogflow" + + ".cx.v3beta1.QueryInputB\004\342A\001\002\022!\n\031persist_" + + "parameter_changes\030\005 \001(\010\"\232\002\n\023MatchIntentR" + + "esponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_inten" + + "t\030\002 \001(\tB%\372A\"\n dialogflow.googleapis.com/" + + "IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigge" + + "r_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\0132).googl" + + "e.cloud.dialogflow.cx.v3beta1.Match\022>\n\014c" + + "urrent_page\030\005 \001(\0132(.google.cloud.dialogf" + + "low.cx.v3beta1.PageB\007\n\005query\"\372\001\n\024Fulfill" + + "IntentRequest\022T\n\024match_intent_request\030\001 " + + "\001(\01326.google.cloud.dialogflow.cx.v3beta1" + + ".MatchIntentRequest\0228\n\005match\030\002 \001(\0132).goo" + + "gle.cloud.dialogflow.cx.v3beta1.Match\022R\n" + + "\023output_audio_config\030\003 \001(\01325.google.clou" + + "d.dialogflow.cx.v3beta1.OutputAudioConfi" + + "g\"\335\001\n\025FulfillIntentResponse\022\023\n\013response_" + + "id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.google." + + "cloud.dialogflow.cx.v3beta1.QueryResult\022" + + "\024\n\014output_audio\030\003 \001(\014\022R\n\023output_audio_co" + "nfig\030\004 \001(\01325.google.cloud.dialogflow.cx." - + "v3beta1.OutputAudioConfig\022\037\n\027enable_part" - + "ial_response\030\005 \001(\010\022\035\n\025enable_debugging_i" - + "nfo\030\010 \001(\010\"\260\007\n\036CloudConversationDebugging" - + "Info\022\031\n\021audio_data_chunks\030\001 \001(\005\0229\n\026resul" - + "t_end_time_offset\030\002 \001(\0132\031.google.protobu" - + "f.Duration\0227\n\024first_audio_duration\030\003 \001(\013" - + "2\031.google.protobuf.Duration\022\030\n\020single_ut" - + "terance\030\005 \001(\010\022C\n speech_partial_results_" - + "end_times\030\006 \003(\0132\031.google.protobuf.Durati" - + "on\022A\n\036speech_final_results_end_times\030\007 \003" - + "(\0132\031.google.protobuf.Duration\022\031\n\021partial" - + "_responses\030\010 \001(\005\022,\n$speaker_id_passive_l" - + "atency_ms_offset\030\t \001(\005\022\037\n\027bargein_event_" - + "triggered\030\n \001(\010\022\037\n\027speech_single_utteran" - + "ce\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.google.proto" - + "buf.Duration\022C\n single_utterance_end_tim" - + "e_offset\030\016 \001(\0132\031.google.protobuf.Duratio" - + "n\0224\n\021no_speech_timeout\030\017 \001(\0132\031.google.pr" - + "otobuf.Duration\0226\n\023endpointing_timeout\030\023" - + " \001(\0132\031.google.protobuf.Duration\022\025\n\ris_in" - + "put_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_off" - + "set\030\022 \001(\0132\031.google.protobuf.Duration\"\301\002\n" - + "\035StreamingDetectIntentResponse\022\\\n\022recogn" - + "ition_result\030\001 \001(\0132>.google.cloud.dialog" - + "flow.cx.v3beta1.StreamingRecognitionResu" - + "ltH\000\022Z\n\026detect_intent_response\030\002 \001(\01328.g" + + "v3beta1.OutputAudioConfig\";\n\027SentimentAn" + + "alysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude" + + "\030\002 \001(\0022\367\013\n\010Sessions\022\272\002\n\014DetectIntent\0227.g" + "oogle.cloud.dialogflow.cx.v3beta1.Detect" - + "IntentResponseH\000\022Z\n\016debugging_info\030\004 \001(\013" - + "2B.google.cloud.dialogflow.cx.v3beta1.Cl" - + "oudConversationDebuggingInfoB\n\n\010response" - + "\"\300\003\n\032StreamingRecognitionResult\022`\n\014messa" - + "ge_type\030\001 \001(\0162J.google.cloud.dialogflow." - + "cx.v3beta1.StreamingRecognitionResult.Me" - + "ssageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_fina" - + "l\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability" - + "\030\006 \001(\002\022L\n\020speech_word_info\030\007 \003(\01322.googl" - + "e.cloud.dialogflow.cx.v3beta1.SpeechWord" - + "Info\0224\n\021speech_end_offset\030\010 \001(\0132\031.google" - + ".protobuf.Duration\022\025\n\rlanguage_code\030\n \001(" - + "\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UNSPECI" - + "FIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_" - + "UTTERANCE\020\002\"\224\005\n\017QueryParameters\022\021\n\ttime_" - + "zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.googl" - + "e.type.LatLng\022S\n\024session_entity_types\030\003 " - + "\003(\01325.google.cloud.dialogflow.cx.v3beta1" - + ".SessionEntityType\022(\n\007payload\030\004 \001(\0132\027.go" - + "ogle.protobuf.Struct\022+\n\nparameters\030\005 \001(\013" - + "2\027.google.protobuf.Struct\0229\n\014current_pag" - + "e\030\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/" - + "Page\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034analyze" - + "_query_text_sentiment\030\010 \001(\010\022`\n\017webhook_h" - + "eaders\030\n \003(\0132G.google.cloud.dialogflow.c" - + "x.v3beta1.QueryParameters.WebhookHeaders" - + "Entry\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!dialo" - + "gflow.googleapis.com/Version\022\017\n\007channel\030" - + "\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.google.prot" - + "obuf.DurationB\004\342A\001\001\0325\n\023WebhookHeadersEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\365\002\n\nQ" - + "ueryInput\022=\n\004text\030\002 \001(\0132-.google.cloud.d" - + "ialogflow.cx.v3beta1.TextInputH\000\022A\n\006inte" - + "nt\030\003 \001(\0132/.google.cloud.dialogflow.cx.v3" - + "beta1.IntentInputH\000\022?\n\005audio\030\005 \001(\0132..goo" - + "gle.cloud.dialogflow.cx.v3beta1.AudioInp" - + "utH\000\022?\n\005event\030\006 \001(\0132..google.cloud.dialo" - + "gflow.cx.v3beta1.EventInputH\000\022=\n\004dtmf\030\007 " - + "\001(\0132-.google.cloud.dialogflow.cx.v3beta1" - + ".DtmfInputH\000\022\033\n\rlanguage_code\030\004 \001(\tB\004\342A\001" - + "\002B\007\n\005input\"\220\007\n\013QueryResult\022\016\n\004text\030\001 \001(\t" - + "H\000\022?\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dialogf" - + "low.googleapis.com/IntentH\000\022\024\n\ntranscrip" - + "t\030\014 \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022=\n\004dt" - + "mf\030\027 \001(\0132-.google.cloud.dialogflow.cx.v3" - + "beta1.DtmfInputH\000\022\025\n\rlanguage_code\030\002 \001(\t" - + "\022+\n\nparameters\030\003 \001(\0132\027.google.protobuf.S" - + "truct\022N\n\021response_messages\030\004 \003(\01323.googl" - + "e.cloud.dialogflow.cx.v3beta1.ResponseMe" - + "ssage\022,\n\020webhook_statuses\030\r \003(\0132\022.google" - + ".rpc.Status\0221\n\020webhook_payloads\030\006 \003(\0132\027." - + "google.protobuf.Struct\022>\n\014current_page\030\007" - + " \001(\0132(.google.cloud.dialogflow.cx.v3beta" - + "1.Page\022>\n\006intent\030\010 \001(\0132*.google.cloud.di" - + "alogflow.cx.v3beta1.IntentB\002\030\001\022\'\n\033intent" - + "_detection_confidence\030\t \001(\002B\002\030\001\0228\n\005match" - + "\030\017 \001(\0132).google.cloud.dialogflow.cx.v3be" - + "ta1.Match\0220\n\017diagnostic_info\030\n \001(\0132\027.goo" - + "gle.protobuf.Struct\022^\n\031sentiment_analysi" - + "s_result\030\021 \001(\0132;.google.cloud.dialogflow" - + ".cx.v3beta1.SentimentAnalysisResult\022O\n\021a" - + "dvanced_settings\030\025 \001(\01324.google.cloud.di" - + "alogflow.cx.v3beta1.AdvancedSettingsB\007\n\005" - + "query\"\037\n\tTextInput\022\022\n\004text\030\001 \001(\tB\004\342A\001\002\"H" - + "\n\013IntentInput\0229\n\006intent\030\001 \001(\tB)\342A\001\002\372A\"\n " - + "dialogflow.googleapis.com/Intent\"g\n\nAudi" - + "oInput\022J\n\006config\030\001 \001(\01324.google.cloud.di" - + "alogflow.cx.v3beta1.InputAudioConfigB\004\342A" - + "\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event" - + "\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014f" - + "inish_digit\030\002 \001(\t\"\373\002\n\005Match\022:\n\006intent\030\001 " - + "\001(\0132*.google.cloud.dialogflow.cx.v3beta1" - + ".Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001" - + "(\0132\027.google.protobuf.Struct\022\026\n\016resolved_" - + "input\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623.google" - + ".cloud.dialogflow.cx.v3beta1.Match.Match" - + "Type\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032" - + "\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021" - + "\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILLING\020\003" - + "\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"" - + "\212\002\n\022MatchIntentRequest\022;\n\007session\030\001 \001(\tB" - + "*\342A\001\002\372A#\n!dialogflow.googleapis.com/Sess" - + "ion\022I\n\014query_params\030\002 \001(\01323.google.cloud" - + ".dialogflow.cx.v3beta1.QueryParameters\022I" - + "\n\013query_input\030\003 \001(\0132..google.cloud.dialo" - + "gflow.cx.v3beta1.QueryInputB\004\342A\001\002\022!\n\031per" - + "sist_parameter_changes\030\005 \001(\010\"\232\002\n\023MatchIn" - + "tentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_" - + "intent\030\002 \001(\tB%\372A\"\n dialogflow.googleapis" - + ".com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rt" - + "rigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\0132)." + + "IntentRequest\0328.google.cloud.dialogflow." + + "cx.v3beta1.DetectIntentResponse\"\266\001\202\323\344\223\002\257" + + "\001\"J/v3beta1/{session=projects/*/location" + + "s/*/agents/*/sessions/*}:detectIntent:\001*" + + "Z^\"Y/v3beta1/{session=projects/*/locatio" + + "ns/*/agents/*/environments/*/sessions/*}" + + ":detectIntent:\001*\022\242\001\n\025StreamingDetectInte" + + "nt\022@.google.cloud.dialogflow.cx.v3beta1." + + "StreamingDetectIntentRequest\032A.google.cl" + + "oud.dialogflow.cx.v3beta1.StreamingDetec" + + "tIntentResponse\"\000(\0010\001\022\265\002\n\013MatchIntent\0226." + "google.cloud.dialogflow.cx.v3beta1.Match" - + "\022>\n\014current_page\030\005 \001(\0132(.google.cloud.di" - + "alogflow.cx.v3beta1.PageB\007\n\005query\"\372\001\n\024Fu" - + "lfillIntentRequest\022T\n\024match_intent_reque" - + "st\030\001 \001(\01326.google.cloud.dialogflow.cx.v3" - + "beta1.MatchIntentRequest\0228\n\005match\030\002 \001(\0132" - + ").google.cloud.dialogflow.cx.v3beta1.Mat" - + "ch\022R\n\023output_audio_config\030\003 \001(\01325.google" - + ".cloud.dialogflow.cx.v3beta1.OutputAudio" - + "Config\"\335\001\n\025FulfillIntentResponse\022\023\n\013resp" - + "onse_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.go" - + "ogle.cloud.dialogflow.cx.v3beta1.QueryRe" - + "sult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023output_aud" - + "io_config\030\004 \001(\01325.google.cloud.dialogflo" - + "w.cx.v3beta1.OutputAudioConfig\";\n\027Sentim" - + "entAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagn" - + "itude\030\002 \001(\0022\212\n\n\010Sessions\022\272\002\n\014DetectInten" - + "t\0227.google.cloud.dialogflow.cx.v3beta1.D" - + "etectIntentRequest\0328.google.cloud.dialog" - + "flow.cx.v3beta1.DetectIntentResponse\"\266\001\202" - + "\323\344\223\002\257\001\"J/v3beta1/{session=projects/*/loc" - + "ations/*/agents/*/sessions/*}:detectInte" - + "nt:\001*Z^\"Y/v3beta1/{session=projects/*/lo" - + "cations/*/agents/*/environments/*/sessio" - + "ns/*}:detectIntent:\001*\022\242\001\n\025StreamingDetec" - + "tIntent\022@.google.cloud.dialogflow.cx.v3b" - + "eta1.StreamingDetectIntentRequest\032A.goog" - + "le.cloud.dialogflow.cx.v3beta1.Streaming" - + "DetectIntentResponse\"\000(\0010\001\022\265\002\n\013MatchInte" - + "nt\0226.google.cloud.dialogflow.cx.v3beta1." - + "MatchIntentRequest\0327.google.cloud.dialog" - + "flow.cx.v3beta1.MatchIntentResponse\"\264\001\202\323" - + "\344\223\002\255\001\"I/v3beta1/{session=projects/*/loca" - + "tions/*/agents/*/sessions/*}:matchIntent" - + ":\001*Z]\"X/v3beta1/{session=projects/*/loca" - + "tions/*/agents/*/environments/*/sessions" - + "/*}:matchIntent:\001*\022\351\002\n\rFulfillIntent\0228.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Fulfil" - + "lIntentRequest\0329.google.cloud.dialogflow" - + ".cx.v3beta1.FulfillIntentResponse\"\342\001\202\323\344\223" - + "\002\333\001\"`/v3beta1/{match_intent_request.sess" - + "ion=projects/*/locations/*/agents/*/sess" - + "ions/*}:fulfillIntent:\001*Zt\"o/v3beta1/{ma" - + "tch_intent_request.session=projects/*/lo" - + "cations/*/agents/*/environments/*/sessio" - + "ns/*}:fulfillIntent:\001*\032x\312A\031dialogflow.go" - + "ogleapis.com\322AYhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/dialogflowB\236\003\n&com.google." - + "cloud.dialogflow.cx.v3beta1B\014SessionProt" - + "oP\001Z6cloud.google.com/go/dialogflow/cx/a" - + "piv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Clo" - + "ud.Dialogflow.Cx.V3Beta1\352\002&Google::Cloud" - + "::Dialogflow::CX::V3beta1\352A\324\001\n!dialogflo" - + "w.googleapis.com/Session\022Iprojects/{proj" - + "ect}/locations/{location}/agents/{agent}" - + "/sessions/{session}\022dprojects/{project}/" - + "locations/{location}/agents/{agent}/envi" - + "ronments/{environment}/sessions/{session" - + "}b\006proto3" + + "IntentRequest\0327.google.cloud.dialogflow." + + "cx.v3beta1.MatchIntentResponse\"\264\001\202\323\344\223\002\255\001" + + "\"I/v3beta1/{session=projects/*/locations" + + "/*/agents/*/sessions/*}:matchIntent:\001*Z]" + + "\"X/v3beta1/{session=projects/*/locations" + + "/*/agents/*/environments/*/sessions/*}:m" + + "atchIntent:\001*\022\351\002\n\rFulfillIntent\0228.google" + + ".cloud.dialogflow.cx.v3beta1.FulfillInte" + + "ntRequest\0329.google.cloud.dialogflow.cx.v" + + "3beta1.FulfillIntentResponse\"\342\001\202\323\344\223\002\333\001\"`" + + "/v3beta1/{match_intent_request.session=p" + + "rojects/*/locations/*/agents/*/sessions/" + + "*}:fulfillIntent:\001*Zt\"o/v3beta1/{match_i" + + "ntent_request.session=projects/*/locatio" + + "ns/*/agents/*/environments/*/sessions/*}" + + ":fulfillIntent:\001*\022\352\001\n\024SubmitAnswerFeedba" + + "ck\022?.google.cloud.dialogflow.cx.v3beta1." + + "SubmitAnswerFeedbackRequest\0322.google.clo" + + "ud.dialogflow.cx.v3beta1.AnswerFeedback\"" + + "]\202\323\344\223\002W\"R/v3beta1/{session=projects/*/lo" + + "cations/*/agents/*/sessions/*}:submitAns" + + "werFeedback:\001*\032x\312A\031dialogflow.googleapis" + + ".com\322AYhttps://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/dialogflowB\347\004\n&com.google.cloud.di" + + "alogflow.cx.v3beta1B\014SessionProtoP\001Z6clo" + + "ud.google.com/go/dialogflow/cx/apiv3beta" + + "1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialo" + + "gflow.Cx.V3Beta1\352\002&Google::Cloud::Dialog" + + "flow::CX::V3beta1\352A\324\001\n!dialogflow.google" + + "apis.com/Session\022Iprojects/{project}/loc" + + "ations/{location}/agents/{agent}/session" + + "s/{session}\022dprojects/{project}/location" + + "s/{location}/agents/{agent}/environments" + + "/{environment}/sessions/{session}\352A\305\001\n(d" + + "iscoveryengine.googleapis.com/DataStore\022" + + "?projects/{project}/locations/{location}" + + "/dataStores/{data_store}\022Xprojects/{proj" + + "ect}/locations/{location}/collections/{c" + + "ollection}/dataStores/{data_store}b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -360,12 +439,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.SessionEntityTypeProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), com.google.type.LatLngProto.getDescriptor(), }); - internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentRequest_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor, + new java.lang.String[] { + "Rating", "RatingReason", "CustomRating", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_AnswerFeedback_RatingReason_descriptor, + new java.lang.String[] { + "ReasonLabels", "Feedback", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor, + new java.lang.String[] { + "Session", "ResponseId", "AnswerFeedback", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentRequest_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentRequest_descriptor, @@ -373,7 +479,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Session", "QueryParams", "QueryInput", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_DetectIntentResponse_descriptor, @@ -386,7 +492,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AllowCancellation", }); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentRequest_descriptor, @@ -399,7 +505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnableDebuggingInfo", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CloudConversationDebuggingInfo_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_dialogflow_cx_v3beta1_CloudConversationDebuggingInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_CloudConversationDebuggingInfo_descriptor, @@ -424,7 +530,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientHalfCloseStreamingTimeOffset", }); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingDetectIntentResponse_descriptor, @@ -432,7 +538,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RecognitionResult", "DetectIntentResponse", "DebuggingInfo", "Response", }); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingRecognitionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_StreamingRecognitionResult_descriptor, @@ -447,7 +553,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_descriptor, @@ -464,6 +570,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FlowVersions", "Channel", "SessionTtl", + "EndUserMetadata", + "SearchConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_WebhookHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_QueryParameters_descriptor @@ -475,8 +583,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_SearchConfig_descriptor, + new java.lang.String[] { + "BoostSpecs", "FilterSpecs", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor, + new java.lang.String[] { + "ConditionBoostSpecs", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor, + new java.lang.String[] { + "Condition", "Boost", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor, + new java.lang.String[] { + "DataStores", "Spec", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_FilterSpecs_descriptor, + new java.lang.String[] { + "DataStores", "Filter", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_descriptor, @@ -484,7 +634,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", "Intent", "Audio", "Event", "Dtmf", "LanguageCode", "Input", }); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor, @@ -506,10 +656,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiagnosticInfo", "SentimentAnalysisResult", "AdvancedSettings", + "AllowAnswerFeedback", "Query", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_descriptor, @@ -517,7 +668,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", }); internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_descriptor, @@ -525,7 +676,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", }); internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_descriptor, @@ -533,7 +684,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "Audio", }); internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_descriptor, @@ -541,7 +692,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Event", }); internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_descriptor, @@ -549,7 +700,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Digits", "FinishDigit", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Match_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_cx_v3beta1_Match_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_Match_descriptor, @@ -557,7 +708,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", "Event", "Parameters", "ResolvedInput", "MatchType", "Confidence", }); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_descriptor, @@ -565,7 +716,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Session", "QueryParams", "QueryInput", "PersistParameterChanges", }); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor, @@ -579,7 +730,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Query", }); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_descriptor, @@ -587,7 +738,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MatchIntentRequest", "Match", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_descriptor, @@ -595,7 +746,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResponseId", "QueryResult", "OutputAudio", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_descriptor, @@ -623,6 +774,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.SessionEntityTypeProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); com.google.type.LatLngProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequest.java new file mode 100644 index 000000000000..9d05fd61da3c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequest.java @@ -0,0 +1,1418 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request to set the feedback for a bot answer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} + */ +public final class SubmitAnswerFeedbackRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) + SubmitAnswerFeedbackRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubmitAnswerFeedbackRequest.newBuilder() to construct. + private SubmitAnswerFeedbackRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubmitAnswerFeedbackRequest() { + session_ = ""; + responseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubmitAnswerFeedbackRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.Builder.class); + } + + public static final int SESSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseId_ = ""; + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + @java.lang.Override + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + 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(); + responseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANSWER_FEEDBACK_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answerFeedback_; + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + @java.lang.Override + public boolean hasAnswerFeedback() { + return answerFeedback_ != null; + } + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback getAnswerFeedback() { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder + getAnswerFeedbackOrBuilder() { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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(session_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, responseId_); + } + if (answerFeedback_ != null) { + output.writeMessage(3, getAnswerFeedback()); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + 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(session_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, responseId_); + } + if (answerFeedback_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnswerFeedback()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateMask()); + } + 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.cx.v3beta1.SubmitAnswerFeedbackRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) obj; + + if (!getSession().equals(other.getSession())) return false; + if (!getResponseId().equals(other.getResponseId())) return false; + if (hasAnswerFeedback() != other.hasAnswerFeedback()) return false; + if (hasAnswerFeedback()) { + if (!getAnswerFeedback().equals(other.getAnswerFeedback())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + hash = (37 * hash) + RESPONSE_ID_FIELD_NUMBER; + hash = (53 * hash) + getResponseId().hashCode(); + if (hasAnswerFeedback()) { + hash = (37 * hash) + ANSWER_FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getAnswerFeedback().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest 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.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest 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.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest 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.cx.v3beta1.SubmitAnswerFeedbackRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + 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.cx.v3beta1.SubmitAnswerFeedbackRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest 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.cx.v3beta1.SubmitAnswerFeedbackRequest 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 to set the feedback for a bot answer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + session_ = ""; + responseId_ = ""; + answerFeedback_ = null; + if (answerFeedbackBuilder_ != null) { + answerFeedbackBuilder_.dispose(); + answerFeedbackBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SubmitAnswerFeedbackRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.session_ = session_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.responseId_ = responseId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.answerFeedback_ = + answerFeedbackBuilder_ == null ? answerFeedback_ : answerFeedbackBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.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.cx.v3beta1.SubmitAnswerFeedbackRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + .getDefaultInstance()) return this; + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResponseId().isEmpty()) { + responseId_ = other.responseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAnswerFeedback()) { + mergeAnswerFeedback(other.getAnswerFeedback()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + responseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAnswerFeedbackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 session_ = ""; + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the session the feedback was sent to.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object responseId_ = ""; + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResponseId() { + responseId_ = getDefaultInstance().getResponseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the response to update its feedback. This is the same as
+     * DetectIntentResponse.response_id.
+     * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answerFeedback_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder> + answerFeedbackBuilder_; + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + public boolean hasAnswerFeedback() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback getAnswerFeedback() { + if (answerFeedbackBuilder_ == null) { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } else { + return answerFeedbackBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnswerFeedback(com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback value) { + if (answerFeedbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answerFeedback_ = value; + } else { + answerFeedbackBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder builderForValue) { + if (answerFeedbackBuilder_ == null) { + answerFeedback_ = builderForValue.build(); + } else { + answerFeedbackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnswerFeedback( + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback value) { + if (answerFeedbackBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && answerFeedback_ != null + && answerFeedback_ + != com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance()) { + getAnswerFeedbackBuilder().mergeFrom(value); + } else { + answerFeedback_ = value; + } + } else { + answerFeedbackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnswerFeedback() { + bitField0_ = (bitField0_ & ~0x00000004); + answerFeedback_ = null; + if (answerFeedbackBuilder_ != null) { + answerFeedbackBuilder_.dispose(); + answerFeedbackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder + getAnswerFeedbackBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAnswerFeedbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder + getAnswerFeedbackOrBuilder() { + if (answerFeedbackBuilder_ != null) { + return answerFeedbackBuilder_.getMessageOrBuilder(); + } else { + return answerFeedback_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.getDefaultInstance() + : answerFeedback_; + } + } + /** + * + * + *
+     * Required. Feedback provided for a bot answer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder> + getAnswerFeedbackFieldBuilder() { + if (answerFeedbackBuilder_ == null) { + answerFeedbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder>( + getAnswerFeedback(), getParentForChildren(), isClean()); + answerFeedback_ = null; + } + return answerFeedbackBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000008); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. The mask to control which fields to update. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.cx.v3beta1.SubmitAnswerFeedbackRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubmitAnswerFeedbackRequest 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.cx.v3beta1.SubmitAnswerFeedbackRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequestOrBuilder.java new file mode 100644 index 000000000000..e1c79c7e48be --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SubmitAnswerFeedbackRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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/cx/v3beta1/session.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface SubmitAnswerFeedbackRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + java.lang.String getSession(); + /** + * + * + *
+   * Required. The name of the session the feedback was sent to.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseId. + */ + java.lang.String getResponseId(); + /** + * + * + *
+   * Required. ID of the response to update its feedback. This is the same as
+   * DetectIntentResponse.response_id.
+   * 
+ * + * string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseId. + */ + com.google.protobuf.ByteString getResponseIdBytes(); + + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the answerFeedback field is set. + */ + boolean hasAnswerFeedback(); + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The answerFeedback. + */ + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback getAnswerFeedback(); + /** + * + * + *
+   * Required. Feedback provided for a bot answer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedbackOrBuilder getAnswerFeedbackOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields to update. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index 63a356089538..72b419c3c64c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -245,6 +245,15 @@ message Agent { string engine = 1 [(google.api.field_behavior) = REQUIRED]; } + // Settings for answer feedback collection. + message AnswerFeedbackSettings { + // Optional. If enabled, end users will be able to provide + // [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to + // Dialogflow responses. Feature works only if interaction logging is + // enabled in the Dialogflow agent. + bool enable_answer_feedback = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] @@ -335,6 +344,10 @@ message Agent { // Gen App Builder-related agent-level settings. optional GenAppBuilderSettings gen_app_builder_settings = 33; + + // Optional. Answer feedback collection settings. + AnswerFeedbackSettings answer_feedback_settings = 38 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index bea17e17a6c1..6dc2d577f90b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -151,6 +151,39 @@ message SpeechWordInfo { float confidence = 4; } +// Configuration of the barge-in behavior. Barge-in instructs the API to return +// a detected utterance at a proper time while the client is playing back the +// response audio from a previous request. When the client sees the +// utterance, it should stop the playback and immediately get ready for +// receiving the responses for the current request. +// +// The barge-in handling requires the client to start streaming audio input +// as soon as it starts playing back the audio from the previous response. The +// playback is modeled into two phases: +// +// * No barge-in phase: which goes first and during which speech detection +// should not be carried out. +// +// * Barge-in phase: which follows the no barge-in phase and during which +// the API starts speech detection and may inform the client that an utterance +// has been detected. Note that no-speech event is not expected in this +// phase. +// +// The client provides this configuration in terms of the durations of those +// two phases. The durations are measured in terms of the audio length from the +// the start of the input audio. +// +// No-speech event is a response with END_OF_UTTERANCE without any transcript +// following up. +message BargeInConfig { + // Duration that is not eligible for barge-in at the beginning of the input + // audio. + google.protobuf.Duration no_barge_in_duration = 1; + + // Total duration for the playback at the beginning of the input audio. + google.protobuf.Duration total_duration = 2; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -211,6 +244,9 @@ message InputAudioConfig { // needed. // Note: This setting is relevant only for streaming methods. bool single_utterance = 8; + + // Configuration of barge-in behavior during the streaming of input audio. + BargeInConfig barge_in_config = 15; } // Gender of the voice as described in diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index 41d853e7d2e7..88b8bf365ec5 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -40,15 +40,6 @@ service EntityTypes { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/dialogflow"; - // Returns the list of all entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) - returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" - }; - option (google.api.method_signature) = "parent"; - } - // Retrieves the specified entity type. rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { option (google.api.http) = { @@ -91,6 +82,15 @@ service EntityTypes { }; option (google.api.method_signature) = "name"; } + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) + returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + } } // Entities are extracted from user input and represent parameters that are diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto index d0895cf89e44..04defe37f54e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -27,6 +27,7 @@ import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; @@ -44,6 +45,11 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}" pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/DataStore" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the @@ -114,6 +120,78 @@ service Sessions { } }; } + + // Updates the feedback received from the user for a single turn of the bot + // response. + rpc SubmitAnswerFeedback(SubmitAnswerFeedbackRequest) + returns (AnswerFeedback) { + option (google.api.http) = { + post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback" + body: "*" + }; + } +} + +// Stores information about feedback provided by users about a response. +message AnswerFeedback { + // Represents thumbs up/down rating provided by user about a response. + enum Rating { + // Rating not specified. + RATING_UNSPECIFIED = 0; + + // Thumbs up feedback from user. + THUMBS_UP = 1; + + // Thumbs down feedback from user. + THUMBS_DOWN = 2; + } + + // Stores extra information about why users provided thumbs down rating. + message RatingReason { + // Optional. Custom reason labels for thumbs down rating provided by the + // user. The maximum number of labels allowed is 10 and the maximum length + // of a single label is 128 characters. + repeated string reason_labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional feedback about the rating. + // This field can be populated without choosing a predefined `reason`. + string feedback = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Rating from user for the specific Dialogflow response. + Rating rating = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. In case of thumbs down rating provided, users can optionally + // provide context about the rating. + RatingReason rating_reason = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom rating from the user about the provided answer, with + // maximum length of 1024 characters. For example, client could use a + // customized JSON object to indicate the rating. + string custom_rating = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to set the feedback for a bot answer. +message SubmitAnswerFeedbackRequest { + // Required. The name of the session the feedback was sent to. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // Required. ID of the response to update its feedback. This is the same as + // DetectIntentResponse.response_id. + string response_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feedback provided for a bot answer. + AnswerFeedback answer_feedback = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields to update. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The request to detect user's intent. @@ -609,6 +687,120 @@ message QueryParameters { // This value should be no longer than 1 day. google.protobuf.Duration session_ttl = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about the end-user to improve the relevance and + // accuracy of generative answers. + // + // This will be interpreted and used by a language model, so, for good + // results, the data should be self-descriptive, and in a simple structure. + // + // Example: + // + // ```json + // { + // "subscription plan": "Business Premium Plus", + // "devices owned": [ + // {"model": "Google Pixel 7"}, + // {"model": "Google Pixel Tablet"} + // ] + // } + // ``` + google.protobuf.Struct end_user_metadata = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Search configuration for UCS search queries. + SearchConfig search_config = 20 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search configuration for UCS search queries. +message SearchConfig { + // Optional. Boosting configuration for the datastores. + repeated BoostSpecs boost_specs = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter configuration for the datastores. + repeated FilterSpecs filter_specs = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specification to boost certain documents. +// A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation +// is available at +// https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec +message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // Optional. An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Condition boost specifications. If a document matches multiple + // conditions in the specifictions, boost scores from these specifications are + // all applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specifications for data stores. +message BoostSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. A list of boosting specifications. + repeated BoostSpec spec = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Filter specifications for data stores. +message FilterSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. The filter expression to be applied. + // Expression syntax is documented at + // https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; } // Represents the query input. It can contain one of: @@ -774,6 +966,10 @@ message QueryResult { // Dialogflow exports audio to Google Cloud Storage, then the client may need // to wait for the resulting object to appear in the bucket before proceeding. AdvancedSettings advanced_settings = 21; + + // Indicates whether the Thumbs up/Thumbs down rating controls are need to be + // shown for the response in the Dialogflow Messenger widget. + bool allow_answer_feedback = 32; } // Represents the natural language text to be processed. diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java new file mode 100644 index 000000000000..f86805c04654 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java @@ -0,0 +1,57 @@ +/* + * 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.cx.v3.samples; + +// [START dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; +import com.google.cloud.dialogflow.cx.v3.SessionName; +import com.google.cloud.dialogflow.cx.v3.SessionsClient; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSubmitAnswerFeedback { + + public static void main(String[] args) throws Exception { + asyncSubmitAnswerFeedback(); + } + + public static void asyncSubmitAnswerFeedback() 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 (SessionsClient sessionsClient = SessionsClient.create()) { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + sessionsClient.submitAnswerFeedbackCallable().futureCall(request); + // Do something. + AnswerFeedback response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java new file mode 100644 index 000000000000..1750511571df --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java @@ -0,0 +1,53 @@ +/* + * 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.cx.v3.samples; + +// [START dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_sync] +import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; +import com.google.cloud.dialogflow.cx.v3.SessionName; +import com.google.cloud.dialogflow.cx.v3.SessionsClient; +import com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; +import com.google.protobuf.FieldMask; + +public class SyncSubmitAnswerFeedback { + + public static void main(String[] args) throws Exception { + syncSubmitAnswerFeedback(); + } + + public static void syncSubmitAnswerFeedback() 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 (SessionsClient sessionsClient = SessionsClient.create()) { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + AnswerFeedback response = sessionsClient.submitAnswerFeedback(request); + } + } +} +// [END dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java new file mode 100644 index 000000000000..56e2c33913e7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/AsyncSubmitAnswerFeedback.java @@ -0,0 +1,57 @@ +/* + * 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.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; +import com.google.cloud.dialogflow.cx.v3beta1.SessionName; +import com.google.cloud.dialogflow.cx.v3beta1.SessionsClient; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSubmitAnswerFeedback { + + public static void main(String[] args) throws Exception { + asyncSubmitAnswerFeedback(); + } + + public static void asyncSubmitAnswerFeedback() 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 (SessionsClient sessionsClient = SessionsClient.create()) { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + sessionsClient.submitAnswerFeedbackCallable().futureCall(request); + // Do something. + AnswerFeedback response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java new file mode 100644 index 000000000000..6da77c76dc66 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/submitanswerfeedback/SyncSubmitAnswerFeedback.java @@ -0,0 +1,53 @@ +/* + * 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.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; +import com.google.cloud.dialogflow.cx.v3beta1.SessionName; +import com.google.cloud.dialogflow.cx.v3beta1.SessionsClient; +import com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; +import com.google.protobuf.FieldMask; + +public class SyncSubmitAnswerFeedback { + + public static void main(String[] args) throws Exception { + syncSubmitAnswerFeedback(); + } + + public static void syncSubmitAnswerFeedback() 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 (SessionsClient sessionsClient = SessionsClient.create()) { + SubmitAnswerFeedbackRequest request = + SubmitAnswerFeedbackRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setResponseId("responseId-633138884") + .setAnswerFeedback(AnswerFeedback.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + AnswerFeedback response = sessionsClient.submitAnswerFeedback(request); + } + } +} +// [END dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_sync]