diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index 3a3aebc74c37..06fcf0766882 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.19.0 + 26.22.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.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.34.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/AgentsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index 60921856e48f..d87d69f31efb 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -1255,6 +1255,230 @@ public final AgentValidationResult getAgentValidationResult( return stub.getAgentValidationResultCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentGenerativeSettingsName name =
+   *       AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   String languageCode = "languageCode-2092349083";
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
+   * }
+   * }
+ * + * @param name Required. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/generativeSettings`. + * @param languageCode Required. Language code of the generative settings. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings getGenerativeSettings( + AgentGenerativeSettingsName name, String languageCode) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setLanguageCode(languageCode) + .build(); + return getGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   String languageCode = "languageCode-2092349083";
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
+   * }
+   * }
+ * + * @param name Required. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/generativeSettings`. + * @param languageCode Required. Language code of the generative settings. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings getGenerativeSettings(String name, String languageCode) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName(name) + .setLanguageCode(languageCode) + .build(); + return getGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetGenerativeSettingsRequest request =
+   *       GetGenerativeSettingsRequest.newBuilder()
+   *           .setName(
+   *               AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(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 GenerativeSettings getGenerativeSettings(GetGenerativeSettingsRequest request) { + return getGenerativeSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetGenerativeSettingsRequest request =
+   *       GetGenerativeSettingsRequest.newBuilder()
+   *           .setName(
+   *               AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.getGenerativeSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   GenerativeSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getGenerativeSettingsCallable() { + return stub.getGenerativeSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   GenerativeSettings response =
+   *       agentsClient.updateGenerativeSettings(generativeSettings, updateMask);
+   * }
+   * }
+ * + * @param generativeSettings Required. Generative settings to update. + * @param updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings updateGenerativeSettings( + GenerativeSettings generativeSettings, FieldMask updateMask) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(generativeSettings) + .setUpdateMask(updateMask) + .build(); + return updateGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateGenerativeSettingsRequest request =
+   *       UpdateGenerativeSettingsRequest.newBuilder()
+   *           .setGenerativeSettings(GenerativeSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   GenerativeSettings response = agentsClient.updateGenerativeSettings(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 GenerativeSettings updateGenerativeSettings( + UpdateGenerativeSettingsRequest request) { + return updateGenerativeSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateGenerativeSettingsRequest request =
+   *       UpdateGenerativeSettingsRequest.newBuilder()
+   *           .setGenerativeSettings(GenerativeSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.updateGenerativeSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   GenerativeSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateGenerativeSettingsCallable() { + return stub.updateGenerativeSettingsCallable(); + } + // 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/AgentsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java index 067505c4ded2..7ba2cb22f294 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java @@ -141,6 +141,18 @@ public UnaryCallSettings validateAg return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings(); } + /** Returns the object with the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings + getGenerativeSettingsSettings() { + return ((AgentsStubSettings) getStubSettings()).getGenerativeSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings + updateGenerativeSettingsSettings() { + return ((AgentsStubSettings) getStubSettings()).updateGenerativeSettingsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -326,6 +338,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getStubSettingsBuilder().getAgentValidationResultSettings(); } + /** Returns the builder for the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings.Builder + getGenerativeSettingsSettings() { + return getStubSettingsBuilder().getGenerativeSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings.Builder + updateGenerativeSettingsSettings() { + return getStubSettingsBuilder().updateGenerativeSettingsSettings(); + } + /** 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/FlowsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index e10f02969935..be2ebc6af765 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -1239,6 +1239,7 @@ public final FlowValidationResult getFlowValidationResult( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * ImportFlowResponse response = flowsClient.importFlowAsync(request).get(); * } @@ -1279,6 +1280,7 @@ public final OperationFuture importFlowAsync( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * OperationFuture future = * flowsClient.importFlowOperationCallable().futureCall(request); @@ -1319,6 +1321,7 @@ public final OperationFuture importFlowAsync( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * ApiFuture future = flowsClient.importFlowCallable().futureCall(request); * // Do something. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java index 9a1d6e94a7d8..01f36ca38fb0 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java @@ -55,7 +55,7 @@ * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } @@ -185,6 +185,42 @@ public TransitionRouteGroupsStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all transition route groups in the specified flow. + * + *

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 (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The flow to list all transition route groups for. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(AgentName parent) { + ListTransitionRouteGroupsRequest request = + ListTransitionRouteGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransitionRouteGroups(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the list of all transition route groups in the specified flow. @@ -209,7 +245,8 @@ public TransitionRouteGroupsStub getStub() { * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(FlowName parent) { @@ -244,7 +281,8 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(Fl * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(String parent) { @@ -383,7 +421,7 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } @@ -392,7 +430,9 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupName name) { @@ -419,7 +459,7 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * String name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") * .toString(); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); @@ -429,7 +469,9 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TransitionRouteGroup getTransitionRouteGroup(String name) { @@ -456,7 +498,7 @@ public final TransitionRouteGroup getTransitionRouteGroup(String name) { * GetTransitionRouteGroupRequest request = * GetTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -495,7 +537,7 @@ public final TransitionRouteGroup getTransitionRouteGroup( * GetTransitionRouteGroupRequest request = * GetTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -516,6 +558,49 @@ public final TransitionRouteGroup getTransitionRouteGroup( return stub.getTransitionRouteGroupCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the + * specified flow. + * + *

Note: You should always train a flow prior to sending it queries. See the [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + *

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 (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * + * @param parent Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. + * @param transitionRouteGroup Required. The transition route group to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransitionRouteGroup createTransitionRouteGroup( + AgentName parent, TransitionRouteGroup transitionRouteGroup) { + CreateTransitionRouteGroupRequest request = + CreateTransitionRouteGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + return createTransitionRouteGroup(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the @@ -544,7 +629,8 @@ public final TransitionRouteGroup getTransitionRouteGroup( * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. * @param transitionRouteGroup Required. The transition route group to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -586,7 +672,8 @@ public final TransitionRouteGroup createTransitionRouteGroup( * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. * @param transitionRouteGroup Required. The transition route group to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -804,7 +891,7 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * transitionRouteGroupsClient.deleteTransitionRouteGroup(name); * } @@ -813,7 +900,9 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { @@ -843,7 +932,7 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * String name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") * .toString(); * transitionRouteGroupsClient.deleteTransitionRouteGroup(name); @@ -853,7 +942,9 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTransitionRouteGroup(String name) { @@ -883,7 +974,7 @@ public final void deleteTransitionRouteGroup(String name) { * DeleteTransitionRouteGroupRequest request = * DeleteTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -924,7 +1015,7 @@ public final void deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest r * DeleteTransitionRouteGroupRequest request = * DeleteTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", 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 649239923af0..45eb3abbcc48 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 @@ -25,6 +25,9 @@ "GetAgentValidationResult": { "methods": ["getAgentValidationResult", "getAgentValidationResult", "getAgentValidationResult", "getAgentValidationResultCallable"] }, + "GetGenerativeSettings": { + "methods": ["getGenerativeSettings", "getGenerativeSettings", "getGenerativeSettings", "getGenerativeSettingsCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, @@ -40,6 +43,9 @@ "UpdateAgent": { "methods": ["updateAgent", "updateAgent", "updateAgentCallable"] }, + "UpdateGenerativeSettings": { + "methods": ["updateGenerativeSettings", "updateGenerativeSettings", "updateGenerativeSettingsCallable"] + }, "ValidateAgent": { "methods": ["validateAgent", "validateAgentCallable"] } @@ -446,7 +452,7 @@ "libraryClient": "TransitionRouteGroupsClient", "rpcs": { "CreateTransitionRouteGroup": { - "methods": ["createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroupCallable"] + "methods": ["createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroupCallable"] }, "DeleteTransitionRouteGroup": { "methods": ["deleteTransitionRouteGroup", "deleteTransitionRouteGroup", "deleteTransitionRouteGroup", "deleteTransitionRouteGroupCallable"] @@ -461,7 +467,7 @@ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, "ListTransitionRouteGroups": { - "methods": ["listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroupsPagedCallable", "listTransitionRouteGroupsCallable"] + "methods": ["listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroupsPagedCallable", "listTransitionRouteGroupsCallable"] }, "UpdateTransitionRouteGroup": { "methods": ["updateTransitionRouteGroup", "updateTransitionRouteGroup", "updateTransitionRouteGroupCallable"] diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java index 01640696302f..00cc4f746955 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java @@ -297,7 +297,7 @@ * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java index 543e127b89bf..2f5a4dcd5d00 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java @@ -28,12 +28,15 @@ import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -112,6 +115,16 @@ public UnaryCallable validateAgentC throw new UnsupportedOperationException("Not implemented: getAgentValidationResultCallable()"); } + public UnaryCallable + getGenerativeSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getGenerativeSettingsCallable()"); + } + + public UnaryCallable + updateGenerativeSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: updateGenerativeSettingsCallable()"); + } + 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/AgentsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java index 0d8cdcc22c33..cd7d569325c7 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java @@ -54,12 +54,15 @@ import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -138,6 +141,10 @@ public class AgentsStubSettings extends StubSettings { validateAgentSettings; private final UnaryCallSettings getAgentValidationResultSettings; + private final UnaryCallSettings + getGenerativeSettingsSettings; + private final UnaryCallSettings + updateGenerativeSettingsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -307,6 +314,18 @@ public UnaryCallSettings validateAg return getAgentValidationResultSettings; } + /** Returns the object with the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings + getGenerativeSettingsSettings() { + return getGenerativeSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings + updateGenerativeSettingsSettings() { + return updateGenerativeSettingsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -433,6 +452,8 @@ protected AgentsStubSettings(Builder settingsBuilder) throws IOException { restoreAgentOperationSettings = settingsBuilder.restoreAgentOperationSettings().build(); validateAgentSettings = settingsBuilder.validateAgentSettings().build(); getAgentValidationResultSettings = settingsBuilder.getAgentValidationResultSettings().build(); + getGenerativeSettingsSettings = settingsBuilder.getGenerativeSettingsSettings().build(); + updateGenerativeSettingsSettings = settingsBuilder.updateGenerativeSettingsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -457,6 +478,10 @@ public static class Builder extends StubSettings.Builder getAgentValidationResultSettings; + private final UnaryCallSettings.Builder + getGenerativeSettingsSettings; + private final UnaryCallSettings.Builder + updateGenerativeSettingsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -524,6 +549,8 @@ protected Builder(ClientContext clientContext) { restoreAgentOperationSettings = OperationCallSettings.newBuilder(); validateAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getAgentValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getGenerativeSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGenerativeSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -538,6 +565,8 @@ protected Builder(ClientContext clientContext) { restoreAgentSettings, validateAgentSettings, getAgentValidationResultSettings, + getGenerativeSettingsSettings, + updateGenerativeSettingsSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -557,6 +586,8 @@ protected Builder(AgentsStubSettings settings) { restoreAgentOperationSettings = settings.restoreAgentOperationSettings.toBuilder(); validateAgentSettings = settings.validateAgentSettings.toBuilder(); getAgentValidationResultSettings = settings.getAgentValidationResultSettings.toBuilder(); + getGenerativeSettingsSettings = settings.getGenerativeSettingsSettings.toBuilder(); + updateGenerativeSettingsSettings = settings.updateGenerativeSettingsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -571,6 +602,8 @@ protected Builder(AgentsStubSettings settings) { restoreAgentSettings, validateAgentSettings, getAgentValidationResultSettings, + getGenerativeSettingsSettings, + updateGenerativeSettingsSettings, listLocationsSettings, getLocationSettings); } @@ -647,6 +680,16 @@ 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 + .getGenerativeSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateGenerativeSettingsSettings() + .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")) @@ -786,6 +829,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getAgentValidationResultSettings; } + /** Returns the builder for the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings.Builder + getGenerativeSettingsSettings() { + return getGenerativeSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings.Builder + updateGenerativeSettingsSettings() { + return updateGenerativeSettingsSettings; + } + /** 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/GrpcAgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java index da0c0885720b..a2cc4dce4535 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java @@ -33,12 +33,15 @@ import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -142,6 +145,26 @@ public class GrpcAgentsStub extends AgentsStub { ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) .build(); + private static final MethodDescriptor + getGenerativeSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/GetGenerativeSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(GetGenerativeSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GenerativeSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateGenerativeSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/UpdateGenerativeSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateGenerativeSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GenerativeSettings.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -175,6 +198,10 @@ public class GrpcAgentsStub extends AgentsStub { private final UnaryCallable validateAgentCallable; private final UnaryCallable getAgentValidationResultCallable; + private final UnaryCallable + getGenerativeSettingsCallable; + private final UnaryCallable + updateGenerativeSettingsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -310,6 +337,30 @@ protected GrpcAgentsStub( return builder.build(); }) .build(); + GrpcCallSettings + getGenerativeSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGenerativeSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateGenerativeSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "generative_settings.name", + String.valueOf(request.getGenerativeSettings().getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -375,6 +426,16 @@ protected GrpcAgentsStub( getAgentValidationResultTransportSettings, settings.getAgentValidationResultSettings(), clientContext); + this.getGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + getGenerativeSettingsTransportSettings, + settings.getGenerativeSettingsSettings(), + clientContext); + this.updateGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + updateGenerativeSettingsTransportSettings, + settings.updateGenerativeSettingsSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -455,6 +516,18 @@ public UnaryCallable validateAgentC return getAgentValidationResultCallable; } + @Override + public UnaryCallable + getGenerativeSettingsCallable() { + return getGenerativeSettingsCallable; + } + + @Override + public UnaryCallable + updateGenerativeSettingsCallable() { + return updateGenerativeSettingsCallable; + } + @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/HttpJsonAgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonAgentsStub.java index 1f421a213072..672e353a777d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonAgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonAgentsStub.java @@ -42,12 +42,15 @@ import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -408,6 +411,84 @@ public class HttpJsonAgentsStub extends AgentsStub { .build()) .build(); + private static final ApiMethodDescriptor + getGenerativeSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/GetGenerativeSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/generativeSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerativeSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateGenerativeSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/UpdateGenerativeSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{generativeSettings.name=projects/*/locations/*/agents/*/generativeSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "generativeSettings.name", + request.getGenerativeSettings().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "generativeSettings", request.getGenerativeSettings(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerativeSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -490,6 +571,10 @@ public class HttpJsonAgentsStub extends AgentsStub { private final UnaryCallable validateAgentCallable; private final UnaryCallable getAgentValidationResultCallable; + private final UnaryCallable + getGenerativeSettingsCallable; + private final UnaryCallable + updateGenerativeSettingsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -671,6 +756,32 @@ protected HttpJsonAgentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getGenerativeSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getGenerativeSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateGenerativeSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "generative_settings.name", + String.valueOf(request.getGenerativeSettings().getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -739,6 +850,16 @@ protected HttpJsonAgentsStub( getAgentValidationResultTransportSettings, settings.getAgentValidationResultSettings(), clientContext); + this.getGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + getGenerativeSettingsTransportSettings, + settings.getGenerativeSettingsSettings(), + clientContext); + this.updateGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + updateGenerativeSettingsTransportSettings, + settings.updateGenerativeSettingsSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -765,6 +886,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(restoreAgentMethodDescriptor); methodDescriptors.add(validateAgentMethodDescriptor); methodDescriptors.add(getAgentValidationResultMethodDescriptor); + methodDescriptors.add(getGenerativeSettingsMethodDescriptor); + methodDescriptors.add(updateGenerativeSettingsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -836,6 +959,18 @@ public UnaryCallable validateAgentC return getAgentValidationResultCallable; } + @Override + public UnaryCallable + getGenerativeSettingsCallable() { + return getGenerativeSettingsCallable; + } + + @Override + public UnaryCallable + updateGenerativeSettingsCallable() { + return updateGenerativeSettingsCallable; + } + @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/HttpJsonTransitionRouteGroupsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonTransitionRouteGroupsStub.java index 4d913a765443..dc068341e4e8 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonTransitionRouteGroupsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonTransitionRouteGroupsStub.java @@ -84,6 +84,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -123,6 +125,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths( + "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -160,6 +164,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -206,6 +212,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub request.getTransitionRouteGroup().getName()); return fields; }) + .setAdditionalPaths( + "/v3/{transitionRouteGroup.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -250,6 +258,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths( + "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index abcd2a45ebcb..40ca72dae1c3 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -1256,6 +1256,230 @@ public final AgentValidationResult getAgentValidationResult( return stub.getAgentValidationResultCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentGenerativeSettingsName name =
+   *       AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   String languageCode = "languageCode-2092349083";
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
+   * }
+   * }
+ * + * @param name Required. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/generativeSettings`. + * @param languageCode Required. Language code of the generative settings. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings getGenerativeSettings( + AgentGenerativeSettingsName name, String languageCode) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setLanguageCode(languageCode) + .build(); + return getGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   String languageCode = "languageCode-2092349083";
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
+   * }
+   * }
+ * + * @param name Required. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/generativeSettings`. + * @param languageCode Required. Language code of the generative settings. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings getGenerativeSettings(String name, String languageCode) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName(name) + .setLanguageCode(languageCode) + .build(); + return getGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetGenerativeSettingsRequest request =
+   *       GetGenerativeSettingsRequest.newBuilder()
+   *           .setName(
+   *               AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   GenerativeSettings response = agentsClient.getGenerativeSettings(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 GenerativeSettings getGenerativeSettings(GetGenerativeSettingsRequest request) { + return getGenerativeSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetGenerativeSettingsRequest request =
+   *       GetGenerativeSettingsRequest.newBuilder()
+   *           .setName(
+   *               AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.getGenerativeSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   GenerativeSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getGenerativeSettingsCallable() { + return stub.getGenerativeSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   GenerativeSettings response =
+   *       agentsClient.updateGenerativeSettings(generativeSettings, updateMask);
+   * }
+   * }
+ * + * @param generativeSettings Required. Generative settings to update. + * @param updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerativeSettings updateGenerativeSettings( + GenerativeSettings generativeSettings, FieldMask updateMask) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(generativeSettings) + .setUpdateMask(updateMask) + .build(); + return updateGenerativeSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateGenerativeSettingsRequest request =
+   *       UpdateGenerativeSettingsRequest.newBuilder()
+   *           .setGenerativeSettings(GenerativeSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   GenerativeSettings response = agentsClient.updateGenerativeSettings(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 GenerativeSettings updateGenerativeSettings( + UpdateGenerativeSettingsRequest request) { + return updateGenerativeSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateGenerativeSettingsRequest request =
+   *       UpdateGenerativeSettingsRequest.newBuilder()
+   *           .setGenerativeSettings(GenerativeSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.updateGenerativeSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   GenerativeSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateGenerativeSettingsCallable() { + return stub.updateGenerativeSettingsCallable(); + } + // 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/AgentsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java index 36a35838124e..9ae735a30f3a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java @@ -142,6 +142,18 @@ public UnaryCallSettings validateAg return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings(); } + /** Returns the object with the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings + getGenerativeSettingsSettings() { + return ((AgentsStubSettings) getStubSettings()).getGenerativeSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings + updateGenerativeSettingsSettings() { + return ((AgentsStubSettings) getStubSettings()).updateGenerativeSettingsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -327,6 +339,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getStubSettingsBuilder().getAgentValidationResultSettings(); } + /** Returns the builder for the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings.Builder + getGenerativeSettingsSettings() { + return getStubSettingsBuilder().getGenerativeSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings.Builder + updateGenerativeSettingsSettings() { + return getStubSettingsBuilder().updateGenerativeSettingsSettings(); + } + /** 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/FlowsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index c15d83086f52..2bbb81fa1697 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -1240,6 +1240,7 @@ public final FlowValidationResult getFlowValidationResult( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * ImportFlowResponse response = flowsClient.importFlowAsync(request).get(); * } @@ -1280,6 +1281,7 @@ public final OperationFuture importFlowAsync( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * OperationFuture future = * flowsClient.importFlowOperationCallable().futureCall(request); @@ -1320,6 +1322,7 @@ public final OperationFuture importFlowAsync( * ImportFlowRequest request = * ImportFlowRequest.newBuilder() * .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + * .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) * .build(); * ApiFuture future = flowsClient.importFlowCallable().futureCall(request); * // Do something. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java index ccf15d18d73d..1a391cfa9cfa 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java @@ -56,7 +56,7 @@ * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } @@ -187,6 +187,42 @@ public TransitionRouteGroupsStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all transition route groups in the specified flow. + * + *

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 (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The flow to list all transition route groups for. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(AgentName parent) { + ListTransitionRouteGroupsRequest request = + ListTransitionRouteGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransitionRouteGroups(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the list of all transition route groups in the specified flow. @@ -211,7 +247,8 @@ public TransitionRouteGroupsStub getStub() { * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(FlowName parent) { @@ -246,7 +283,8 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(Fl * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(String parent) { @@ -385,7 +423,7 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } @@ -394,7 +432,9 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupName name) { @@ -421,7 +461,7 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * String name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") * .toString(); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); @@ -431,7 +471,9 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TransitionRouteGroup getTransitionRouteGroup(String name) { @@ -458,7 +500,7 @@ public final TransitionRouteGroup getTransitionRouteGroup(String name) { * GetTransitionRouteGroupRequest request = * GetTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -497,7 +539,7 @@ public final TransitionRouteGroup getTransitionRouteGroup( * GetTransitionRouteGroupRequest request = * GetTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -518,6 +560,49 @@ public final TransitionRouteGroup getTransitionRouteGroup( return stub.getTransitionRouteGroupCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in + * the specified flow. + * + *

Note: You should always train a flow prior to sending it queries. See the [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + *

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 (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * + * @param parent Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. + * @param transitionRouteGroup Required. The transition route group to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransitionRouteGroup createTransitionRouteGroup( + AgentName parent, TransitionRouteGroup transitionRouteGroup) { + CreateTransitionRouteGroupRequest request = + CreateTransitionRouteGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + return createTransitionRouteGroup(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in @@ -546,7 +631,8 @@ public final TransitionRouteGroup getTransitionRouteGroup( * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. * @param transitionRouteGroup Required. The transition route group to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -588,7 +674,8 @@ public final TransitionRouteGroup createTransitionRouteGroup( * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>` for agent-level groups. * @param transitionRouteGroup Required. The transition route group to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -806,7 +893,7 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * transitionRouteGroupsClient.deleteTransitionRouteGroup(name); * } @@ -815,7 +902,9 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { @@ -845,7 +934,7 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * String name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") * .toString(); * transitionRouteGroupsClient.deleteTransitionRouteGroup(name); @@ -855,7 +944,9 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTransitionRouteGroup(String name) { @@ -885,7 +976,7 @@ public final void deleteTransitionRouteGroup(String name) { * DeleteTransitionRouteGroupRequest request = * DeleteTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", @@ -926,7 +1017,7 @@ public final void deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest r * DeleteTransitionRouteGroupRequest request = * DeleteTransitionRouteGroupRequest.newBuilder() * .setName( - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", * "[LOCATION]", * "[AGENT]", 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 6783b4a44bf4..1fd61ab833b7 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 @@ -25,6 +25,9 @@ "GetAgentValidationResult": { "methods": ["getAgentValidationResult", "getAgentValidationResult", "getAgentValidationResult", "getAgentValidationResultCallable"] }, + "GetGenerativeSettings": { + "methods": ["getGenerativeSettings", "getGenerativeSettings", "getGenerativeSettings", "getGenerativeSettingsCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, @@ -40,6 +43,9 @@ "UpdateAgent": { "methods": ["updateAgent", "updateAgent", "updateAgentCallable"] }, + "UpdateGenerativeSettings": { + "methods": ["updateGenerativeSettings", "updateGenerativeSettings", "updateGenerativeSettingsCallable"] + }, "ValidateAgent": { "methods": ["validateAgent", "validateAgentCallable"] } @@ -446,7 +452,7 @@ "libraryClient": "TransitionRouteGroupsClient", "rpcs": { "CreateTransitionRouteGroup": { - "methods": ["createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroupCallable"] + "methods": ["createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroup", "createTransitionRouteGroupCallable"] }, "DeleteTransitionRouteGroup": { "methods": ["deleteTransitionRouteGroup", "deleteTransitionRouteGroup", "deleteTransitionRouteGroup", "deleteTransitionRouteGroupCallable"] @@ -461,7 +467,7 @@ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, "ListTransitionRouteGroups": { - "methods": ["listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroupsPagedCallable", "listTransitionRouteGroupsCallable"] + "methods": ["listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroups", "listTransitionRouteGroupsPagedCallable", "listTransitionRouteGroupsCallable"] }, "UpdateTransitionRouteGroup": { "methods": ["updateTransitionRouteGroup", "updateTransitionRouteGroup", "updateTransitionRouteGroupCallable"] diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java index 3bd091a272bc..07fd33d204b9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java @@ -299,7 +299,7 @@ * try (TransitionRouteGroupsClient transitionRouteGroupsClient = * TransitionRouteGroupsClient.create()) { * TransitionRouteGroupName name = - * TransitionRouteGroupName.of( + * TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( * "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); * TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); * } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java index 7f30b548d3f2..8c180825a8bd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java @@ -29,12 +29,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -114,6 +117,16 @@ public UnaryCallable validateAgentC throw new UnsupportedOperationException("Not implemented: getAgentValidationResultCallable()"); } + public UnaryCallable + getGenerativeSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getGenerativeSettingsCallable()"); + } + + public UnaryCallable + updateGenerativeSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: updateGenerativeSettingsCallable()"); + } + 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/AgentsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java index 4e3fac69db98..b32d8e60fa9b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java @@ -54,12 +54,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -139,6 +142,10 @@ public class AgentsStubSettings extends StubSettings { validateAgentSettings; private final UnaryCallSettings getAgentValidationResultSettings; + private final UnaryCallSettings + getGenerativeSettingsSettings; + private final UnaryCallSettings + updateGenerativeSettingsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -308,6 +315,18 @@ public UnaryCallSettings validateAg return getAgentValidationResultSettings; } + /** Returns the object with the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings + getGenerativeSettingsSettings() { + return getGenerativeSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings + updateGenerativeSettingsSettings() { + return updateGenerativeSettingsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -434,6 +453,8 @@ protected AgentsStubSettings(Builder settingsBuilder) throws IOException { restoreAgentOperationSettings = settingsBuilder.restoreAgentOperationSettings().build(); validateAgentSettings = settingsBuilder.validateAgentSettings().build(); getAgentValidationResultSettings = settingsBuilder.getAgentValidationResultSettings().build(); + getGenerativeSettingsSettings = settingsBuilder.getGenerativeSettingsSettings().build(); + updateGenerativeSettingsSettings = settingsBuilder.updateGenerativeSettingsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -458,6 +479,10 @@ public static class Builder extends StubSettings.Builder getAgentValidationResultSettings; + private final UnaryCallSettings.Builder + getGenerativeSettingsSettings; + private final UnaryCallSettings.Builder + updateGenerativeSettingsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -525,6 +550,8 @@ protected Builder(ClientContext clientContext) { restoreAgentOperationSettings = OperationCallSettings.newBuilder(); validateAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getAgentValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getGenerativeSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGenerativeSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -539,6 +566,8 @@ protected Builder(ClientContext clientContext) { restoreAgentSettings, validateAgentSettings, getAgentValidationResultSettings, + getGenerativeSettingsSettings, + updateGenerativeSettingsSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -558,6 +587,8 @@ protected Builder(AgentsStubSettings settings) { restoreAgentOperationSettings = settings.restoreAgentOperationSettings.toBuilder(); validateAgentSettings = settings.validateAgentSettings.toBuilder(); getAgentValidationResultSettings = settings.getAgentValidationResultSettings.toBuilder(); + getGenerativeSettingsSettings = settings.getGenerativeSettingsSettings.toBuilder(); + updateGenerativeSettingsSettings = settings.updateGenerativeSettingsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -572,6 +603,8 @@ protected Builder(AgentsStubSettings settings) { restoreAgentSettings, validateAgentSettings, getAgentValidationResultSettings, + getGenerativeSettingsSettings, + updateGenerativeSettingsSettings, listLocationsSettings, getLocationSettings); } @@ -648,6 +681,16 @@ 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 + .getGenerativeSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateGenerativeSettingsSettings() + .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")) @@ -787,6 +830,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getAgentValidationResultSettings; } + /** Returns the builder for the settings used for calls to getGenerativeSettings. */ + public UnaryCallSettings.Builder + getGenerativeSettingsSettings() { + return getGenerativeSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateGenerativeSettings. */ + public UnaryCallSettings.Builder + updateGenerativeSettingsSettings() { + return updateGenerativeSettingsSettings; + } + /** 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/GrpcAgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java index 236949e27569..5b9d26756f0c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java @@ -34,12 +34,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -145,6 +148,27 @@ public class GrpcAgentsStub extends AgentsStub { ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) .build(); + private static final MethodDescriptor + getGenerativeSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Agents/GetGenerativeSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(GetGenerativeSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GenerativeSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateGenerativeSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Agents/UpdateGenerativeSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateGenerativeSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GenerativeSettings.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -178,6 +202,10 @@ public class GrpcAgentsStub extends AgentsStub { private final UnaryCallable validateAgentCallable; private final UnaryCallable getAgentValidationResultCallable; + private final UnaryCallable + getGenerativeSettingsCallable; + private final UnaryCallable + updateGenerativeSettingsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -313,6 +341,30 @@ protected GrpcAgentsStub( return builder.build(); }) .build(); + GrpcCallSettings + getGenerativeSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGenerativeSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateGenerativeSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "generative_settings.name", + String.valueOf(request.getGenerativeSettings().getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -378,6 +430,16 @@ protected GrpcAgentsStub( getAgentValidationResultTransportSettings, settings.getAgentValidationResultSettings(), clientContext); + this.getGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + getGenerativeSettingsTransportSettings, + settings.getGenerativeSettingsSettings(), + clientContext); + this.updateGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + updateGenerativeSettingsTransportSettings, + settings.updateGenerativeSettingsSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -458,6 +520,18 @@ public UnaryCallable validateAgentC return getAgentValidationResultCallable; } + @Override + public UnaryCallable + getGenerativeSettingsCallable() { + return getGenerativeSettingsCallable; + } + + @Override + public UnaryCallable + updateGenerativeSettingsCallable() { + return updateGenerativeSettingsCallable; + } + @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/HttpJsonAgentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonAgentsStub.java index c134b6900649..50c6af651df2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonAgentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonAgentsStub.java @@ -42,12 +42,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -409,6 +412,85 @@ public class HttpJsonAgentsStub extends AgentsStub { .build()) .build(); + private static final ApiMethodDescriptor + getGenerativeSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Agents/GetGenerativeSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/generativeSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerativeSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateGenerativeSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Agents/UpdateGenerativeSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{generativeSettings.name=projects/*/locations/*/agents/*/generativeSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "generativeSettings.name", + request.getGenerativeSettings().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "generativeSettings", request.getGenerativeSettings(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerativeSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -491,6 +573,10 @@ public class HttpJsonAgentsStub extends AgentsStub { private final UnaryCallable validateAgentCallable; private final UnaryCallable getAgentValidationResultCallable; + private final UnaryCallable + getGenerativeSettingsCallable; + private final UnaryCallable + updateGenerativeSettingsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -673,6 +759,32 @@ protected HttpJsonAgentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getGenerativeSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getGenerativeSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateGenerativeSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "generative_settings.name", + String.valueOf(request.getGenerativeSettings().getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -741,6 +853,16 @@ protected HttpJsonAgentsStub( getAgentValidationResultTransportSettings, settings.getAgentValidationResultSettings(), clientContext); + this.getGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + getGenerativeSettingsTransportSettings, + settings.getGenerativeSettingsSettings(), + clientContext); + this.updateGenerativeSettingsCallable = + callableFactory.createUnaryCallable( + updateGenerativeSettingsTransportSettings, + settings.updateGenerativeSettingsSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -767,6 +889,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(restoreAgentMethodDescriptor); methodDescriptors.add(validateAgentMethodDescriptor); methodDescriptors.add(getAgentValidationResultMethodDescriptor); + methodDescriptors.add(getGenerativeSettingsMethodDescriptor); + methodDescriptors.add(updateGenerativeSettingsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -838,6 +962,18 @@ public UnaryCallable validateAgentC return getAgentValidationResultCallable; } + @Override + public UnaryCallable + getGenerativeSettingsCallable() { + return getGenerativeSettingsCallable; + } + + @Override + public UnaryCallable + updateGenerativeSettingsCallable() { + return updateGenerativeSettingsCallable; + } + @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/HttpJsonTransitionRouteGroupsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonTransitionRouteGroupsStub.java index b0c479538a33..76271a15621f 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonTransitionRouteGroupsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonTransitionRouteGroupsStub.java @@ -84,6 +84,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -123,6 +125,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths( + "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -160,6 +164,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -206,6 +212,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub request.getTransitionRouteGroup().getName()); return fields; }) + .setAdditionalPaths( + "/v3beta1/{transitionRouteGroup.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -250,6 +258,8 @@ public class HttpJsonTransitionRouteGroupsStub extends TransitionRouteGroupsStub serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths( + "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); 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 9de4e3b3b892..98f05288e977 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 @@ -431,6 +431,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Agent$GenAppBuilderSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Agent$GenAppBuilderSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.Agent$GitIntegrationSettings", "queryAllDeclaredConstructors": true, @@ -1034,6 +1052,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DataStoreConnection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DataStoreConnection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DataStoreType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest", "queryAllDeclaredConstructors": true, @@ -1907,6 +1952,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowImportStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowImportStrategy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.FlowValidationResult", "queryAllDeclaredConstructors": true, @@ -2123,6 +2186,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$FallbackSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$FallbackSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$FallbackSettings$PromptTemplate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$FallbackSettings$PromptTemplate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$KnowledgeConnectorSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GenerativeSettings$KnowledgeConnectorSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.GetAgentRequest", "queryAllDeclaredConstructors": true, @@ -2285,6 +2420,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.GetIntentRequest", "queryAllDeclaredConstructors": true, @@ -2492,6 +2645,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata", "queryAllDeclaredConstructors": true, @@ -2699,6 +2861,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsRequest", "queryAllDeclaredConstructors": true, @@ -3707,6 +3887,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$LiveAgentHandoff", "queryAllDeclaredConstructors": true, @@ -3797,6 +3995,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ResponseType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$TelephonyTransferCall", "queryAllDeclaredConstructors": true, @@ -4040,6 +4247,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings", "queryAllDeclaredConstructors": true, @@ -4130,6 +4373,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RetentionStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult", "queryAllDeclaredConstructors": true, @@ -4778,6 +5030,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest", "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 847f91f6b948..07772ec3cb11 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 @@ -431,6 +431,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$GenAppBuilderSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$GenAppBuilderSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.Agent$GitIntegrationSettings", "queryAllDeclaredConstructors": true, @@ -1034,6 +1052,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DataStoreType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest", "queryAllDeclaredConstructors": true, @@ -1907,6 +1952,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult", "queryAllDeclaredConstructors": true, @@ -2123,6 +2186,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$FallbackSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$FallbackSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$FallbackSettings$PromptTemplate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$FallbackSettings$PromptTemplate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$KnowledgeConnectorSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings$KnowledgeConnectorSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest", "queryAllDeclaredConstructors": true, @@ -2285,6 +2420,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest", "queryAllDeclaredConstructors": true, @@ -2492,6 +2645,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata", "queryAllDeclaredConstructors": true, @@ -2699,6 +2861,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest", "queryAllDeclaredConstructors": true, @@ -3707,6 +3887,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$LiveAgentHandoff", "queryAllDeclaredConstructors": true, @@ -4040,6 +4238,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings", "queryAllDeclaredConstructors": true, @@ -4130,6 +4364,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RetentionStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult", "queryAllDeclaredConstructors": true, @@ -4778,6 +5021,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest", "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 5da6cfe7ab59..21b124e79f97 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 @@ -208,6 +208,7 @@ public void getAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +270,7 @@ public void getAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -330,6 +332,7 @@ public void createAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -393,6 +396,7 @@ public void createAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -456,6 +460,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -479,6 +484,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -528,6 +534,7 @@ public void updateAgentExceptionTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateAgent(agent, updateMask); @@ -879,6 +886,185 @@ public void getAgentValidationResultExceptionTest2() throws Exception { } } + @Test + public void getGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + 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 getGenerativeSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGenerativeSettingsTest2() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2948/locations/location-2948/agents/agent-2948/generativeSettings"; + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + 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 getGenerativeSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2948/locations/location-2948/agents/agent-2948/generativeSettings"; + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + GenerativeSettings generativeSettings = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GenerativeSettings actualResponse = + client.updateGenerativeSettings(generativeSettings, updateMask); + 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 updateGenerativeSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GenerativeSettings generativeSettings = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGenerativeSettings(generativeSettings, updateMask); + 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/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index 8101e494cbb2..8195d49240af 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 @@ -204,6 +204,7 @@ public void getAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -259,6 +260,7 @@ public void getAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -314,6 +316,7 @@ public void createAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -372,6 +375,7 @@ public void createAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -430,6 +434,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -784,6 +789,153 @@ public void getAgentValidationResultExceptionTest2() throws Exception { } } + @Test + public void getGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGenerativeSettingsRequest actualRequest = + ((GetGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGenerativeSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGenerativeSettingsTest2() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + String name = "name3373707"; + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGenerativeSettingsRequest actualRequest = + ((GetGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGenerativeSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + String name = "name3373707"; + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GenerativeSettings actualResponse = + client.updateGenerativeSettings(generativeSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGenerativeSettingsRequest actualRequest = + ((UpdateGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(generativeSettings, actualRequest.getGenerativeSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGenerativeSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGenerativeSettings(generativeSettings, updateMask); + 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/FlowsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java index b92638100b38..a8ad6ffb096b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java @@ -98,6 +98,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -150,6 +151,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -383,6 +385,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -433,6 +436,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -484,6 +488,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -496,6 +501,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -534,6 +540,7 @@ public void updateFlowExceptionTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateFlow(flow, updateMask); @@ -807,6 +814,7 @@ public void importFlowTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse actualResponse = client.importFlowAsync(request).get(); @@ -838,6 +846,7 @@ public void importFlowExceptionTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); client.importFlowAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java index d3d4e8d03edb..193501e42d3a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java @@ -105,6 +105,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -152,6 +153,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -355,6 +357,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -399,6 +402,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -443,6 +447,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -719,6 +724,7 @@ public void importFlowTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse actualResponse = client.importFlowAsync(request).get(); @@ -732,6 +738,7 @@ public void importFlowTest() throws Exception { Assert.assertEquals(request.getFlowUri(), actualRequest.getFlowUri()); Assert.assertEquals(request.getFlowContent(), actualRequest.getFlowContent()); Assert.assertEquals(request.getImportOption(), actualRequest.getImportOption()); + Assert.assertEquals(request.getFlowImportStrategy(), actualRequest.getFlowImportStrategy()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -747,6 +754,7 @@ public void importFlowExceptionTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); client.importFlowAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java index 722cb706437c..5caed9c7292d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java @@ -244,4 +244,47 @@ public void getAgentValidationResult( Exception.class.getName()))); } } + + @Override + public void getGenerativeSettings( + GetGenerativeSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerativeSettings) { + requests.add(request); + responseObserver.onNext(((GenerativeSettings) 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 GetGenerativeSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerativeSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGenerativeSettings( + UpdateGenerativeSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerativeSettings) { + requests.add(request); + responseObserver.onNext(((GenerativeSettings) 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 UpdateGenerativeSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerativeSettings.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java index ab869089488b..343c100bee77 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java @@ -198,6 +198,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -249,6 +250,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -302,6 +304,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -355,6 +358,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -410,6 +414,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -423,6 +428,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -462,6 +468,7 @@ public void updatePageExceptionTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updatePage(page, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java index 80472316921b..45471681f810 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java @@ -190,6 +190,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -235,6 +236,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -280,6 +282,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -328,6 +331,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -376,6 +380,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientHttpJsonTest.java index 302422da94da..fb687fed07a0 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientHttpJsonTest.java @@ -95,7 +95,7 @@ public void listTransitionRouteGroupsTest() throws Exception { .build(); mockService.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); ListTransitionRouteGroupsPagedResponse pagedListResponse = client.listTransitionRouteGroups(parent); @@ -128,7 +128,7 @@ public void listTransitionRouteGroupsExceptionTest() throws Exception { mockService.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); client.listTransitionRouteGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -146,6 +146,57 @@ public void listTransitionRouteGroupsTest2() throws Exception { .build(); mockService.addResponse(expectedResponse); + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + ListTransitionRouteGroupsPagedResponse pagedListResponse = + client.listTransitionRouteGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransitionRouteGroupsList().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 listTransitionRouteGroupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.listTransitionRouteGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransitionRouteGroupsTest3() throws Exception { + TransitionRouteGroup responsesElement = TransitionRouteGroup.newBuilder().build(); + ListTransitionRouteGroupsResponse expectedResponse = + ListTransitionRouteGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllTransitionRouteGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + String parent = "projects/project-7760/locations/location-7760/agents/agent-7760/flows/flow-7760"; @@ -173,7 +224,7 @@ public void listTransitionRouteGroupsTest2() throws Exception { } @Test - public void listTransitionRouteGroupsExceptionTest2() throws Exception { + public void listTransitionRouteGroupsExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -194,7 +245,7 @@ public void getTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -203,7 +254,7 @@ public void getTransitionRouteGroupTest() throws Exception { mockService.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup actualResponse = client.getTransitionRouteGroup(name); @@ -233,7 +284,7 @@ public void getTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.getTransitionRouteGroup(name); Assert.fail("No exception raised"); @@ -247,7 +298,7 @@ public void getTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -298,7 +349,7 @@ public void createTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -306,7 +357,7 @@ public void createTransitionRouteGroupTest() throws Exception { .build(); mockService.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); TransitionRouteGroup actualResponse = @@ -336,7 +387,7 @@ public void createTransitionRouteGroupExceptionTest() throws Exception { mockService.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); client.createTransitionRouteGroup(parent, transitionRouteGroup); Assert.fail("No exception raised"); @@ -350,7 +401,59 @@ public void createTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllTransitionRoutes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + + TransitionRouteGroup actualResponse = + client.createTransitionRouteGroup(parent, transitionRouteGroup); + 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 createTransitionRouteGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransitionRouteGroupTest3() throws Exception { + TransitionRouteGroup expectedResponse = + TransitionRouteGroup.newBuilder() + .setName( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -382,7 +485,7 @@ public void createTransitionRouteGroupTest2() throws Exception { } @Test - public void createTransitionRouteGroupExceptionTest2() throws Exception { + public void createTransitionRouteGroupExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -404,7 +507,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -415,7 +518,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -453,7 +556,7 @@ public void updateTransitionRouteGroupExceptionTest() throws Exception { TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", @@ -477,7 +580,7 @@ public void deleteTransitionRouteGroupTest() throws Exception { mockService.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); @@ -506,7 +609,7 @@ public void deleteTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java index 286272916693..47178e449ce2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java @@ -101,7 +101,7 @@ public void listTransitionRouteGroupsTest() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); ListTransitionRouteGroupsPagedResponse pagedListResponse = client.listTransitionRouteGroups(parent); @@ -129,7 +129,7 @@ public void listTransitionRouteGroupsExceptionTest() throws Exception { mockTransitionRouteGroups.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); client.listTransitionRouteGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -147,6 +147,52 @@ public void listTransitionRouteGroupsTest2() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + ListTransitionRouteGroupsPagedResponse pagedListResponse = + client.listTransitionRouteGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransitionRouteGroupsList().get(0), resources.get(0)); + + List actualRequests = mockTransitionRouteGroups.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransitionRouteGroupsRequest actualRequest = + ((ListTransitionRouteGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransitionRouteGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransitionRouteGroups.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.listTransitionRouteGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransitionRouteGroupsTest3() throws Exception { + TransitionRouteGroup responsesElement = TransitionRouteGroup.newBuilder().build(); + ListTransitionRouteGroupsResponse expectedResponse = + ListTransitionRouteGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllTransitionRouteGroups(Arrays.asList(responsesElement)) + .build(); + mockTransitionRouteGroups.addResponse(expectedResponse); + String parent = "parent-995424086"; ListTransitionRouteGroupsPagedResponse pagedListResponse = @@ -170,7 +216,7 @@ public void listTransitionRouteGroupsTest2() throws Exception { } @Test - public void listTransitionRouteGroupsExceptionTest2() throws Exception { + public void listTransitionRouteGroupsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockTransitionRouteGroups.addException(exception); @@ -188,7 +234,7 @@ public void getTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -197,7 +243,7 @@ public void getTransitionRouteGroupTest() throws Exception { mockTransitionRouteGroups.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup actualResponse = client.getTransitionRouteGroup(name); @@ -222,7 +268,7 @@ public void getTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.getTransitionRouteGroup(name); Assert.fail("No exception raised"); @@ -236,7 +282,7 @@ public void getTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -280,7 +326,7 @@ public void createTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -288,7 +334,7 @@ public void createTransitionRouteGroupTest() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); TransitionRouteGroup actualResponse = @@ -314,7 +360,7 @@ public void createTransitionRouteGroupExceptionTest() throws Exception { mockTransitionRouteGroups.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); client.createTransitionRouteGroup(parent, transitionRouteGroup); Assert.fail("No exception raised"); @@ -328,7 +374,55 @@ public void createTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllTransitionRoutes(new ArrayList()) + .build(); + mockTransitionRouteGroups.addResponse(expectedResponse); + + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + + TransitionRouteGroup actualResponse = + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransitionRouteGroups.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTransitionRouteGroupRequest actualRequest = + ((CreateTransitionRouteGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(transitionRouteGroup, actualRequest.getTransitionRouteGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTransitionRouteGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransitionRouteGroups.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransitionRouteGroupTest3() throws Exception { + TransitionRouteGroup expectedResponse = + TransitionRouteGroup.newBuilder() + .setName( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -357,7 +451,7 @@ public void createTransitionRouteGroupTest2() throws Exception { } @Test - public void createTransitionRouteGroupExceptionTest2() throws Exception { + public void createTransitionRouteGroupExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockTransitionRouteGroups.addException(exception); @@ -376,7 +470,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -425,7 +519,7 @@ public void deleteTransitionRouteGroupTest() throws Exception { mockTransitionRouteGroups.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); @@ -449,7 +543,7 @@ public void deleteTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); Assert.fail("No exception raised"); 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 fb7173d37fad..3a5c85d845ea 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 @@ -208,6 +208,7 @@ public void getAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +270,7 @@ public void getAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -330,6 +332,7 @@ public void createAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -393,6 +396,7 @@ public void createAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -456,6 +460,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -479,6 +484,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -528,6 +534,7 @@ public void updateAgentExceptionTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateAgent(agent, updateMask); @@ -879,6 +886,185 @@ public void getAgentValidationResultExceptionTest2() throws Exception { } } + @Test + public void getGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + 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 getGenerativeSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGenerativeSettingsTest2() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2948/locations/location-2948/agents/agent-2948/generativeSettings"; + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + 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 getGenerativeSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2948/locations/location-2948/agents/agent-2948/generativeSettings"; + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + GenerativeSettings generativeSettings = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GenerativeSettings actualResponse = + client.updateGenerativeSettings(generativeSettings, updateMask); + 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 updateGenerativeSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GenerativeSettings generativeSettings = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGenerativeSettings(generativeSettings, updateMask); + 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/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index 4086acbc4bbe..14dc52d5451d 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 @@ -204,6 +204,7 @@ public void getAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -259,6 +260,7 @@ public void getAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -314,6 +316,7 @@ public void createAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -372,6 +375,7 @@ public void createAgentTest2() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -430,6 +434,7 @@ public void updateAgentTest() throws Exception { .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build()) .setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build()) + .setGenAppBuilderSettings(Agent.GenAppBuilderSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -784,6 +789,153 @@ public void getAgentValidationResultExceptionTest2() throws Exception { } } + @Test + public void getGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGenerativeSettingsRequest actualRequest = + ((GetGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGenerativeSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGenerativeSettingsTest2() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + String name = "name3373707"; + String languageCode = "languageCode-2092349083"; + + GenerativeSettings actualResponse = client.getGenerativeSettings(name, languageCode); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGenerativeSettingsRequest actualRequest = + ((GetGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGenerativeSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + String name = "name3373707"; + String languageCode = "languageCode-2092349083"; + client.getGenerativeSettings(name, languageCode); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGenerativeSettingsTest() throws Exception { + GenerativeSettings expectedResponse = + GenerativeSettings.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFallbackSettings(GenerativeSettings.FallbackSettings.newBuilder().build()) + .setGenerativeSafetySettings(SafetySettings.newBuilder().build()) + .setKnowledgeConnectorSettings( + GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .build(); + mockAgents.addResponse(expectedResponse); + + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GenerativeSettings actualResponse = + client.updateGenerativeSettings(generativeSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGenerativeSettingsRequest actualRequest = + ((UpdateGenerativeSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(generativeSettings, actualRequest.getGenerativeSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGenerativeSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGenerativeSettings(generativeSettings, updateMask); + 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/FlowsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java index 640f24997bee..5a14e590453a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java @@ -98,6 +98,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -150,6 +151,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -383,6 +385,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -433,6 +436,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -484,6 +488,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -496,6 +501,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -534,6 +540,7 @@ public void updateFlowExceptionTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateFlow(flow, updateMask); @@ -807,6 +814,7 @@ public void importFlowTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse actualResponse = client.importFlowAsync(request).get(); @@ -838,6 +846,7 @@ public void importFlowExceptionTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); client.importFlowAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java index bb8f5223a7e3..a10934f64433 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java @@ -105,6 +105,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -152,6 +153,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -355,6 +357,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -399,6 +402,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -443,6 +447,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -719,6 +724,7 @@ public void importFlowTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse actualResponse = client.importFlowAsync(request).get(); @@ -732,6 +738,7 @@ public void importFlowTest() throws Exception { Assert.assertEquals(request.getFlowUri(), actualRequest.getFlowUri()); Assert.assertEquals(request.getFlowContent(), actualRequest.getFlowContent()); Assert.assertEquals(request.getImportOption(), actualRequest.getImportOption()); + Assert.assertEquals(request.getFlowImportStrategy(), actualRequest.getFlowImportStrategy()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -747,6 +754,7 @@ public void importFlowExceptionTest() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); client.importFlowAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java index fa067d6cde22..8ad362155e09 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java @@ -244,4 +244,47 @@ public void getAgentValidationResult( Exception.class.getName()))); } } + + @Override + public void getGenerativeSettings( + GetGenerativeSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerativeSettings) { + requests.add(request); + responseObserver.onNext(((GenerativeSettings) 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 GetGenerativeSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerativeSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGenerativeSettings( + UpdateGenerativeSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerativeSettings) { + requests.add(request); + responseObserver.onNext(((GenerativeSettings) 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 UpdateGenerativeSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerativeSettings.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java index c2fa415e411b..d2cb4e5aeb5a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java @@ -198,6 +198,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -249,6 +250,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -302,6 +304,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -355,6 +358,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -410,6 +414,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -423,6 +428,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -462,6 +468,7 @@ public void updatePageExceptionTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updatePage(page, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java index 0d30fe8e4ef4..b8ab3154d04f 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java @@ -190,6 +190,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -235,6 +236,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -280,6 +282,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -328,6 +331,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -376,6 +380,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientHttpJsonTest.java index 70e354b575e0..ab5263b800b9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientHttpJsonTest.java @@ -95,7 +95,7 @@ public void listTransitionRouteGroupsTest() throws Exception { .build(); mockService.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); ListTransitionRouteGroupsPagedResponse pagedListResponse = client.listTransitionRouteGroups(parent); @@ -128,7 +128,7 @@ public void listTransitionRouteGroupsExceptionTest() throws Exception { mockService.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); client.listTransitionRouteGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -146,6 +146,57 @@ public void listTransitionRouteGroupsTest2() throws Exception { .build(); mockService.addResponse(expectedResponse); + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + ListTransitionRouteGroupsPagedResponse pagedListResponse = + client.listTransitionRouteGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransitionRouteGroupsList().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 listTransitionRouteGroupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.listTransitionRouteGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransitionRouteGroupsTest3() throws Exception { + TransitionRouteGroup responsesElement = TransitionRouteGroup.newBuilder().build(); + ListTransitionRouteGroupsResponse expectedResponse = + ListTransitionRouteGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllTransitionRouteGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + String parent = "projects/project-7760/locations/location-7760/agents/agent-7760/flows/flow-7760"; @@ -173,7 +224,7 @@ public void listTransitionRouteGroupsTest2() throws Exception { } @Test - public void listTransitionRouteGroupsExceptionTest2() throws Exception { + public void listTransitionRouteGroupsExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -194,7 +245,7 @@ public void getTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -203,7 +254,7 @@ public void getTransitionRouteGroupTest() throws Exception { mockService.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup actualResponse = client.getTransitionRouteGroup(name); @@ -233,7 +284,7 @@ public void getTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.getTransitionRouteGroup(name); Assert.fail("No exception raised"); @@ -247,7 +298,7 @@ public void getTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -298,7 +349,7 @@ public void createTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -306,7 +357,7 @@ public void createTransitionRouteGroupTest() throws Exception { .build(); mockService.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); TransitionRouteGroup actualResponse = @@ -336,7 +387,7 @@ public void createTransitionRouteGroupExceptionTest() throws Exception { mockService.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); client.createTransitionRouteGroup(parent, transitionRouteGroup); Assert.fail("No exception raised"); @@ -350,7 +401,59 @@ public void createTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllTransitionRoutes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + + TransitionRouteGroup actualResponse = + client.createTransitionRouteGroup(parent, transitionRouteGroup); + 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 createTransitionRouteGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransitionRouteGroupTest3() throws Exception { + TransitionRouteGroup expectedResponse = + TransitionRouteGroup.newBuilder() + .setName( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -382,7 +485,7 @@ public void createTransitionRouteGroupTest2() throws Exception { } @Test - public void createTransitionRouteGroupExceptionTest2() throws Exception { + public void createTransitionRouteGroupExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -404,7 +507,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -415,7 +518,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -453,7 +556,7 @@ public void updateTransitionRouteGroupExceptionTest() throws Exception { TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", @@ -477,7 +580,7 @@ public void deleteTransitionRouteGroupTest() throws Exception { mockService.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); @@ -506,7 +609,7 @@ public void deleteTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java index c1b766133d52..d16dc4f87c34 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java @@ -101,7 +101,7 @@ public void listTransitionRouteGroupsTest() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); ListTransitionRouteGroupsPagedResponse pagedListResponse = client.listTransitionRouteGroups(parent); @@ -129,7 +129,7 @@ public void listTransitionRouteGroupsExceptionTest() throws Exception { mockTransitionRouteGroups.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); client.listTransitionRouteGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -147,6 +147,52 @@ public void listTransitionRouteGroupsTest2() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + ListTransitionRouteGroupsPagedResponse pagedListResponse = + client.listTransitionRouteGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransitionRouteGroupsList().get(0), resources.get(0)); + + List actualRequests = mockTransitionRouteGroups.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransitionRouteGroupsRequest actualRequest = + ((ListTransitionRouteGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransitionRouteGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransitionRouteGroups.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.listTransitionRouteGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransitionRouteGroupsTest3() throws Exception { + TransitionRouteGroup responsesElement = TransitionRouteGroup.newBuilder().build(); + ListTransitionRouteGroupsResponse expectedResponse = + ListTransitionRouteGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllTransitionRouteGroups(Arrays.asList(responsesElement)) + .build(); + mockTransitionRouteGroups.addResponse(expectedResponse); + String parent = "parent-995424086"; ListTransitionRouteGroupsPagedResponse pagedListResponse = @@ -170,7 +216,7 @@ public void listTransitionRouteGroupsTest2() throws Exception { } @Test - public void listTransitionRouteGroupsExceptionTest2() throws Exception { + public void listTransitionRouteGroupsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockTransitionRouteGroups.addException(exception); @@ -188,7 +234,7 @@ public void getTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -197,7 +243,7 @@ public void getTransitionRouteGroupTest() throws Exception { mockTransitionRouteGroups.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup actualResponse = client.getTransitionRouteGroup(name); @@ -222,7 +268,7 @@ public void getTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.getTransitionRouteGroup(name); Assert.fail("No exception raised"); @@ -236,7 +282,7 @@ public void getTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -280,7 +326,7 @@ public void createTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -288,7 +334,7 @@ public void createTransitionRouteGroupTest() throws Exception { .build(); mockTransitionRouteGroups.addResponse(expectedResponse); - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); TransitionRouteGroup actualResponse = @@ -314,7 +360,7 @@ public void createTransitionRouteGroupExceptionTest() throws Exception { mockTransitionRouteGroups.addException(exception); try { - FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); client.createTransitionRouteGroup(parent, transitionRouteGroup); Assert.fail("No exception raised"); @@ -328,7 +374,55 @@ public void createTransitionRouteGroupTest2() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllTransitionRoutes(new ArrayList()) + .build(); + mockTransitionRouteGroups.addResponse(expectedResponse); + + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + + TransitionRouteGroup actualResponse = + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransitionRouteGroups.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTransitionRouteGroupRequest actualRequest = + ((CreateTransitionRouteGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(transitionRouteGroup, actualRequest.getTransitionRouteGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTransitionRouteGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransitionRouteGroups.addException(exception); + + try { + FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + client.createTransitionRouteGroup(parent, transitionRouteGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransitionRouteGroupTest3() throws Exception { + TransitionRouteGroup expectedResponse = + TransitionRouteGroup.newBuilder() + .setName( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -357,7 +451,7 @@ public void createTransitionRouteGroupTest2() throws Exception { } @Test - public void createTransitionRouteGroupExceptionTest2() throws Exception { + public void createTransitionRouteGroupExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockTransitionRouteGroups.addException(exception); @@ -376,7 +470,7 @@ public void updateTransitionRouteGroupTest() throws Exception { TransitionRouteGroup expectedResponse = TransitionRouteGroup.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString()) .setDisplayName("displayName1714148973") @@ -425,7 +519,7 @@ public void deleteTransitionRouteGroupTest() throws Exception { mockTransitionRouteGroups.addResponse(expectedResponse); TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); @@ -449,7 +543,7 @@ public void deleteTransitionRouteGroupExceptionTest() throws Exception { try { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); client.deleteTransitionRouteGroup(name); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java index 6a7190b0024f..508ee7d54ad0 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java @@ -438,6 +438,104 @@ private AgentsGrpc() {} return getGetAgentValidationResultMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getGetGenerativeSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGenerativeSettings", + requestType = com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.GenerativeSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getGetGenerativeSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getGetGenerativeSettingsMethod; + if ((getGetGenerativeSettingsMethod = AgentsGrpc.getGetGenerativeSettingsMethod) == null) { + synchronized (AgentsGrpc.class) { + if ((getGetGenerativeSettingsMethod = AgentsGrpc.getGetGenerativeSettingsMethod) == null) { + AgentsGrpc.getGetGenerativeSettingsMethod = + getGetGenerativeSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetGenerativeSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("GetGenerativeSettings")) + .build(); + } + } + } + return getGetGenerativeSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getUpdateGenerativeSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGenerativeSettings", + requestType = com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.GenerativeSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getUpdateGenerativeSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getUpdateGenerativeSettingsMethod; + if ((getUpdateGenerativeSettingsMethod = AgentsGrpc.getUpdateGenerativeSettingsMethod) + == null) { + synchronized (AgentsGrpc.class) { + if ((getUpdateGenerativeSettingsMethod = AgentsGrpc.getUpdateGenerativeSettingsMethod) + == null) { + AgentsGrpc.getUpdateGenerativeSettingsMethod = + getUpdateGenerativeSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateGenerativeSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("UpdateGenerativeSettings")) + .build(); + } + } + } + return getUpdateGenerativeSettingsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AgentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -641,6 +739,36 @@ default void getAgentValidationResult( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetAgentValidationResultMethod(), responseObserver); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + default void getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetGenerativeSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + default void updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGenerativeSettingsMethod(), responseObserver); + } } /** @@ -845,6 +973,40 @@ public void getAgentValidationResult( request, responseObserver); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public void getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGenerativeSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public void updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGenerativeSettingsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1009,6 +1171,32 @@ public com.google.cloud.dialogflow.cx.v3.AgentValidationResult getAgentValidatio return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAgentValidationResultMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGenerativeSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGenerativeSettingsMethod(), getCallOptions(), request); + } } /** @@ -1180,6 +1368,36 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGenerativeSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings> + updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGenerativeSettingsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_AGENTS = 0; @@ -1191,6 +1409,8 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca private static final int METHODID_RESTORE_AGENT = 6; private static final int METHODID_VALIDATE_AGENT = 7; private static final int METHODID_GET_AGENT_VALIDATION_RESULT = 8; + private static final int METHODID_GET_GENERATIVE_SETTINGS = 9; + private static final int METHODID_UPDATE_GENERATIVE_SETTINGS = 10; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1260,6 +1480,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_GENERATIVE_SETTINGS: + serviceImpl.getGenerativeSettings( + (com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_GENERATIVE_SETTINGS: + serviceImpl.updateGenerativeSettings( + (com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1335,6 +1567,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest, com.google.cloud.dialogflow.cx.v3.AgentValidationResult>( service, METHODID_GET_AGENT_VALIDATION_RESULT))) + .addMethod( + getGetGenerativeSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings>( + service, METHODID_GET_GENERATIVE_SETTINGS))) + .addMethod( + getUpdateGenerativeSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings>( + service, METHODID_UPDATE_GENERATIVE_SETTINGS))) .build(); } @@ -1393,6 +1639,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRestoreAgentMethod()) .addMethod(getValidateAgentMethod()) .addMethod(getGetAgentValidationResultMethod()) + .addMethod(getGetGenerativeSettingsMethod()) + .addMethod(getUpdateGenerativeSettingsMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java index 4f88053f5e73..5169ff2219a9 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java @@ -444,6 +444,104 @@ private AgentsGrpc() {} return getGetAgentValidationResultMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getGetGenerativeSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGenerativeSettings", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getGetGenerativeSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getGetGenerativeSettingsMethod; + if ((getGetGenerativeSettingsMethod = AgentsGrpc.getGetGenerativeSettingsMethod) == null) { + synchronized (AgentsGrpc.class) { + if ((getGetGenerativeSettingsMethod = AgentsGrpc.getGetGenerativeSettingsMethod) == null) { + AgentsGrpc.getGetGenerativeSettingsMethod = + getGetGenerativeSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetGenerativeSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("GetGenerativeSettings")) + .build(); + } + } + } + return getGetGenerativeSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getUpdateGenerativeSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGenerativeSettings", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getUpdateGenerativeSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getUpdateGenerativeSettingsMethod; + if ((getUpdateGenerativeSettingsMethod = AgentsGrpc.getUpdateGenerativeSettingsMethod) + == null) { + synchronized (AgentsGrpc.class) { + if ((getUpdateGenerativeSettingsMethod = AgentsGrpc.getUpdateGenerativeSettingsMethod) + == null) { + AgentsGrpc.getUpdateGenerativeSettingsMethod = + getUpdateGenerativeSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateGenerativeSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("UpdateGenerativeSettings")) + .build(); + } + } + } + return getUpdateGenerativeSettingsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AgentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -650,6 +748,36 @@ default void getAgentValidationResult( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetAgentValidationResultMethod(), responseObserver); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + default void getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetGenerativeSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + default void updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGenerativeSettingsMethod(), responseObserver); + } } /** @@ -857,6 +985,40 @@ public void getAgentValidationResult( request, responseObserver); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public void getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGenerativeSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public void updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGenerativeSettingsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1021,6 +1183,32 @@ public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult getAgentVali return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAgentValidationResultMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGenerativeSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGenerativeSettingsMethod(), getCallOptions(), request); + } } /** @@ -1192,6 +1380,36 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets the generative settings for the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + getGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGenerativeSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the generative settings for the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings> + updateGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGenerativeSettingsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_AGENTS = 0; @@ -1203,6 +1421,8 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca private static final int METHODID_RESTORE_AGENT = 6; private static final int METHODID_VALIDATE_AGENT = 7; private static final int METHODID_GET_AGENT_VALIDATION_RESULT = 8; + private static final int METHODID_GET_GENERATIVE_SETTINGS = 9; + private static final int METHODID_UPDATE_GENERATIVE_SETTINGS = 10; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1275,6 +1495,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>) responseObserver); break; + case METHODID_GET_GENERATIVE_SETTINGS: + serviceImpl.getGenerativeSettings( + (com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings>) + responseObserver); + break; + case METHODID_UPDATE_GENERATIVE_SETTINGS: + serviceImpl.updateGenerativeSettings( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1350,6 +1584,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>( service, METHODID_GET_AGENT_VALIDATION_RESULT))) + .addMethod( + getGetGenerativeSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings>( + service, METHODID_GET_GENERATIVE_SETTINGS))) + .addMethod( + getUpdateGenerativeSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings>( + service, METHODID_UPDATE_GENERATIVE_SETTINGS))) .build(); } @@ -1408,6 +1656,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRestoreAgentMethod()) .addMethod(getValidateAgentMethod()) .addMethod(getGetAgentValidationResultMethod()) + .addMethod(getGetGenerativeSettingsMethod()) + .addMethod(getUpdateGenerativeSettingsMethod()) .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 b2d91087b45a..2cc096c1174c 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 @@ -32,8 +32,9 @@ * Types][google.cloud.dialogflow.cx.v3.EntityType], * [Flows][google.cloud.dialogflow.cx.v3.Flow], * [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the - * conversation flows.. + * [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], + * [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * and so on to manage the conversation flows. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent} @@ -233,7 +234,7 @@ public interface GithubSettingsOrBuilder * * *
-       * The branch of GitHub repository tracked for this agent.
+       * The branch of the GitHub repository tracked for this agent.
        * 
* * string tracking_branch = 3; @@ -245,7 +246,7 @@ public interface GithubSettingsOrBuilder * * *
-       * The branch of GitHub repository tracked for this agent.
+       * The branch of the GitHub repository tracked for this agent.
        * 
* * string tracking_branch = 3; @@ -492,7 +493,7 @@ public com.google.protobuf.ByteString getRepositoryUriBytes() { * * *
-       * The branch of GitHub repository tracked for this agent.
+       * The branch of the GitHub repository tracked for this agent.
        * 
* * string tracking_branch = 3; @@ -515,7 +516,7 @@ public java.lang.String getTrackingBranch() { * * *
-       * The branch of GitHub repository tracked for this agent.
+       * The branch of the GitHub repository tracked for this agent.
        * 
* * string tracking_branch = 3; @@ -1353,7 +1354,7 @@ public Builder setRepositoryUriBytes(com.google.protobuf.ByteString value) { * * *
-         * The branch of GitHub repository tracked for this agent.
+         * The branch of the GitHub repository tracked for this agent.
          * 
* * string tracking_branch = 3; @@ -1375,7 +1376,7 @@ public java.lang.String getTrackingBranch() { * * *
-         * The branch of GitHub repository tracked for this agent.
+         * The branch of the GitHub repository tracked for this agent.
          * 
* * string tracking_branch = 3; @@ -1397,7 +1398,7 @@ public com.google.protobuf.ByteString getTrackingBranchBytes() { * * *
-         * The branch of GitHub repository tracked for this agent.
+         * The branch of the GitHub repository tracked for this agent.
          * 
* * string tracking_branch = 3; @@ -1418,7 +1419,7 @@ public Builder setTrackingBranch(java.lang.String value) { * * *
-         * The branch of GitHub repository tracked for this agent.
+         * The branch of the GitHub repository tracked for this agent.
          * 
* * string tracking_branch = 3; @@ -1435,7 +1436,7 @@ public Builder clearTrackingBranch() { * * *
-         * The branch of GitHub repository tracked for this agent.
+         * The branch of the GitHub repository tracked for this agent.
          * 
* * string tracking_branch = 3; @@ -2637,6 +2638,674 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface GenAppBuilderSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + java.lang.String getEngine(); + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + com.google.protobuf.ByteString getEngineBytes(); + } + /** + * + * + *
+   * Settings for Gen App Builder.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings} + */ + public static final class GenAppBuilderSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) + GenAppBuilderSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenAppBuilderSettings.newBuilder() to construct. + private GenAppBuilderSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenAppBuilderSettings() { + engine_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenAppBuilderSettings(); + } + + 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_GenAppBuilderSettings_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_GenAppBuilderSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.class, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder.class); + } + + public static final int ENGINE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object engine_ = ""; + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + @java.lang.Override + public java.lang.String getEngine() { + java.lang.Object ref = engine_; + 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(); + engine_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEngineBytes() { + java.lang.Object ref = engine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + engine_ = 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(engine_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, engine_); + } + 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(engine_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, engine_); + } + 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.GenAppBuilderSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings other = + (com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) obj; + + if (!getEngine().equals(other.getEngine())) 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) + ENGINE_FIELD_NUMBER; + hash = (53 * hash) + getEngine().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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 Gen App Builder.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder { + 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_GenAppBuilderSettings_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_GenAppBuilderSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.class, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + engine_ = ""; + 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_GenAppBuilderSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings build() { + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings result = + new com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.engine_ = engine_; + } + } + + @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.GenAppBuilderSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance()) + return this; + if (!other.getEngine().isEmpty()) { + engine_ = other.engine_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + engine_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object engine_ = ""; + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + public java.lang.String getEngine() { + java.lang.Object ref = engine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + engine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + public com.google.protobuf.ByteString getEngineBytes() { + java.lang.Object ref = engine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + engine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The engine to set. + * @return This builder for chaining. + */ + public Builder setEngine(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + engine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEngine() { + engine_ = getDefaultInstance().getEngine(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for engine to set. + * @return This builder for chaining. + */ + public Builder setEngineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + engine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings) + private static final com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenAppBuilderSettings 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.GenAppBuilderSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3235,7 +3904,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=285 + * google/cloud/dialogflow/cx/v3/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -3448,6 +4117,63 @@ public com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings getTextToSpeechSet : textToSpeechSettings_; } + public static final int GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER = 33; + private com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings genAppBuilderSettings_; + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + @java.lang.Override + public boolean hasGenAppBuilderSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings getGenAppBuilderSettings() { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder() { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3511,6 +4237,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (textToSpeechSettings_ != null) { output.writeMessage(31, getTextToSpeechSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(33, getGenAppBuilderSettings()); + } getUnknownFields().writeTo(output); } @@ -3576,6 +4305,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getTextToSpeechSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(33, getGenAppBuilderSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3620,6 +4353,10 @@ public boolean equals(final java.lang.Object obj) { if (hasTextToSpeechSettings()) { if (!getTextToSpeechSettings().equals(other.getTextToSpeechSettings())) return false; } + if (hasGenAppBuilderSettings() != other.hasGenAppBuilderSettings()) return false; + if (hasGenAppBuilderSettings()) { + if (!getGenAppBuilderSettings().equals(other.getGenAppBuilderSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3673,6 +4410,10 @@ public int hashCode() { hash = (37 * hash) + TEXT_TO_SPEECH_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getTextToSpeechSettings().hashCode(); } + if (hasGenAppBuilderSettings()) { + hash = (37 * hash) + GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenAppBuilderSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3787,8 +4528,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Types][google.cloud.dialogflow.cx.v3.EntityType], * [Flows][google.cloud.dialogflow.cx.v3.Flow], * [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the - * conversation flows.. + * [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], + * [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * and so on to manage the conversation flows. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3.Agent} @@ -3813,10 +4555,23 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3.Agent.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSpeechToTextSettingsFieldBuilder(); + getAdvancedSettingsFieldBuilder(); + getGitIntegrationSettingsFieldBuilder(); + getTextToSpeechSettingsFieldBuilder(); + getGenAppBuilderSettingsFieldBuilder(); + } } @java.lang.Override @@ -3855,6 +4610,11 @@ public Builder clear() { textToSpeechSettingsBuilder_.dispose(); textToSpeechSettingsBuilder_ = null; } + genAppBuilderSettings_ = null; + if (genAppBuilderSettingsBuilder_ != null) { + genAppBuilderSettingsBuilder_.dispose(); + genAppBuilderSettingsBuilder_ = null; + } return this; } @@ -3950,6 +4710,15 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Agent result) { ? textToSpeechSettings_ : textToSpeechSettingsBuilder_.build(); } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.genAppBuilderSettings_ = + genAppBuilderSettingsBuilder_ == null + ? genAppBuilderSettings_ + : genAppBuilderSettingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -4068,6 +4837,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { if (other.hasTextToSpeechSettings()) { mergeTextToSpeechSettings(other.getTextToSpeechSettings()); } + if (other.hasGenAppBuilderSettings()) { + mergeGenAppBuilderSettings(other.getGenAppBuilderSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4195,6 +4967,13 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 250 + case 266: + { + input.readMessage( + getGenAppBuilderSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 266 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5598,7 +6377,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=285 + * google/cloud/dialogflow/cx/v3/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -5619,7 +6398,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=285 + * google/cloud/dialogflow/cx/v3/agent.proto;l=314 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -5644,7 +6423,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=285 + * google/cloud/dialogflow/cx/v3/agent.proto;l=314 * @return This builder for chaining. */ @java.lang.Deprecated @@ -6378,6 +7157,215 @@ public Builder clearTextToSpeechSettings() { return textToSpeechSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings genAppBuilderSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder> + genAppBuilderSettingsBuilder_; + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + public boolean hasGenAppBuilderSettings() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + getGenAppBuilderSettings() { + if (genAppBuilderSettingsBuilder_ == null) { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } else { + return genAppBuilderSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder setGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings value) { + if (genAppBuilderSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genAppBuilderSettings_ = value; + } else { + genAppBuilderSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder setGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder builderForValue) { + if (genAppBuilderSettingsBuilder_ == null) { + genAppBuilderSettings_ = builderForValue.build(); + } else { + genAppBuilderSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder mergeGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings value) { + if (genAppBuilderSettingsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && genAppBuilderSettings_ != null + && genAppBuilderSettings_ + != com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + .getDefaultInstance()) { + getGenAppBuilderSettingsBuilder().mergeFrom(value); + } else { + genAppBuilderSettings_ = value; + } + } else { + genAppBuilderSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder clearGenAppBuilderSettings() { + bitField0_ = (bitField0_ & ~0x00010000); + genAppBuilderSettings_ = null; + if (genAppBuilderSettingsBuilder_ != null) { + genAppBuilderSettingsBuilder_.dispose(); + genAppBuilderSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder + getGenAppBuilderSettingsBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getGenAppBuilderSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder() { + if (genAppBuilderSettingsBuilder_ != null) { + return genAppBuilderSettingsBuilder_.getMessageOrBuilder(); + } else { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder> + getGenAppBuilderSettingsFieldBuilder() { + if (genAppBuilderSettingsBuilder_ == null) { + genAppBuilderSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder>( + getGenAppBuilderSettings(), getParentForChildren(), isClean()); + genAppBuilderSettings_ = null; + } + return genAppBuilderSettingsBuilder_; + } + @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/AgentGenerativeSettingsName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentGenerativeSettingsName.java new file mode 100644 index 000000000000..56bfe297454c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentGenerativeSettingsName.java @@ -0,0 +1,224 @@ +/* + * 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentGenerativeSettingsName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/generativeSettings"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + + @Deprecated + protected AgentGenerativeSettingsName() { + project = null; + location = null; + agent = null; + } + + private AgentGenerativeSettingsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentGenerativeSettingsName of(String project, String location, String agent) { + return newBuilder().setProject(project).setLocation(location).setAgent(agent).build(); + } + + public static String format(String project, String location, String agent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .build() + .toString(); + } + + public static AgentGenerativeSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT.validatedMatch( + formattedString, + "AgentGenerativeSettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentGenerativeSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT.instantiate( + "project", project, "location", location, "agent", agent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AgentGenerativeSettingsName that = ((AgentGenerativeSettingsName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/generativeSettings. */ + public static class Builder { + private String project; + private String location; + private String agent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + private Builder(AgentGenerativeSettingsName agentGenerativeSettingsName) { + this.project = agentGenerativeSettingsName.project; + this.location = agentGenerativeSettingsName.location; + this.agent = agentGenerativeSettingsName.agent; + } + + public AgentGenerativeSettingsName build() { + return new AgentGenerativeSettingsName(this); + } + } +} 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 3b6ba27a307e..49f12a4093fb 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=285 + * google/cloud/dialogflow/cx/v3/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -535,4 +535,46 @@ public interface AgentOrBuilder */ com.google.cloud.dialogflow.cx.v3.TextToSpeechSettingsOrBuilder getTextToSpeechSettingsOrBuilder(); + + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + boolean hasGenAppBuilderSettings(); + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings getGenAppBuilderSettings(); + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder(); } 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 5f41241c6214..bcbf277c453c 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 @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_Agent_GitIntegrationSettings_GithubSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Agent_GitIntegrationSettings_GithubSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + 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_ListAgentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -99,6 +103,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -116,145 +128,171 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oud/dialogflow/cx/v3/advanced_settings.p" + "roto\0320google/cloud/dialogflow/cx/v3/audi" + "o_config.proto\032(google/cloud/dialogflow/" - + "cx/v3/flow.proto\032#google/longrunning/ope" - + "rations.proto\032\033google/protobuf/empty.pro" - + "to\032 google/protobuf/field_mask.proto\032\034go" - + "ogle/protobuf/struct.proto\"8\n\024SpeechToTe" - + "xtSettings\022 \n\030enable_speech_adaptation\030\001" - + " \001(\010\"\345\010\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\025default_language_cod" - + "e\030\003 \001(\tB\005\342A\002\002\005\022 \n\030supported_language_cod" - + "es\030\004 \003(\t\022\027\n\ttime_zone\030\005 \001(\tB\004\342A\001\002\022\023\n\013des" - + "cription\030\006 \001(\t\022\022\n\navatar_uri\030\007 \001(\t\022T\n\027sp" - + "eech_to_text_settings\030\r \001(\01323.google.clo" - + "ud.dialogflow.cx.v3.SpeechToTextSettings" - + "\022;\n\nstart_flow\030\020 \001(\tB\'\342A\001\005\372A \n\036dialogflo" - + "w.googleapis.com/Flow\022J\n\021security_settin" - + "gs\030\021 \001(\tB/\372A,\n*dialogflow.googleapis.com" - + "/SecuritySettings\022&\n\032enable_stackdriver_" - + "logging\030\022 \001(\010B\002\030\001\022\037\n\027enable_spell_correc" - + "tion\030\024 \001(\010\022\016\n\006locked\030\033 \001(\010\022J\n\021advanced_s" - + "ettings\030\026 \001(\0132/.google.cloud.dialogflow." - + "cx.v3.AdvancedSettings\022]\n\030git_integratio" - + "n_settings\030\036 \001(\0132;.google.cloud.dialogfl" - + "ow.cx.v3.Agent.GitIntegrationSettings\022T\n" - + "\027text_to_speech_settings\030\037 \001(\01323.google." - + "cloud.dialogflow.cx.v3.TextToSpeechSetti" - + "ngs\032\220\002\n\026GitIntegrationSettings\022e\n\017github" - + "_settings\030\001 \001(\0132J.google.cloud.dialogflo" - + "w.cx.v3.Agent.GitIntegrationSettings.Git" - + "hubSettingsH\000\032\177\n\016GithubSettings\022\024\n\014displ" - + "ay_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:\\" - + "\352AY\n\037dialogflow.googleapis.com/Agent\0226pr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}\"t\n\021ListAgentsRequest\0228\n\006par" - + "ent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogflow.googleapi" - + "s.com/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" - + "oken\030\003 \001(\t\"c\n\022ListAgentsResponse\0224\n\006agen" - + "ts\030\001 \003(\0132$.google.cloud.dialogflow.cx.v3" - + ".Agent\022\027\n\017next_page_token\030\002 \001(\t\"I\n\017GetAg" - + "entRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialo" - + "gflow.googleapis.com/Agent\"\211\001\n\022CreateAge" - + "ntRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dial" - + "ogflow.googleapis.com/Agent\0229\n\005agent\030\002 \001" - + "(\0132$.google.cloud.dialogflow.cx.v3.Agent" - + "B\004\342A\001\002\"\200\001\n\022UpdateAgentRequest\0229\n\005agent\030\001" - + " \001(\0132$.google.cloud.dialogflow.cx.v3.Age" - + "ntB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.p" - + "rotobuf.FieldMask\"L\n\022DeleteAgentRequest\022" - + "6\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googl" - + "eapis.com/Agent\"\236\004\n\022ExportAgentRequest\0226" - + "\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.google" - + "apis.com/Agent\022\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022" - + "W\n\013data_format\030\003 \001(\0162<.google.cloud.dial" - + "ogflow.cx.v3.ExportAgentRequest.DataForm" - + "atB\004\342A\001\001\022C\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'\n%" - + "dialogflow.googleapis.com/Environment\022_\n" - + "\017git_destination\030\006 \001(\0132@.google.cloud.di" - + "alogflow.cx.v3.ExportAgentRequest.GitDes" - + "tinationB\004\342A\001\001\022.\n include_bigquery_expor" - + "t_settings\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDestination" - + "\022\027\n\017tracking_branch\030\001 \001(\t\022\026\n\016commit_mess" - + "age\030\002 \001(\t\"E\n\nDataFormat\022\033\n\027DATA_FORMAT_U" - + "NSPECIFIED\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\023RestoreAgentReq" - + "uest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow." - + "googleapis.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.R" - + "estoreAgentRequest.GitSourceH\000\022X\n\016restor" - + "e_option\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\rRestoreOption\022\036\n\032RESTORE_OPTION_UNSPEC" - + "IFIED\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\037GetAgentVali" - + "dationResultRequest\022F\n\004name\030\001 \001(\tB8\342A\001\002\372" - + "A1\n/dialogflow.googleapis.com/AgentValid" - + "ationResult\022\025\n\rlanguage_code\030\002 \001(\t\"\372\001\n\025A" - + "gentValidationResult\022\014\n\004name\030\001 \001(\t\022T\n\027fl" - + "ow_validation_results\030\002 \003(\01323.google.clo" - + "ud.dialogflow.cx.v3.FlowValidationResult" - + ":}\352Az\n/dialogflow.googleapis.com/AgentVa" - + "lidationResult\022Gprojects/{project}/locat" - + "ions/{location}/agents/{agent}/validatio" - + "nResult2\231\016\n\006Agents\022\256\001\n\nListAgents\0220.goog" - + "le.cloud.dialogflow.cx.v3.ListAgentsRequ" - + "est\0321.google.cloud.dialogflow.cx.v3.List" - + "AgentsResponse\";\332A\006parent\202\323\344\223\002,\022*/v3/{pa" - + "rent=projects/*/locations/*}/agents\022\233\001\n\010" - + "GetAgent\022..google.cloud.dialogflow.cx.v3" - + ".GetAgentRequest\032$.google.cloud.dialogfl" - + "ow.cx.v3.Agent\"9\332A\004name\202\323\344\223\002,\022*/v3/{name" - + "=projects/*/locations/*/agents/*}\022\260\001\n\013Cr" - + "eateAgent\0221.google.cloud.dialogflow.cx.v" - + "3.CreateAgentRequest\032$.google.cloud.dial" - + "ogflow.cx.v3.Agent\"H\332A\014parent,agent\202\323\344\223\002" - + "3\"*/v3/{parent=projects/*/locations/*}/a" - + "gents:\005agent\022\273\001\n\013UpdateAgent\0221.google.cl" - + "oud.dialogflow.cx.v3.UpdateAgentRequest\032" - + "$.google.cloud.dialogflow.cx.v3.Agent\"S\332" - + "A\021agent,update_mask\202\323\344\223\002920/v3/{agent.na" - + "me=projects/*/locations/*/agents/*}:\005age" - + "nt\022\223\001\n\013DeleteAgent\0221.google.cloud.dialog" - + "flow.cx.v3.DeleteAgentRequest\032\026.google.p" - + "rotobuf.Empty\"9\332A\004name\202\323\344\223\002,**/v3/{name=" - + "projects/*/locations/*/agents/*}\022\315\001\n\013Exp" - + "ortAgent\0221.google.cloud.dialogflow.cx.v3" - + ".ExportAgentRequest\032\035.google.longrunning" - + ".Operation\"l\312A-\n\023ExportAgentResponse\022\026go" - + "ogle.protobuf.Struct\202\323\344\223\0026\"1/v3/{name=pr" - + "ojects/*/locations/*/agents/*}:export:\001*" - + "\022\322\001\n\014RestoreAgent\0222.google.cloud.dialogf" - + "low.cx.v3.RestoreAgentRequest\032\035.google.l" - + "ongrunning.Operation\"o\312A/\n\025google.protob" - + "uf.Empty\022\026google.protobuf.Struct\202\323\344\223\0027\"2" - + "/v3/{name=projects/*/locations/*/agents/" - + "*}:restore:\001*\022\272\001\n\rValidateAgent\0223.google" - + ".cloud.dialogflow.cx.v3.ValidateAgentReq" - + "uest\0324.google.cloud.dialogflow.cx.v3.Age" - + "ntValidationResult\">\202\323\344\223\0028\"3/v3/{name=pr" - + "ojects/*/locations/*/agents/*}:validate:" - + "\001*\022\334\001\n\030GetAgentValidationResult\022>.google" - + ".cloud.dialogflow.cx.v3.GetAgentValidati" - + "onResultRequest\0324.google.cloud.dialogflo" - + "w.cx.v3.AgentValidationResult\"J\332A\004name\202\323" - + "\344\223\002=\022;/v3/{name=projects/*/locations/*/a" - + "gents/*/validationResult}\032x\312A\031dialogflow" - + ".googleapis.com\322AYhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.goo" - + "gleapis.com/auth/dialogflowB\260\001\n!com.goog" - + "le.cloud.dialogflow.cx.v3B\nAgentProtoP\001Z" - + "1cloud.google.com/go/dialogflow/cx/apiv3" - + "/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialog" - + "flow.Cx.V3\352\002!Google::Cloud::Dialogflow::" - + "CX::V3b\006proto3" + + "cx/v3/flow.proto\0327google/cloud/dialogflo" + + "w/cx/v3/generative_settings.proto\032#googl" + + "e/longrunning/operations.proto\032\033google/p" + + "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" + + "\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" + + " \001(\tB\004\342A\001\002\022\023\n\013description\030\006 \001(\t\022\022\n\navata" + + "r_uri\030\007 \001(\t\022T\n\027speech_to_text_settings\030\r" + + " \001(\01323.google.cloud.dialogflow.cx.v3.Spe" + + "echToTextSettings\022;\n\nstart_flow\030\020 \001(\tB\'\342" + + "A\001\005\372A \n\036dialogflow.googleapis.com/Flow\022J" + + "\n\021security_settings\030\021 \001(\tB/\372A,\n*dialogfl" + + "ow.googleapis.com/SecuritySettings\022&\n\032en" + + "able_stackdriver_logging\030\022 \001(\010B\002\030\001\022\037\n\027en" + + "able_spell_correction\030\024 \001(\010\022\016\n\006locked\030\033 " + + "\001(\010\022J\n\021advanced_settings\030\026 \001(\0132/.google." + + "cloud.dialogflow.cx.v3.AdvancedSettings\022" + + "]\n\030git_integration_settings\030\036 \001(\0132;.goog" + + "le.cloud.dialogflow.cx.v3.Agent.GitInteg" + + "rationSettings\022T\n\027text_to_speech_setting" + + "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" + + "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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -267,6 +305,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -302,6 +341,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AdvancedSettings", "GitIntegrationSettings", "TextToSpeechSettings", + "GenAppBuilderSettings", + "GenAppBuilderSettings", }); internal_static_google_cloud_dialogflow_cx_v3_Agent_GitIntegrationSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Agent_descriptor.getNestedTypes().get(0); @@ -321,6 +362,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DisplayName", "RepositoryUri", "TrackingBranch", "AccessToken", "Branches", }); + internal_static_google_cloud_dialogflow_cx_v3_Agent_GenAppBuilderSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Agent_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_Agent_GenAppBuilderSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Agent_GenAppBuilderSettings_descriptor, + new java.lang.String[] { + "Engine", + }); internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_fieldAccessorTable = @@ -442,6 +491,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "FlowValidationResults", }); + internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_descriptor, + new java.lang.String[] { + "GenerativeSettings", "UpdateMask", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -461,6 +526,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfo.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfo.java index 5d8b6437a03e..62699f024130 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfo.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfo.java @@ -645,7 +645,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -660,7 +660,7 @@ public boolean hasNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -677,7 +677,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -689,6 +689,56 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { : noSpeechTimeout_; } + public static final int ENDPOINTING_TIMEOUT_FIELD_NUMBER = 19; + private com.google.protobuf.Duration endpointingTimeout_; + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + @java.lang.Override + public boolean hasEndpointingTimeout() { + return endpointingTimeout_ != null; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndpointingTimeout() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + public static final int IS_INPUT_TEXT_FIELD_NUMBER = 16; private boolean isInputText_ = false; /** @@ -872,6 +922,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clientHalfCloseStreamingTimeOffset_ != null) { output.writeMessage(18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + output.writeMessage(19, getEndpointingTimeout()); + } getUnknownFields().writeTo(output); } @@ -948,6 +1001,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEndpointingTimeout()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -995,6 +1051,10 @@ public boolean equals(final java.lang.Object obj) { if (hasNoSpeechTimeout()) { if (!getNoSpeechTimeout().equals(other.getNoSpeechTimeout())) return false; } + if (hasEndpointingTimeout() != other.hasEndpointingTimeout()) return false; + if (hasEndpointingTimeout()) { + if (!getEndpointingTimeout().equals(other.getEndpointingTimeout())) return false; + } if (getIsInputText() != other.getIsInputText()) return false; if (hasClientHalfCloseTimeOffset() != other.hasClientHalfCloseTimeOffset()) return false; if (hasClientHalfCloseTimeOffset()) { @@ -1062,6 +1122,10 @@ public int hashCode() { hash = (37 * hash) + NO_SPEECH_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getNoSpeechTimeout().hashCode(); } + if (hasEndpointingTimeout()) { + hash = (37 * hash) + ENDPOINTING_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getEndpointingTimeout().hashCode(); + } hash = (37 * hash) + IS_INPUT_TEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInputText()); if (hasClientHalfCloseTimeOffset()) { @@ -1269,6 +1333,11 @@ public Builder clear() { noSpeechTimeoutBuilder_.dispose(); noSpeechTimeoutBuilder_ = null; } + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } isInputText_ = false; clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { @@ -1403,15 +1472,21 @@ private void buildPartial0( noSpeechTimeoutBuilder_ == null ? noSpeechTimeout_ : noSpeechTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00004000) != 0)) { - result.isInputText_ = isInputText_; + result.endpointingTimeout_ = + endpointingTimeoutBuilder_ == null + ? endpointingTimeout_ + : endpointingTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00008000) != 0)) { + result.isInputText_ = isInputText_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { result.clientHalfCloseTimeOffset_ = clientHalfCloseTimeOffsetBuilder_ == null ? clientHalfCloseTimeOffset_ : clientHalfCloseTimeOffsetBuilder_.build(); } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.clientHalfCloseStreamingTimeOffset_ = clientHalfCloseStreamingTimeOffsetBuilder_ == null ? clientHalfCloseStreamingTimeOffset_ @@ -1606,6 +1681,9 @@ public Builder mergeFrom( if (other.hasNoSpeechTimeout()) { mergeNoSpeechTimeout(other.getNoSpeechTimeout()); } + if (other.hasEndpointingTimeout()) { + mergeEndpointingTimeout(other.getEndpointingTimeout()); + } if (other.getIsInputText() != false) { setIsInputText(other.getIsInputText()); } @@ -1755,14 +1833,14 @@ public Builder mergeFrom( case 128: { isInputText_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 128 case 138: { input.readMessage( getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 138 case 146: @@ -1770,9 +1848,16 @@ public Builder mergeFrom( input.readMessage( getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 146 + case 154: + { + input.readMessage( + getEndpointingTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4183,7 +4268,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4197,7 +4282,7 @@ public boolean hasNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4217,7 +4302,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4239,7 +4324,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4258,7 +4343,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration.Builder builderFo * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4283,7 +4368,7 @@ public Builder mergeNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4302,7 +4387,7 @@ public Builder clearNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4316,7 +4401,7 @@ public com.google.protobuf.Duration.Builder getNoSpeechTimeoutBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4334,7 +4419,7 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4356,6 +4441,189 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { return noSpeechTimeoutBuilder_; } + private com.google.protobuf.Duration endpointingTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endpointingTimeoutBuilder_; + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + public boolean hasEndpointingTimeout() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + public com.google.protobuf.Duration getEndpointingTimeout() { + if (endpointingTimeoutBuilder_ == null) { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } else { + return endpointingTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointingTimeout_ = value; + } else { + endpointingTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeout_ = builderForValue.build(); + } else { + endpointingTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder mergeEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && endpointingTimeout_ != null + && endpointingTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndpointingTimeoutBuilder().mergeFrom(value); + } else { + endpointingTimeout_ = value; + } + } else { + endpointingTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder clearEndpointingTimeout() { + bitField0_ = (bitField0_ & ~0x00004000); + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.Duration.Builder getEndpointingTimeoutBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getEndpointingTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + if (endpointingTimeoutBuilder_ != null) { + return endpointingTimeoutBuilder_.getMessageOrBuilder(); + } else { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndpointingTimeoutFieldBuilder() { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndpointingTimeout(), getParentForChildren(), isClean()); + endpointingTimeout_ = null; + } + return endpointingTimeoutBuilder_; + } + private boolean isInputText_; /** * @@ -4387,7 +4655,7 @@ public boolean getIsInputText() { public Builder setIsInputText(boolean value) { isInputText_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4403,7 +4671,7 @@ public Builder setIsInputText(boolean value) { * @return This builder for chaining. */ public Builder clearIsInputText() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); isInputText_ = false; onChanged(); return this; @@ -4427,7 +4695,7 @@ public Builder clearIsInputText() { * @return Whether the clientHalfCloseTimeOffset field is set. */ public boolean hasClientHalfCloseTimeOffset() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4467,7 +4735,7 @@ public Builder setClientHalfCloseTimeOffset(com.google.protobuf.Duration value) } else { clientHalfCloseTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4487,7 +4755,7 @@ public Builder setClientHalfCloseTimeOffset( } else { clientHalfCloseTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4502,7 +4770,7 @@ public Builder setClientHalfCloseTimeOffset( */ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && clientHalfCloseTimeOffset_ != null && clientHalfCloseTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { getClientHalfCloseTimeOffsetBuilder().mergeFrom(value); @@ -4512,7 +4780,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value } else { clientHalfCloseTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4526,7 +4794,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value * .google.protobuf.Duration client_half_close_time_offset = 17; */ public Builder clearClientHalfCloseTimeOffset() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { clientHalfCloseTimeOffsetBuilder_.dispose(); @@ -4545,7 +4813,7 @@ public Builder clearClientHalfCloseTimeOffset() { * .google.protobuf.Duration client_half_close_time_offset = 17; */ public com.google.protobuf.Duration.Builder getClientHalfCloseTimeOffsetBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(); } @@ -4611,7 +4879,7 @@ public com.google.protobuf.DurationOrBuilder getClientHalfCloseTimeOffsetOrBuild * @return Whether the clientHalfCloseStreamingTimeOffset field is set. */ public boolean hasClientHalfCloseStreamingTimeOffset() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4651,7 +4919,7 @@ public Builder setClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duratio } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4671,7 +4939,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4686,7 +4954,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( */ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseStreamingTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && clientHalfCloseStreamingTimeOffset_ != null && clientHalfCloseStreamingTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { @@ -4697,7 +4965,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat } else { clientHalfCloseStreamingTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4711,7 +4979,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public Builder clearClientHalfCloseStreamingTimeOffset() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); clientHalfCloseStreamingTimeOffset_ = null; if (clientHalfCloseStreamingTimeOffsetBuilder_ != null) { clientHalfCloseStreamingTimeOffsetBuilder_.dispose(); @@ -4730,7 +4998,7 @@ public Builder clearClientHalfCloseStreamingTimeOffset() { * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public com.google.protobuf.Duration.Builder getClientHalfCloseStreamingTimeOffsetBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfoOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfoOrBuilder.java index 2d581f827adb..5158bc976cc6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfoOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CloudConversationDebuggingInfoOrBuilder.java @@ -446,7 +446,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -458,7 +458,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -470,13 +470,48 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; */ com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + boolean hasEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + com.google.protobuf.Duration getEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequest.java index 984b849e1f08..6bfa6a9158af 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequest.java @@ -76,7 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -104,7 +106,9 @@ public java.lang.String getParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -674,7 +678,9 @@ public Builder mergeFrom( * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -701,7 +707,9 @@ public java.lang.String getParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -728,7 +736,9 @@ public com.google.protobuf.ByteString getParentBytes() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -754,7 +764,9 @@ public Builder setParent(java.lang.String value) { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -776,7 +788,9 @@ public Builder clearParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequestOrBuilder.java index 304301166a1b..bcd18fa721db 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface CreateTransitionRouteGroupRequestOrBuilder * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -47,7 +49,9 @@ public interface CreateTransitionRouteGroupRequestOrBuilder * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnection.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnection.java new file mode 100644 index 000000000000..1833b4189cac --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnection.java @@ -0,0 +1,800 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * A data store connection. It represents a data store in Discovery Engine and
+ * the type of the contents it contains.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DataStoreConnection} + */ +public final class DataStoreConnection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DataStoreConnection) + DataStoreConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataStoreConnection.newBuilder() to construct. + private DataStoreConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataStoreConnection() { + dataStoreType_ = 0; + dataStore_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataStoreConnection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.class, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder.class); + } + + public static final int DATA_STORE_TYPE_FIELD_NUMBER = 1; + private int dataStoreType_ = 0; + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + @java.lang.Override + public int getDataStoreTypeValue() { + return dataStoreType_; + } + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreType getDataStoreType() { + com.google.cloud.dialogflow.cx.v3.DataStoreType result = + com.google.cloud.dialogflow.cx.v3.DataStoreType.forNumber(dataStoreType_); + return result == null ? com.google.cloud.dialogflow.cx.v3.DataStoreType.UNRECOGNIZED : result; + } + + public static final int DATA_STORE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataStore_ = ""; + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + @java.lang.Override + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + 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(); + dataStore_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = 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 (dataStoreType_ + != com.google.cloud.dialogflow.cx.v3.DataStoreType.DATA_STORE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, dataStoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataStore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataStoreType_ + != com.google.cloud.dialogflow.cx.v3.DataStoreType.DATA_STORE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataStoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataStore_); + } + 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.DataStoreConnection)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DataStoreConnection other = + (com.google.cloud.dialogflow.cx.v3.DataStoreConnection) obj; + + if (dataStoreType_ != other.dataStoreType_) return false; + if (!getDataStore().equals(other.getDataStore())) 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) + DATA_STORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataStoreType_; + hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getDataStore().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DataStoreConnection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DataStoreConnection 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.DataStoreConnection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DataStoreConnection 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.DataStoreConnection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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; + } + /** + * + * + *
+   * A data store connection. It represents a data store in Discovery Engine and
+   * the type of the contents it contains.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DataStoreConnection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DataStoreConnection) + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.class, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DataStoreConnection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStoreType_ = 0; + dataStore_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection build() { + com.google.cloud.dialogflow.cx.v3.DataStoreConnection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection buildPartial() { + com.google.cloud.dialogflow.cx.v3.DataStoreConnection result = + new com.google.cloud.dialogflow.cx.v3.DataStoreConnection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DataStoreConnection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataStoreType_ = dataStoreType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataStore_ = dataStore_; + } + } + + @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.DataStoreConnection) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DataStoreConnection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DataStoreConnection other) { + if (other == com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance()) + return this; + if (other.dataStoreType_ != 0) { + setDataStoreTypeValue(other.getDataStoreTypeValue()); + } + if (!other.getDataStore().isEmpty()) { + dataStore_ = other.dataStore_; + 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 8: + { + dataStoreType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + dataStore_ = 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 int dataStoreType_ = 0; + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + @java.lang.Override + public int getDataStoreTypeValue() { + return dataStoreType_; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @param value The enum numeric value on the wire for dataStoreType to set. + * @return This builder for chaining. + */ + public Builder setDataStoreTypeValue(int value) { + dataStoreType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreType getDataStoreType() { + com.google.cloud.dialogflow.cx.v3.DataStoreType result = + com.google.cloud.dialogflow.cx.v3.DataStoreType.forNumber(dataStoreType_); + return result == null ? com.google.cloud.dialogflow.cx.v3.DataStoreType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @param value The dataStoreType to set. + * @return This builder for chaining. + */ + public Builder setDataStoreType(com.google.cloud.dialogflow.cx.v3.DataStoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + dataStoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearDataStoreType() { + bitField0_ = (bitField0_ & ~0x00000001); + dataStoreType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dataStore_ = ""; + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @param value The dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @param value The bytes for dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataStore_ = 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.DataStoreConnection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DataStoreConnection) + private static final com.google.cloud.dialogflow.cx.v3.DataStoreConnection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DataStoreConnection(); + } + + public static com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataStoreConnection 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.DataStoreConnection 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/DataStoreConnectionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionOrBuilder.java new file mode 100644 index 000000000000..addfb832c356 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DataStoreConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DataStoreConnection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + int getDataStoreTypeValue(); + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + com.google.cloud.dialogflow.cx.v3.DataStoreType getDataStoreType(); + + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + java.lang.String getDataStore(); + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + com.google.protobuf.ByteString getDataStoreBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java new file mode 100644 index 000000000000..e2be109baeab --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java @@ -0,0 +1,70 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class DataStoreConnectionProto { + private DataStoreConnectionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/dialogflow/cx/v3/data_sto" + + "re_connection.proto\022\035google.cloud.dialog" + + "flow.cx.v3\"p\n\023DataStoreConnection\022E\n\017dat" + + "a_store_type\030\001 \001(\0162,.google.cloud.dialog" + + "flow.cx.v3.DataStoreType\022\022\n\ndata_store\030\002" + + " \001(\t*b\n\rDataStoreType\022\037\n\033DATA_STORE_TYPE" + + "_UNSPECIFIED\020\000\022\016\n\nPUBLIC_WEB\020\001\022\020\n\014UNSTRU" + + "CTURED\020\002\022\016\n\nSTRUCTURED\020\003B\232\001\n!com.google." + + "cloud.dialogflow.cx.v3B\030DataStoreConnect" + + "ionProtoP\001Z1cloud.google.com/go/dialogfl" + + "ow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.C" + + "loud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor, + new java.lang.String[] { + "DataStoreType", "DataStore", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreType.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreType.java new file mode 100644 index 000000000000..e470d40cae2f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreType.java @@ -0,0 +1,203 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Type of a data store.
+ * Determines how search is performed in the data store.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.DataStoreType} + */ +public enum DataStoreType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. This value indicates that the data store type is not
+   * specified, so it will not be used during search.
+   * 
+ * + * DATA_STORE_TYPE_UNSPECIFIED = 0; + */ + DATA_STORE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * A data store that contains public web content.
+   * 
+ * + * PUBLIC_WEB = 1; + */ + PUBLIC_WEB(1), + /** + * + * + *
+   * A data store that contains unstructured private data.
+   * 
+ * + * UNSTRUCTURED = 2; + */ + UNSTRUCTURED(2), + /** + * + * + *
+   * A data store that contains structured data (for example FAQ).
+   * 
+ * + * STRUCTURED = 3; + */ + STRUCTURED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. This value indicates that the data store type is not
+   * specified, so it will not be used during search.
+   * 
+ * + * DATA_STORE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_STORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * A data store that contains public web content.
+   * 
+ * + * PUBLIC_WEB = 1; + */ + public static final int PUBLIC_WEB_VALUE = 1; + /** + * + * + *
+   * A data store that contains unstructured private data.
+   * 
+ * + * UNSTRUCTURED = 2; + */ + public static final int UNSTRUCTURED_VALUE = 2; + /** + * + * + *
+   * A data store that contains structured data (for example FAQ).
+   * 
+ * + * STRUCTURED = 3; + */ + public static final int STRUCTURED_VALUE = 3; + + 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 DataStoreType 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 DataStoreType forNumber(int value) { + switch (value) { + case 0: + return DATA_STORE_TYPE_UNSPECIFIED; + case 1: + return PUBLIC_WEB; + case 2: + return UNSTRUCTURED; + case 3: + return STRUCTURED; + 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 DataStoreType findValueByNumber(int number) { + return DataStoreType.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.DataStoreConnectionProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataStoreType[] VALUES = values(); + + public static DataStoreType 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 DataStoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.DataStoreType) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequest.java index 7ba0c6797f5c..9070f4bc9796 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequest.java @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -105,7 +106,8 @@ public java.lang.String getName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -534,7 +536,8 @@ public Builder mergeFrom( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -562,7 +565,8 @@ public java.lang.String getName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -590,7 +594,8 @@ public com.google.protobuf.ByteString getNameBytes() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -617,7 +622,8 @@ public Builder setName(java.lang.String value) { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -640,7 +646,8 @@ public Builder clearName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequestOrBuilder.java index b828f4486173..faa199ca94eb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteTransitionRouteGroupRequestOrBuilder.java @@ -31,7 +31,8 @@ public interface DeleteTransitionRouteGroupRequestOrBuilder * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -49,7 +50,8 @@ public interface DeleteTransitionRouteGroupRequestOrBuilder * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java index 499faf87965b..6a80e658a02b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java @@ -234,7 +234,7 @@ public com.google.protobuf.ByteString getAgentContent() { * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* @@ -250,7 +250,7 @@ public boolean hasCommitSha() { * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* @@ -279,7 +279,7 @@ public java.lang.String getCommitSha() { * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* @@ -972,7 +972,7 @@ public Builder clearAgentContent() { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* @@ -989,7 +989,7 @@ public boolean hasCommitSha() { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* @@ -1019,7 +1019,7 @@ public java.lang.String getCommitSha() { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* @@ -1049,7 +1049,7 @@ public com.google.protobuf.ByteString getCommitShaBytes() { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* @@ -1072,7 +1072,7 @@ public Builder setCommitSha(java.lang.String value) { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* @@ -1093,7 +1093,7 @@ public Builder clearCommitSha() { * *
      * Commit SHA of the git push. This field is populated if
-     * `git_destination` are specified in
+     * `git_destination` is specified in
      * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
      * 
* diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponseOrBuilder.java index 42deaadf1c90..e5066012a78f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponseOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponseOrBuilder.java @@ -100,7 +100,7 @@ public interface ExportAgentResponseOrBuilder * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* @@ -114,7 +114,7 @@ public interface ExportAgentResponseOrBuilder * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* @@ -128,7 +128,7 @@ public interface ExportAgentResponseOrBuilder * *
    * Commit SHA of the git push. This field is populated if
-   * `git_destination` are specified in
+   * `git_destination` is specified in
    * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
    * 
* diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java index b018cd5940d9..23f7e382f404 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java @@ -537,7 +537,10 @@ public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersO * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -561,7 +564,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -585,7 +591,10 @@ public int getTransitionRouteGroupsCount() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -610,7 +619,10 @@ public java.lang.String getTransitionRouteGroups(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -673,6 +685,64 @@ public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBu : nluSettings_; } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; + private com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledgeConnectorSettings_; + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -709,6 +779,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 15, transitionRouteGroups_.getRaw(i)); } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(18, getKnowledgeConnectorSettings()); + } getUnknownFields().writeTo(output); } @@ -744,6 +817,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getKnowledgeConnectorSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -769,6 +847,11 @@ public boolean equals(final java.lang.Object obj) { if (hasNluSettings()) { if (!getNluSettings().equals(other.getNluSettings())) return false; } + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -802,6 +885,10 @@ public int hashCode() { hash = (37 * hash) + NLU_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getNluSettings().hashCode(); } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -977,6 +1064,11 @@ public Builder clear() { nluSettingsBuilder_.dispose(); nluSettingsBuilder_ = null; } + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } return this; } @@ -1052,6 +1144,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Flow result) { result.nluSettings_ = nluSettingsBuilder_ == null ? nluSettings_ : nluSettingsBuilder_.build(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } } @java.lang.Override @@ -1181,6 +1279,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Flow other) { if (other.hasNluSettings()) { mergeNluSettings(other.getNluSettings()); } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1265,6 +1366,13 @@ public Builder mergeFrom( transitionRouteGroups_.add(s); break; } // case 122 + case 146: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2847,7 +2955,10 @@ private void ensureTransitionRouteGroupsIsMutable() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2873,7 +2984,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2898,7 +3012,10 @@ public int getTransitionRouteGroupsCount() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2924,7 +3041,10 @@ public java.lang.String getTransitionRouteGroups(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2950,7 +3070,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2984,7 +3107,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3017,7 +3143,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3047,7 +3176,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3076,7 +3208,10 @@ public Builder clearTransitionRouteGroups() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3282,6 +3417,216 @@ public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBu return nluSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + .getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + @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/FlowImportStrategy.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowImportStrategy.java new file mode 100644 index 000000000000..7bf124712f1f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowImportStrategy.java @@ -0,0 +1,633 @@ +/* + * 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/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The flow import strategy used for resource conflict resolution associated
+ * with an [ImportFlowRequest][google.cloud.dialogflow.cx.v3.ImportFlowRequest].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowImportStrategy} + */ +public final class FlowImportStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.FlowImportStrategy) + FlowImportStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowImportStrategy.newBuilder() to construct. + private FlowImportStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowImportStrategy() { + globalImportStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowImportStrategy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.class, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder.class); + } + + public static final int GLOBAL_IMPORT_STRATEGY_FIELD_NUMBER = 1; + private int globalImportStrategy_ = 0; + /** + * + * + *
+   * Optional. Import strategy for resource conflict resolution, applied
+   * globally throughout the flow. It will be applied for all display name
+   * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+   * assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + @java.lang.Override + public int getGlobalImportStrategyValue() { + return globalImportStrategy_; + } + /** + * + * + *
+   * Optional. Import strategy for resource conflict resolution, applied
+   * globally throughout the flow. It will be applied for all display name
+   * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+   * assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getGlobalImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(globalImportStrategy_); + return result == null ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED : result; + } + + 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 (globalImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, globalImportStrategy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (globalImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, globalImportStrategy_); + } + 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.FlowImportStrategy)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy other = + (com.google.cloud.dialogflow.cx.v3.FlowImportStrategy) obj; + + if (globalImportStrategy_ != other.globalImportStrategy_) 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) + GLOBAL_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + globalImportStrategy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.FlowImportStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowImportStrategy 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.FlowImportStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowImportStrategy 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.FlowImportStrategy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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 flow import strategy used for resource conflict resolution associated
+   * with an [ImportFlowRequest][google.cloud.dialogflow.cx.v3.ImportFlowRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowImportStrategy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.FlowImportStrategy) + com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.class, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + globalImportStrategy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy build() { + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy buildPartial() { + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy result = + new com.google.cloud.dialogflow.cx.v3.FlowImportStrategy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.FlowImportStrategy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.globalImportStrategy_ = globalImportStrategy_; + } + } + + @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.FlowImportStrategy) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.FlowImportStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.FlowImportStrategy other) { + if (other == com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance()) + return this; + if (other.globalImportStrategy_ != 0) { + setGlobalImportStrategyValue(other.getGlobalImportStrategyValue()); + } + 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: + { + globalImportStrategy_ = input.readEnum(); + 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 int globalImportStrategy_ = 0; + /** + * + * + *
+     * Optional. Import strategy for resource conflict resolution, applied
+     * globally throughout the flow. It will be applied for all display name
+     * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+     * assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + @java.lang.Override + public int getGlobalImportStrategyValue() { + return globalImportStrategy_; + } + /** + * + * + *
+     * Optional. Import strategy for resource conflict resolution, applied
+     * globally throughout the flow. It will be applied for all display name
+     * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+     * assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for globalImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setGlobalImportStrategyValue(int value) { + globalImportStrategy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Import strategy for resource conflict resolution, applied
+     * globally throughout the flow. It will be applied for all display name
+     * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+     * assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getGlobalImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(globalImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Import strategy for resource conflict resolution, applied
+     * globally throughout the flow. It will be applied for all display name
+     * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+     * assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The globalImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setGlobalImportStrategy(com.google.cloud.dialogflow.cx.v3.ImportStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + globalImportStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Import strategy for resource conflict resolution, applied
+     * globally throughout the flow. It will be applied for all display name
+     * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+     * assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGlobalImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000001); + globalImportStrategy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.FlowImportStrategy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.FlowImportStrategy) + private static final com.google.cloud.dialogflow.cx.v3.FlowImportStrategy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.FlowImportStrategy(); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowImportStrategy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowImportStrategy 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.FlowImportStrategy 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/FlowImportStrategyOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowImportStrategyOrBuilder.java new file mode 100644 index 000000000000..34c0ffd880c7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowImportStrategyOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface FlowImportStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.FlowImportStrategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Import strategy for resource conflict resolution, applied
+   * globally throughout the flow. It will be applied for all display name
+   * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+   * assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + int getGlobalImportStrategyValue(); + /** + * + * + *
+   * Optional. Import strategy for resource conflict resolution, applied
+   * globally throughout the flow. It will be applied for all display name
+   * conflicts in the imported content. If not specified, 'CREATE_NEW' is
+   * assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3.ImportStrategy getGlobalImportStrategy(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java index 32df8e7048f2..ecc44afd2213 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java @@ -357,7 +357,10 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -379,7 +382,10 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -401,7 +407,10 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -424,7 +433,10 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -469,4 +481,46 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java index 302e35e78718..b1eeb1ce9d84 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java @@ -79,6 +79,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ImportFlowRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ImportFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ImportFlowResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,141 +108,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\035google.cloud.dialogflow.cx.v3\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032(google/clo" - + "ud/dialogflow/cx/v3/page.proto\0326google/c" - + "loud/dialogflow/cx/v3/validation_message" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032\033google/protobuf/empty.proto\032 google" - + "/protobuf/field_mask.proto\032\034google/proto" - + "buf/struct.proto\032\037google/protobuf/timest" - + "amp.proto\"\254\003\n\013NluSettings\022H\n\nmodel_type\030" - + "\001 \001(\01624.google.cloud.dialogflow.cx.v3.Nl" - + "uSettings.ModelType\022 \n\030classification_th" - + "reshold\030\003 \001(\002\022Y\n\023model_training_mode\030\004 \001" - + "(\0162<.google.cloud.dialogflow.cx.v3.NluSe" - + "ttings.ModelTrainingMode\"Y\n\tModelType\022\032\n" - + "\026MODEL_TYPE_UNSPECIFIED\020\000\022\027\n\023MODEL_TYPE_" - + "STANDARD\020\001\022\027\n\023MODEL_TYPE_ADVANCED\020\003\"{\n\021M" - + "odelTrainingMode\022#\n\037MODEL_TRAINING_MODE_" - + "UNSPECIFIED\020\000\022!\n\035MODEL_TRAINING_MODE_AUT" - + "OMATIC\020\001\022\036\n\032MODEL_TRAINING_MODE_MANUAL\020\002" - + "\"\327\003\n\004Flow\022\014\n\004name\030\001 \001(\t\022\032\n\014display_name\030" - + "\002 \001(\tB\004\342A\001\002\022\023\n\013description\030\003 \001(\t\022I\n\021tran" - + "sition_routes\030\004 \003(\0132..google.cloud.dialo" - + "gflow.cx.v3.TransitionRoute\022C\n\016event_han" - + "dlers\030\n \003(\0132+.google.cloud.dialogflow.cx" - + ".v3.EventHandler\022T\n\027transition_route_gro" - + "ups\030\017 \003(\tB3\372A0\n.dialogflow.googleapis.co" - + "m/TransitionRouteGroup\022@\n\014nlu_settings\030\013" - + " \001(\0132*.google.cloud.dialogflow.cx.v3.Nlu" - + "Settings:h\352Ae\n\036dialogflow.googleapis.com" - + "/Flow\022Cprojects/{project}/locations/{loc" - + "ation}/agents/{agent}/flows/{flow}\"\234\001\n\021C" - + "reateFlowRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A" - + " \022\036dialogflow.googleapis.com/Flow\0227\n\004flo" - + "w\030\002 \001(\0132#.google.cloud.dialogflow.cx.v3." - + "FlowB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"Y\n\021Del" - + "eteFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036d" - + "ialogflow.googleapis.com/Flow\022\r\n\005force\030\002" - + " \001(\010\"\211\001\n\020ListFlowsRequest\0227\n\006parent\030\001 \001(" - + "\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.com/Fl" - + "ow\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\022\025\n\rlanguage_code\030\004 \001(\t\"`\n\021ListFlowsRes" - + "ponse\0222\n\005flows\030\001 \003(\0132#.google.cloud.dial" - + "ogflow.cx.v3.Flow\022\027\n\017next_page_token\030\002 \001" - + "(\t\"^\n\016GetFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002" - + "\372A \n\036dialogflow.googleapis.com/Flow\022\025\n\rl" - + "anguage_code\030\002 \001(\t\"\224\001\n\021UpdateFlowRequest" - + "\0227\n\004flow\030\001 \001(\0132#.google.cloud.dialogflow" - + ".cx.v3.FlowB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032" - + ".google.protobuf.FieldMask\022\025\n\rlanguage_c" - + "ode\030\003 \001(\t\"I\n\020TrainFlowRequest\0225\n\004name\030\001 " - + "\001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com/" - + "Flow\"c\n\023ValidateFlowRequest\0225\n\004name\030\001 \001(" - + "\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com/Fl" - + "ow\022\025\n\rlanguage_code\030\002 \001(\t\"~\n\036GetFlowVali" - + "dationResultRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372" - + "A0\n.dialogflow.googleapis.com/FlowValida" - + "tionResult\022\025\n\rlanguage_code\030\002 \001(\t\"\261\002\n\024Fl" - + "owValidationResult\022\014\n\004name\030\001 \001(\t\022M\n\023vali" - + "dation_messages\030\002 \003(\01320.google.cloud.dia" - + "logflow.cx.v3.ValidationMessage\022/\n\013updat" - + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + ":\212\001\352A\206\001\n.dialogflow.googleapis.com/FlowV" - + "alidationResult\022Tprojects/{project}/loca" - + "tions/{location}/agents/{agent}/flows/{f" - + "low}/validationResult\"\235\002\n\021ImportFlowRequ" - + "est\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow" - + ".googleapis.com/Flow\022\022\n\010flow_uri\030\002 \001(\tH\000" - + "\022\026\n\014flow_content\030\003 \001(\014H\000\022T\n\rimport_optio" - + "n\030\004 \001(\0162=.google.cloud.dialogflow.cx.v3." - + "ImportFlowRequest.ImportOption\"E\n\014Import" - + "Option\022\035\n\031IMPORT_OPTION_UNSPECIFIED\020\000\022\010\n" - + "\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\006\n\004flow\"G\n\022ImportF" - + "lowResponse\0221\n\004flow\030\001 \001(\tB#\372A \n\036dialogfl" - + "ow.googleapis.com/Flow\"\212\001\n\021ExportFlowReq" - + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow." - + "googleapis.com/Flow\022\026\n\010flow_uri\030\002 \001(\tB\004\342" - + "A\001\001\022&\n\030include_referenced_flows\030\004 \001(\010B\004\342" - + "A\001\001\"H\n\022ExportFlowResponse\022\022\n\010flow_uri\030\001 " - + "\001(\tH\000\022\026\n\014flow_content\030\002 \001(\014H\000B\006\n\004flow2\230\020" - + "\n\005Flows\022\263\001\n\nCreateFlow\0220.google.cloud.di" - + "alogflow.cx.v3.CreateFlowRequest\032#.googl" - + "e.cloud.dialogflow.cx.v3.Flow\"N\332A\013parent" - + ",flow\202\323\344\223\002:\"2/v3/{parent=projects/*/loca" - + "tions/*/agents/*}/flows:\004flow\022\231\001\n\nDelete" - + "Flow\0220.google.cloud.dialogflow.cx.v3.Del" - + "eteFlowRequest\032\026.google.protobuf.Empty\"A" - + "\332A\004name\202\323\344\223\0024*2/v3/{name=projects/*/loca" - + "tions/*/agents/*/flows/*}\022\263\001\n\tListFlows\022" - + "/.google.cloud.dialogflow.cx.v3.ListFlow" - + "sRequest\0320.google.cloud.dialogflow.cx.v3" - + ".ListFlowsResponse\"C\332A\006parent\202\323\344\223\0024\0222/v3" - + "/{parent=projects/*/locations/*/agents/*" - + "}/flows\022\240\001\n\007GetFlow\022-.google.cloud.dialo" - + "gflow.cx.v3.GetFlowRequest\032#.google.clou" - + "d.dialogflow.cx.v3.Flow\"A\332A\004name\202\323\344\223\0024\0222" + + "o\032\031google/api/resource.proto\0323google/clo" + + "ud/dialogflow/cx/v3/import_strategy.prot" + + "o\032(google/cloud/dialogflow/cx/v3/page.pr" + + "oto\0326google/cloud/dialogflow/cx/v3/valid" + + "ation_message.proto\032#google/longrunning/" + + "operations.proto\032\033google/protobuf/empty." + + "proto\032 google/protobuf/field_mask.proto\032" + + "\034google/protobuf/struct.proto\032\037google/pr" + + "otobuf/timestamp.proto\"\254\003\n\013NluSettings\022H" + + "\n\nmodel_type\030\001 \001(\01624.google.cloud.dialog" + + "flow.cx.v3.NluSettings.ModelType\022 \n\030clas" + + "sification_threshold\030\003 \001(\002\022Y\n\023model_trai" + + "ning_mode\030\004 \001(\0162<.google.cloud.dialogflo" + + "w.cx.v3.NluSettings.ModelTrainingMode\"Y\n" + + "\tModelType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\027" + + "\n\023MODEL_TYPE_STANDARD\020\001\022\027\n\023MODEL_TYPE_AD" + + "VANCED\020\003\"{\n\021ModelTrainingMode\022#\n\037MODEL_T" + + "RAINING_MODE_UNSPECIFIED\020\000\022!\n\035MODEL_TRAI" + + "NING_MODE_AUTOMATIC\020\001\022\036\n\032MODEL_TRAINING_" + + "MODE_MANUAL\020\002\"\276\004\n\004Flow\022\014\n\004name\030\001 \001(\t\022\032\n\014" + + "display_name\030\002 \001(\tB\004\342A\001\002\022\023\n\013description\030" + + "\003 \001(\t\022I\n\021transition_routes\030\004 \003(\0132..googl" + + "e.cloud.dialogflow.cx.v3.TransitionRoute" + + "\022C\n\016event_handlers\030\n \003(\0132+.google.cloud." + + "dialogflow.cx.v3.EventHandler\022T\n\027transit" + + "ion_route_groups\030\017 \003(\tB3\372A0\n.dialogflow." + + "googleapis.com/TransitionRouteGroup\022@\n\014n" + + "lu_settings\030\013 \001(\0132*.google.cloud.dialogf" + + "low.cx.v3.NluSettings\022e\n\034knowledge_conne" + + "ctor_settings\030\022 \001(\01329.google.cloud.dialo" + + "gflow.cx.v3.KnowledgeConnectorSettingsB\004" + + "\342A\001\001:h\352Ae\n\036dialogflow.googleapis.com/Flo" + + "w\022Cprojects/{project}/locations/{locatio" + + "n}/agents/{agent}/flows/{flow}\"\234\001\n\021Creat" + + "eFlowRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036d" + + "ialogflow.googleapis.com/Flow\0227\n\004flow\030\002 " + + "\001(\0132#.google.cloud.dialogflow.cx.v3.Flow" + + "B\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"Y\n\021DeleteF" + + "lowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialo" + + "gflow.googleapis.com/Flow\022\r\n\005force\030\002 \001(\010" + + "\"\211\001\n\020ListFlowsRequest\0227\n\006parent\030\001 \001(\tB\'\342" + + "A\001\002\372A \022\036dialogflow.googleapis.com/Flow\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\025\n" + + "\rlanguage_code\030\004 \001(\t\"`\n\021ListFlowsRespons" + + "e\0222\n\005flows\030\001 \003(\0132#.google.cloud.dialogfl" + + "ow.cx.v3.Flow\022\027\n\017next_page_token\030\002 \001(\t\"^" + + "\n\016GetFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n" + + "\036dialogflow.googleapis.com/Flow\022\025\n\rlangu" + + "age_code\030\002 \001(\t\"\224\001\n\021UpdateFlowRequest\0227\n\004" + + "flow\030\001 \001(\0132#.google.cloud.dialogflow.cx." + + "v3.FlowB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.goo" + + "gle.protobuf.FieldMask\022\025\n\rlanguage_code\030" + + "\003 \001(\t\"I\n\020TrainFlowRequest\0225\n\004name\030\001 \001(\tB" + + "\'\342A\001\002\372A \n\036dialogflow.googleapis.com/Flow" + + "\"c\n\023ValidateFlowRequest\0225\n\004name\030\001 \001(\tB\'\342" + + "A\001\002\372A \n\036dialogflow.googleapis.com/Flow\022\025" + + "\n\rlanguage_code\030\002 \001(\t\"~\n\036GetFlowValidati" + + "onResultRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n." + + "dialogflow.googleapis.com/FlowValidation" + + "Result\022\025\n\rlanguage_code\030\002 \001(\t\"\261\002\n\024FlowVa" + + "lidationResult\022\014\n\004name\030\001 \001(\t\022M\n\023validati" + + "on_messages\030\002 \003(\01320.google.cloud.dialogf" + + "low.cx.v3.ValidationMessage\022/\n\013update_ti" + + "me\030\003 \001(\0132\032.google.protobuf.Timestamp:\212\001\352" + + "A\206\001\n.dialogflow.googleapis.com/FlowValid" + + "ationResult\022Tprojects/{project}/location" + + "s/{location}/agents/{agent}/flows/{flow}" + + "/validationResult\"\364\002\n\021ImportFlowRequest\022" + + "7\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.goo" + + "gleapis.com/Flow\022\022\n\010flow_uri\030\002 \001(\tH\000\022\026\n\014" + + "flow_content\030\003 \001(\014H\000\022T\n\rimport_option\030\004 " + + "\001(\0162=.google.cloud.dialogflow.cx.v3.Impo" + + "rtFlowRequest.ImportOption\022U\n\024flow_impor" + + "t_strategy\030\005 \001(\01321.google.cloud.dialogfl" + + "ow.cx.v3.FlowImportStrategyB\004\342A\001\001\"E\n\014Imp" + + "ortOption\022\035\n\031IMPORT_OPTION_UNSPECIFIED\020\000" + + "\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\006\n\004flow\"i\n\022Flow" + + "ImportStrategy\022S\n\026global_import_strategy" + + "\030\001 \001(\0162-.google.cloud.dialogflow.cx.v3.I" + + "mportStrategyB\004\342A\001\001\"G\n\022ImportFlowRespons" + + "e\0221\n\004flow\030\001 \001(\tB#\372A \n\036dialogflow.googlea" + + "pis.com/Flow\"\212\001\n\021ExportFlowRequest\0225\n\004na" + + "me\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis" + + ".com/Flow\022\026\n\010flow_uri\030\002 \001(\tB\004\342A\001\001\022&\n\030inc" + + "lude_referenced_flows\030\004 \001(\010B\004\342A\001\001\"H\n\022Exp" + + "ortFlowResponse\022\022\n\010flow_uri\030\001 \001(\tH\000\022\026\n\014f" + + "low_content\030\002 \001(\014H\000B\006\n\004flow2\230\020\n\005Flows\022\263\001" + + "\n\nCreateFlow\0220.google.cloud.dialogflow.c" + + "x.v3.CreateFlowRequest\032#.google.cloud.di" + + "alogflow.cx.v3.Flow\"N\332A\013parent,flow\202\323\344\223\002" + + ":\"2/v3/{parent=projects/*/locations/*/ag" + + "ents/*}/flows:\004flow\022\231\001\n\nDeleteFlow\0220.goo" + + "gle.cloud.dialogflow.cx.v3.DeleteFlowReq" + + "uest\032\026.google.protobuf.Empty\"A\332A\004name\202\323\344" + + "\223\0024*2/v3/{name=projects/*/locations/*/ag" + + "ents/*/flows/*}\022\263\001\n\tListFlows\022/.google.c" + + "loud.dialogflow.cx.v3.ListFlowsRequest\0320" + + ".google.cloud.dialogflow.cx.v3.ListFlows" + + "Response\"C\332A\006parent\202\323\344\223\0024\0222/v3/{parent=p" + + "rojects/*/locations/*/agents/*}/flows\022\240\001" + + "\n\007GetFlow\022-.google.cloud.dialogflow.cx.v" + + "3.GetFlowRequest\032#.google.cloud.dialogfl" + + "ow.cx.v3.Flow\"A\332A\004name\202\323\344\223\0024\0222/v3/{name=" + + "projects/*/locations/*/agents/*/flows/*}" + + "\022\275\001\n\nUpdateFlow\0220.google.cloud.dialogflo" + + "w.cx.v3.UpdateFlowRequest\032#.google.cloud" + + ".dialogflow.cx.v3.Flow\"X\332A\020flow,update_m" + + "ask\202\323\344\223\002?27/v3/{flow.name=projects/*/loc" + + "ations/*/agents/*/flows/*}:\004flow\022\331\001\n\tTra" + + "inFlow\022/.google.cloud.dialogflow.cx.v3.T" + + "rainFlowRequest\032\035.google.longrunning.Ope" + + "ration\"|\312A/\n\025google.protobuf.Empty\022\026goog" + + "le.protobuf.Struct\332A\004name\202\323\344\223\002=\"8/v3/{na" + + "me=projects/*/locations/*/agents/*/flows" + + "/*}:train:\001*\022\277\001\n\014ValidateFlow\0222.google.c" + + "loud.dialogflow.cx.v3.ValidateFlowReques" + + "t\0323.google.cloud.dialogflow.cx.v3.FlowVa" + + "lidationResult\"F\202\323\344\223\002@\";/v3/{name=projec" + + "ts/*/locations/*/agents/*/flows/*}:valid" + + "ate:\001*\022\341\001\n\027GetFlowValidationResult\022=.goo" + + "gle.cloud.dialogflow.cx.v3.GetFlowValida" + + "tionResultRequest\0323.google.cloud.dialogf" + + "low.cx.v3.FlowValidationResult\"R\332A\004name\202" + + "\323\344\223\002E\022C/v3/{name=projects/*/locations/*/" + + "agents/*/flows/*/validationResult}\022\322\001\n\nI" + + "mportFlow\0220.google.cloud.dialogflow.cx.v" + + "3.ImportFlowRequest\032\035.google.longrunning" + + ".Operation\"s\312A,\n\022ImportFlowResponse\022\026goo" + + "gle.protobuf.Struct\202\323\344\223\002>\"9/v3/{parent=p" + + "rojects/*/locations/*/agents/*}/flows:im" + + "port:\001*\022\322\001\n\nExportFlow\0220.google.cloud.di" + + "alogflow.cx.v3.ExportFlowRequest\032\035.googl" + + "e.longrunning.Operation\"s\312A,\n\022ExportFlow" + + "Response\022\026google.protobuf.Struct\202\323\344\223\002>\"9" + "/v3/{name=projects/*/locations/*/agents/" - + "*/flows/*}\022\275\001\n\nUpdateFlow\0220.google.cloud" - + ".dialogflow.cx.v3.UpdateFlowRequest\032#.go" - + "ogle.cloud.dialogflow.cx.v3.Flow\"X\332A\020flo" - + "w,update_mask\202\323\344\223\002?27/v3/{flow.name=proj" - + "ects/*/locations/*/agents/*/flows/*}:\004fl" - + "ow\022\331\001\n\tTrainFlow\022/.google.cloud.dialogfl" - + "ow.cx.v3.TrainFlowRequest\032\035.google.longr" - + "unning.Operation\"|\312A/\n\025google.protobuf.E" - + "mpty\022\026google.protobuf.Struct\332A\004name\202\323\344\223\002" - + "=\"8/v3/{name=projects/*/locations/*/agen" - + "ts/*/flows/*}:train:\001*\022\277\001\n\014ValidateFlow\022" - + "2.google.cloud.dialogflow.cx.v3.Validate" - + "FlowRequest\0323.google.cloud.dialogflow.cx" - + ".v3.FlowValidationResult\"F\202\323\344\223\002@\";/v3/{n" - + "ame=projects/*/locations/*/agents/*/flow" - + "s/*}:validate:\001*\022\341\001\n\027GetFlowValidationRe" - + "sult\022=.google.cloud.dialogflow.cx.v3.Get" - + "FlowValidationResultRequest\0323.google.clo" - + "ud.dialogflow.cx.v3.FlowValidationResult" - + "\"R\332A\004name\202\323\344\223\002E\022C/v3/{name=projects/*/lo" - + "cations/*/agents/*/flows/*/validationRes" - + "ult}\022\322\001\n\nImportFlow\0220.google.cloud.dialo" - + "gflow.cx.v3.ImportFlowRequest\032\035.google.l" - + "ongrunning.Operation\"s\312A,\n\022ImportFlowRes" - + "ponse\022\026google.protobuf.Struct\202\323\344\223\002>\"9/v3" - + "/{parent=projects/*/locations/*/agents/*" - + "}/flows:import:\001*\022\322\001\n\nExportFlow\0220.googl" - + "e.cloud.dialogflow.cx.v3.ExportFlowReque" - + "st\032\035.google.longrunning.Operation\"s\312A,\n\022" - + "ExportFlowResponse\022\026google.protobuf.Stru" - + "ct\202\323\344\223\002>\"9/v3/{name=projects/*/locations" - + "/*/agents/*/flows/*}:export:\001*\032x\312A\031dialo" - + "gflow.googleapis.com\322AYhttps://www.googl" - + "eapis.com/auth/cloud-platform,https://ww" - + "w.googleapis.com/auth/dialogflowB\257\001\n!com" - + ".google.cloud.dialogflow.cx.v3B\tFlowProt" - + "oP\001Z1cloud.google.com/go/dialogflow/cx/a" - + "piv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Di" - + "alogflow.Cx.V3\352\002!Google::Cloud::Dialogfl" - + "ow::CX::V3b\006proto3" + + "*/flows/*}:export:\001*\032x\312A\031dialogflow.goog" + + "leapis.com\322AYhttps://www.googleapis.com/" + + "auth/cloud-platform,https://www.googleap" + + "is.com/auth/dialogflowB\257\001\n!com.google.cl" + + "oud.dialogflow.cx.v3B\tFlowProtoP\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" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -248,6 +261,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), @@ -277,6 +291,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventHandlers", "TransitionRouteGroups", "NluSettings", + "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3_CreateFlowRequest_descriptor = getDescriptor().getMessageTypes().get(2); @@ -364,10 +379,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ImportFlowRequest_descriptor, new java.lang.String[] { - "Parent", "FlowUri", "FlowContent", "ImportOption", "Flow", + "Parent", "FlowUri", "FlowContent", "ImportOption", "FlowImportStrategy", "Flow", }); - internal_static_google_cloud_dialogflow_cx_v3_ImportFlowResponse_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_FlowImportStrategy_descriptor, + new java.lang.String[] { + "GlobalImportStrategy", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportFlowResponse_descriptor = + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3_ImportFlowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ImportFlowResponse_descriptor, @@ -375,7 +398,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Flow", }); internal_static_google_cloud_dialogflow_cx_v3_ExportFlowRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3_ExportFlowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ExportFlowRequest_descriptor, @@ -383,7 +406,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "FlowUri", "IncludeReferencedFlows", }); internal_static_google_cloud_dialogflow_cx_v3_ExportFlowResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3_ExportFlowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ExportFlowResponse_descriptor, @@ -406,6 +429,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java new file mode 100644 index 000000000000..c31d74c8bd2c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java @@ -0,0 +1,5650 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Settings for Generative AI.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings} + */ +public final class GenerativeSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings) + GenerativeSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerativeSettings.newBuilder() to construct. + private GenerativeSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerativeSettings() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerativeSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder.class); + } + + public interface FallbackSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + java.lang.String getSelectedPrompt(); + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + com.google.protobuf.ByteString getSelectedPromptBytes(); + + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate> + getPromptTemplatesList(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + getPromptTemplates(int index); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + int getPromptTemplatesCount(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index); + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} + */ + public static final class FallbackSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + FallbackSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FallbackSettings.newBuilder() to construct. + private FallbackSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FallbackSettings() { + selectedPrompt_ = ""; + promptTemplates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FallbackSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder.class); + } + + public interface PromptTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + java.lang.String getPromptText(); + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + com.google.protobuf.ByteString getPromptTextBytes(); + + /** + * + * + *
+       * If the flag is true, the prompt is frozen and cannot be modified by
+       * users.
+       * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + boolean getFrozen(); + } + /** + * + * + *
+     * Prompt template.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} + */ + public static final class PromptTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + PromptTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use PromptTemplate.newBuilder() to construct. + private PromptTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromptTemplate() { + displayName_ = ""; + promptText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromptTemplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object promptText_ = ""; + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + @java.lang.Override + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + 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(); + promptText_ = s; + return s; + } + } + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FROZEN_FIELD_NUMBER = 3; + private boolean frozen_ = false; + /** + * + * + *
+       * If the flag is true, the prompt is frozen and cannot be modified by
+       * users.
+       * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + @java.lang.Override + public boolean getFrozen() { + return frozen_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_); + } + if (frozen_ != false) { + output.writeBool(3, frozen_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_); + } + if (frozen_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, frozen_); + } + 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.GenerativeSettings.FallbackSettings.PromptTemplate)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate other = + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getPromptText().equals(other.getPromptText())) return false; + if (getFrozen() != other.getFrozen()) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getPromptText().hashCode(); + hash = (37 * hash) + FROZEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFrozen()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings.PromptTemplate + 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; + } + /** + * + * + *
+       * Prompt template.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + promptText_ = ""; + frozen_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + build() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + buildPartial() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + result = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.promptText_ = promptText_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frozen_ = frozen_; + } + } + + @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.GenerativeSettings.FallbackSettings + .PromptTemplate) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPromptText().isEmpty()) { + promptText_ = other.promptText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFrozen() != false) { + setFrozen(other.getFrozen()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + promptText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + frozen_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 displayName_ = ""; + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object promptText_ = ""; + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promptText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @param value The promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearPromptText() { + promptText_ = getDefaultInstance().getPromptText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @param value The bytes for promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean frozen_; + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + @java.lang.Override + public boolean getFrozen() { + return frozen_; + } + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @param value The frozen to set. + * @return This builder for chaining. + */ + public Builder setFrozen(boolean value) { + + frozen_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @return This builder for chaining. + */ + public Builder clearFrozen() { + bitField0_ = (bitField0_ & ~0x00000004); + frozen_ = 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.GenerativeSettings.FallbackSettings.PromptTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + private static final com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate(); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromptTemplate 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.GenerativeSettings.FallbackSettings.PromptTemplate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SELECTED_PROMPT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object selectedPrompt_ = ""; + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + @java.lang.Override + public java.lang.String getSelectedPrompt() { + java.lang.Object ref = selectedPrompt_; + 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(); + selectedPrompt_ = s; + return s; + } + } + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectedPromptBytes() { + java.lang.Object ref = selectedPrompt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedPrompt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEMPLATES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate> + promptTemplates_; + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate> + getPromptTemplatesList() { + return promptTemplates_; + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList() { + return promptTemplates_; + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public int getPromptTemplatesCount() { + return promptTemplates_.size(); + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + getPromptTemplates(int index) { + return promptTemplates_.get(index); + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index) { + return promptTemplates_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedPrompt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, selectedPrompt_); + } + for (int i = 0; i < promptTemplates_.size(); i++) { + output.writeMessage(4, promptTemplates_.get(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(selectedPrompt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, selectedPrompt_); + } + for (int i = 0; i < promptTemplates_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, promptTemplates_.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.GenerativeSettings.FallbackSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings other = + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) obj; + + if (!getSelectedPrompt().equals(other.getSelectedPrompt())) return false; + if (!getPromptTemplatesList().equals(other.getPromptTemplatesList())) 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) + SELECTED_PROMPT_FIELD_NUMBER; + hash = (53 * hash) + getSelectedPrompt().hashCode(); + if (getPromptTemplatesCount() > 0) { + hash = (37 * hash) + PROMPT_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getPromptTemplatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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 Generative Fallback.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selectedPrompt_ = ""; + if (promptTemplatesBuilder_ == null) { + promptTemplates_ = java.util.Collections.emptyList(); + } else { + promptTemplates_ = null; + promptTemplatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings build() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result) { + if (promptTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + promptTemplates_ = java.util.Collections.unmodifiableList(promptTemplates_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.promptTemplates_ = promptTemplates_; + } else { + result.promptTemplates_ = promptTemplatesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selectedPrompt_ = selectedPrompt_; + } + } + + @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.GenerativeSettings.FallbackSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .getDefaultInstance()) return this; + if (!other.getSelectedPrompt().isEmpty()) { + selectedPrompt_ = other.selectedPrompt_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (promptTemplatesBuilder_ == null) { + if (!other.promptTemplates_.isEmpty()) { + if (promptTemplates_.isEmpty()) { + promptTemplates_ = other.promptTemplates_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePromptTemplatesIsMutable(); + promptTemplates_.addAll(other.promptTemplates_); + } + onChanged(); + } + } else { + if (!other.promptTemplates_.isEmpty()) { + if (promptTemplatesBuilder_.isEmpty()) { + promptTemplatesBuilder_.dispose(); + promptTemplatesBuilder_ = null; + promptTemplates_ = other.promptTemplates_; + bitField0_ = (bitField0_ & ~0x00000002); + promptTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPromptTemplatesFieldBuilder() + : null; + } else { + promptTemplatesBuilder_.addAllMessages(other.promptTemplates_); + } + } + } + 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 26: + { + selectedPrompt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate + m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.parser(), + extensionRegistry); + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(m); + } else { + promptTemplatesBuilder_.addMessage(m); + } + 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 selectedPrompt_ = ""; + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + public java.lang.String getSelectedPrompt() { + java.lang.Object ref = selectedPrompt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selectedPrompt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + public com.google.protobuf.ByteString getSelectedPromptBytes() { + java.lang.Object ref = selectedPrompt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedPrompt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @param value The selectedPrompt to set. + * @return This builder for chaining. + */ + public Builder setSelectedPrompt(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selectedPrompt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return This builder for chaining. + */ + public Builder clearSelectedPrompt() { + selectedPrompt_ = getDefaultInstance().getSelectedPrompt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @param value The bytes for selectedPrompt to set. + * @return This builder for chaining. + */ + public Builder setSelectedPromptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selectedPrompt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate> + promptTemplates_ = java.util.Collections.emptyList(); + + private void ensurePromptTemplatesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + promptTemplates_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate>(promptTemplates_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + promptTemplatesBuilder_; + + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate> + getPromptTemplatesList() { + if (promptTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(promptTemplates_); + } else { + return promptTemplatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public int getPromptTemplatesCount() { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.size(); + } else { + return promptTemplatesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + getPromptTemplates(int index) { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.get(index); + } else { + return promptTemplatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder setPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.set(index, value); + onChanged(); + } else { + promptTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder setPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(value); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(index, value); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addAllPromptTemplates( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate> + values) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTemplates_); + onChanged(); + } else { + promptTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder clearPromptTemplates() { + if (promptTemplatesBuilder_ == null) { + promptTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + promptTemplatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder removePromptTemplates(int index) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.remove(index); + onChanged(); + } else { + promptTemplatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + getPromptTemplatesBuilder(int index) { + return getPromptTemplatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index) { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.get(index); + } else { + return promptTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList() { + if (promptTemplatesBuilder_ != null) { + return promptTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(promptTemplates_); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + addPromptTemplatesBuilder() { + return getPromptTemplatesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .getDefaultInstance()); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + addPromptTemplatesBuilder(int index) { + return getPromptTemplatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .getDefaultInstance()); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder> + getPromptTemplatesBuilderList() { + return getPromptTemplatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesFieldBuilder() { + if (promptTemplatesBuilder_ == null) { + promptTemplatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder>( + promptTemplates_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + promptTemplates_ = null; + } + return promptTemplatesBuilder_; + } + + @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.GenerativeSettings.FallbackSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + private static final com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FallbackSettings 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.GenerativeSettings.FallbackSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KnowledgeConnectorSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The business. + */ + java.lang.String getBusiness(); + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + com.google.protobuf.ByteString getBusinessBytes(); + + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + java.lang.String getAgentIdentity(); + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + com.google.protobuf.ByteString getAgentIdentityBytes(); + + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + java.lang.String getBusinessDescription(); + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + com.google.protobuf.ByteString getBusinessDescriptionBytes(); + + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + java.lang.String getAgentScope(); + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + com.google.protobuf.ByteString getAgentScopeBytes(); + } + /** + * + * + *
+   * Settings for knowledge connector. These parameters are used for LLM prompt
+   * like "You are <agent>. You are a helpful and verbose <agent_identity> at
+   * <business>, <business_description>. Your task is to help humans on
+   * <agent_scope>".
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} + */ + public static final class KnowledgeConnectorSettings + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + KnowledgeConnectorSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeConnectorSettings.newBuilder() to construct. + private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeConnectorSettings() { + business_ = ""; + agent_ = ""; + agentIdentity_ = ""; + businessDescription_ = ""; + agentScope_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeConnectorSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .Builder.class); + } + + public static final int BUSINESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object business_ = ""; + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The business. + */ + @java.lang.Override + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + 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(); + business_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object agent_ = ""; + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_IDENTITY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentIdentity_ = ""; + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + @java.lang.Override + public java.lang.String getAgentIdentity() { + java.lang.Object ref = agentIdentity_; + 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(); + agentIdentity_ = s; + return s; + } + } + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentIdentityBytes() { + java.lang.Object ref = agentIdentity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUSINESS_DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object businessDescription_ = ""; + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + @java.lang.Override + public java.lang.String getBusinessDescription() { + java.lang.Object ref = businessDescription_; + 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(); + businessDescription_ = s; + return s; + } + } + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBusinessDescriptionBytes() { + java.lang.Object ref = businessDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + businessDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_SCOPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentScope_ = ""; + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + @java.lang.Override + public java.lang.String getAgentScope() { + java.lang.Object ref = agentScope_; + 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(); + agentScope_ = s; + return s; + } + } + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentScopeBytes() { + java.lang.Object ref = agentScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentScope_ = 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(business_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, business_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentIdentity_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, businessDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_); + } + 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(business_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, business_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentIdentity_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, businessDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_); + } + 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.GenerativeSettings.KnowledgeConnectorSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings other = + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) obj; + + if (!getBusiness().equals(other.getBusiness())) return false; + if (!getAgent().equals(other.getAgent())) return false; + if (!getAgentIdentity().equals(other.getAgentIdentity())) return false; + if (!getBusinessDescription().equals(other.getBusinessDescription())) return false; + if (!getAgentScope().equals(other.getAgentScope())) 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) + BUSINESS_FIELD_NUMBER; + hash = (53 * hash) + getBusiness().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + AGENT_IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getAgentIdentity().hashCode(); + hash = (37 * hash) + BUSINESS_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getBusinessDescription().hashCode(); + hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getAgentScope().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings 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 knowledge connector. These parameters are used for LLM prompt
+     * like "You are <agent>. You are a helpful and verbose <agent_identity> at
+     * <business>, <business_description>. Your task is to help humans on
+     * <agent_scope>".
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + business_ = ""; + agent_ = ""; + agentIdentity_ = ""; + businessDescription_ = ""; + agentScope_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + build() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + buildPartial() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings result = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.business_ = business_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.agent_ = agent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.agentIdentity_ = agentIdentity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.businessDescription_ = businessDescription_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.agentScope_ = agentScope_; + } + } + + @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.GenerativeSettings.KnowledgeConnectorSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance()) return this; + if (!other.getBusiness().isEmpty()) { + business_ = other.business_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAgentIdentity().isEmpty()) { + agentIdentity_ = other.agentIdentity_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBusinessDescription().isEmpty()) { + businessDescription_ = other.businessDescription_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAgentScope().isEmpty()) { + agentScope_ = other.agentScope_; + bitField0_ |= 0x00000010; + 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: + { + business_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + agent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + agentIdentity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + businessDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + agentScope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object business_ = ""; + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return The business. + */ + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + business_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @param value The business to set. + * @return This builder for chaining. + */ + public Builder setBusiness(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return This builder for chaining. + */ + public Builder clearBusiness() { + business_ = getDefaultInstance().getBusiness(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @param value The bytes for business to set. + * @return This builder for chaining. + */ + public Builder setBusinessBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + agent_ = getDefaultInstance().getAgent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object agentIdentity_ = ""; + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + public java.lang.String getAgentIdentity() { + java.lang.Object ref = agentIdentity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentIdentity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + public com.google.protobuf.ByteString getAgentIdentityBytes() { + java.lang.Object ref = agentIdentity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @param value The agentIdentity to set. + * @return This builder for chaining. + */ + public Builder setAgentIdentity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return This builder for chaining. + */ + public Builder clearAgentIdentity() { + agentIdentity_ = getDefaultInstance().getAgentIdentity(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @param value The bytes for agentIdentity to set. + * @return This builder for chaining. + */ + public Builder setAgentIdentityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object businessDescription_ = ""; + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + public java.lang.String getBusinessDescription() { + java.lang.Object ref = businessDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + public com.google.protobuf.ByteString getBusinessDescriptionBytes() { + java.lang.Object ref = businessDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + businessDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @param value The businessDescription to set. + * @return This builder for chaining. + */ + public Builder setBusinessDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + businessDescription_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return This builder for chaining. + */ + public Builder clearBusinessDescription() { + businessDescription_ = getDefaultInstance().getBusinessDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @param value The bytes for businessDescription to set. + * @return This builder for chaining. + */ + public Builder setBusinessDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + businessDescription_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object agentScope_ = ""; + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + public java.lang.String getAgentScope() { + java.lang.Object ref = agentScope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentScope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + public com.google.protobuf.ByteString getAgentScopeBytes() { + java.lang.Object ref = agentScope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @param value The agentScope to set. + * @return This builder for chaining. + */ + public Builder setAgentScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentScope_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return This builder for chaining. + */ + public Builder clearAgentScope() { + agentScope_ = getDefaultInstance().getAgentScope(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @param value The bytes for agentScope to set. + * @return This builder for chaining. + */ + public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentScope_ = value; + bitField0_ |= 0x00000010; + 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.GenerativeSettings.KnowledgeConnectorSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + private static final com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .KnowledgeConnectorSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeConnectorSettings 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.GenerativeSettings.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FALLBACK_SETTINGS_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallbackSettings_; + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + @java.lang.Override + public boolean hasFallbackSettings() { + return fallbackSettings_ != null; + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + getFallbackSettings() { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.getDefaultInstance() + : fallbackSettings_; + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder() { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.getDefaultInstance() + : fallbackSettings_; + } + + public static final int GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.SafetySettings generativeSafetySettings_; + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return Whether the generativeSafetySettings field is set. + */ + @java.lang.Override + public boolean hasGenerativeSafetySettings() { + return generativeSafetySettings_ != null; + } + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return The generativeSafetySettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings getGenerativeSafetySettings() { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder + getGenerativeSafetySettingsOrBuilder() { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (fallbackSettings_ != null) { + output.writeMessage(1, getFallbackSettings()); + } + if (generativeSafetySettings_ != null) { + output.writeMessage(3, getGenerativeSafetySettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); + } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(7, getKnowledgeConnectorSettings()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fallbackSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFallbackSettings()); + } + if (generativeSafetySettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getGenerativeSafetySettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); + } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getKnowledgeConnectorSettings()); + } + 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.GenerativeSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GenerativeSettings other = + (com.google.cloud.dialogflow.cx.v3.GenerativeSettings) obj; + + if (!getName().equals(other.getName())) return false; + if (hasFallbackSettings() != other.hasFallbackSettings()) return false; + if (hasFallbackSettings()) { + if (!getFallbackSettings().equals(other.getFallbackSettings())) return false; + } + if (hasGenerativeSafetySettings() != other.hasGenerativeSafetySettings()) return false; + if (hasGenerativeSafetySettings()) { + if (!getGenerativeSafetySettings().equals(other.getGenerativeSafetySettings())) return false; + } + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasFallbackSettings()) { + hash = (37 * hash) + FALLBACK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getFallbackSettings().hashCode(); + } + if (hasGenerativeSafetySettings()) { + hash = (37 * hash) + GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenerativeSafetySettings().hashCode(); + } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings 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.GenerativeSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings 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.GenerativeSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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 Generative AI.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings) + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.class, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GenerativeSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + fallbackSettings_ = null; + if (fallbackSettingsBuilder_ != null) { + fallbackSettingsBuilder_.dispose(); + fallbackSettingsBuilder_ = null; + } + generativeSafetySettings_ = null; + if (generativeSafetySettingsBuilder_ != null) { + generativeSafetySettingsBuilder_.dispose(); + generativeSafetySettingsBuilder_ = null; + } + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings build() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.GenerativeSettings result = + new com.google.cloud.dialogflow.cx.v3.GenerativeSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GenerativeSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fallbackSettings_ = + fallbackSettingsBuilder_ == null ? fallbackSettings_ : fallbackSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.generativeSafetySettings_ = + generativeSafetySettingsBuilder_ == null + ? generativeSafetySettings_ + : generativeSafetySettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.GenerativeSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GenerativeSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GenerativeSettings other) { + if (other == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFallbackSettings()) { + mergeFallbackSettings(other.getFallbackSettings()); + } + if (other.hasGenerativeSafetySettings()) { + mergeGenerativeSafetySettings(other.getGenerativeSafetySettings()); + } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getFallbackSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 26: + { + input.readMessage( + getGenerativeSafetySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 58: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 58 + 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 name_ = ""; + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallbackSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder> + fallbackSettingsBuilder_; + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + public boolean hasFallbackSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + getFallbackSettings() { + if (fallbackSettingsBuilder_ == null) { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } else { + return fallbackSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder setFallbackSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings value) { + if (fallbackSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fallbackSettings_ = value; + } else { + fallbackSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder setFallbackSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder + builderForValue) { + if (fallbackSettingsBuilder_ == null) { + fallbackSettings_ = builderForValue.build(); + } else { + fallbackSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder mergeFallbackSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings value) { + if (fallbackSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fallbackSettings_ != null + && fallbackSettings_ + != com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .getDefaultInstance()) { + getFallbackSettingsBuilder().mergeFrom(value); + } else { + fallbackSettings_ = value; + } + } else { + fallbackSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder clearFallbackSettings() { + bitField0_ = (bitField0_ & ~0x00000002); + fallbackSettings_ = null; + if (fallbackSettingsBuilder_ != null) { + fallbackSettingsBuilder_.dispose(); + fallbackSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder + getFallbackSettingsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFallbackSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder() { + if (fallbackSettingsBuilder_ != null) { + return fallbackSettingsBuilder_.getMessageOrBuilder(); + } else { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder> + getFallbackSettingsFieldBuilder() { + if (fallbackSettingsBuilder_ == null) { + fallbackSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder>( + getFallbackSettings(), getParentForChildren(), isClean()); + fallbackSettings_ = null; + } + return fallbackSettingsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.SafetySettings generativeSafetySettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder> + generativeSafetySettingsBuilder_; + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return Whether the generativeSafetySettings field is set. + */ + public boolean hasGenerativeSafetySettings() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return The generativeSafetySettings. + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings getGenerativeSafetySettings() { + if (generativeSafetySettingsBuilder_ == null) { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } else { + return generativeSafetySettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public Builder setGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings value) { + if (generativeSafetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generativeSafetySettings_ = value; + } else { + generativeSafetySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public Builder setGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder builderForValue) { + if (generativeSafetySettingsBuilder_ == null) { + generativeSafetySettings_ = builderForValue.build(); + } else { + generativeSafetySettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public Builder mergeGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings value) { + if (generativeSafetySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && generativeSafetySettings_ != null + && generativeSafetySettings_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()) { + getGenerativeSafetySettingsBuilder().mergeFrom(value); + } else { + generativeSafetySettings_ = value; + } + } else { + generativeSafetySettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public Builder clearGenerativeSafetySettings() { + bitField0_ = (bitField0_ & ~0x00000004); + generativeSafetySettings_ = null; + if (generativeSafetySettingsBuilder_ != null) { + generativeSafetySettingsBuilder_.dispose(); + generativeSafetySettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder + getGenerativeSafetySettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGenerativeSafetySettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder + getGenerativeSafetySettingsOrBuilder() { + if (generativeSafetySettingsBuilder_ != null) { + return generativeSafetySettingsBuilder_.getMessageOrBuilder(); + } else { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder> + getGenerativeSafetySettingsFieldBuilder() { + if (generativeSafetySettingsBuilder_ == null) { + generativeSafetySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder>( + getGenerativeSafetySettings(), getParentForChildren(), isClean()); + generativeSafetySettings_ = null; + } + return generativeSafetySettingsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder + builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000008); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + .Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000010; + 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.GenerativeSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GenerativeSettings) + private static final com.google.cloud.dialogflow.cx.v3.GenerativeSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GenerativeSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerativeSettings 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.GenerativeSettings 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/GenerativeSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java new file mode 100644 index 000000000000..c70a4c2f3c75 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java @@ -0,0 +1,194 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GenerativeSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + boolean hasFallbackSettings(); + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings getFallbackSettings(); + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return Whether the generativeSafetySettings field is set. + */ + boolean hasGenerativeSafetySettings(); + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * + * @return The generativeSafetySettings. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings getGenerativeSafetySettings(); + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder getGenerativeSafetySettingsOrBuilder(); + + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); + + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java new file mode 100644 index 000000000000..e7eddfeb95f6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java @@ -0,0 +1,145 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class GenerativeSettingsProto { + private GenerativeSettingsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/dialogflow/cx/v3/generati" + + "ve_settings.proto\022\035google.cloud.dialogfl" + + "ow.cx.v3\032\031google/api/resource.proto\0323goo" + + "gle/cloud/dialogflow/cx/v3/safety_settin" + + "gs.proto\"\326\006\n\022GenerativeSettings\022\014\n\004name\030" + + "\005 \001(\t\022]\n\021fallback_settings\030\001 \001(\0132B.googl" + + "e.cloud.dialogflow.cx.v3.GenerativeSetti" + + "ngs.FallbackSettings\022Q\n\032generative_safet" + + "y_settings\030\003 \001(\0132-.google.cloud.dialogfl" + + "ow.cx.v3.SafetySettings\022r\n\034knowledge_con" + + "nector_settings\030\007 \001(\0132L.google.cloud.dia" + + "logflow.cx.v3.GenerativeSettings.Knowled" + + "geConnectorSettings\022\025\n\rlanguage_code\030\004 \001" + + "(\t\032\345\001\n\020FallbackSettings\022\027\n\017selected_prom" + + "pt\030\003 \001(\t\022k\n\020prompt_templates\030\004 \003(\0132Q.goo" + + "gle.cloud.dialogflow.cx.v3.GenerativeSet" + + "tings.FallbackSettings.PromptTemplate\032K\n" + + "\016PromptTemplate\022\024\n\014display_name\030\001 \001(\t\022\023\n" + + "\013prompt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\210\001\n\032K" + + "nowledgeConnectorSettings\022\020\n\010business\030\001 " + + "\001(\t\022\r\n\005agent\030\002 \001(\t\022\026\n\016agent_identity\030\003 \001" + + "(\t\022\034\n\024business_description\030\004 \001(\t\022\023\n\013agen" + + "t_scope\030\005 \001(\t:\201\001\352A~\n1dialogflow.googleap" + + "is.com/AgentGenerativeSettings\022Iprojects" + + "/{project}/locations/{location}/agents/{" + + "agent}/generativeSettingsB\231\001\n!com.google" + + ".cloud.dialogflow.cx.v3B\027GenerativeSetti" + + "ngsProtoP\001Z1cloud.google.com/go/dialogfl" + + "ow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.C" + + "loud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.SafetySettingsProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor, + new java.lang.String[] { + "Name", + "FallbackSettings", + "GenerativeSafetySettings", + "KnowledgeConnectorSettings", + "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor, + new java.lang.String[] { + "SelectedPrompt", "PromptTemplates", + }); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor, + new java.lang.String[] { + "DisplayName", "PromptText", "Frozen", + }); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor, + new java.lang.String[] { + "Business", "Agent", "AgentIdentity", "BusinessDescription", "AgentScope", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.SafetySettingsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetGenerativeSettingsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetGenerativeSettingsRequest.java new file mode 100644 index 000000000000..0175049310fc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetGenerativeSettingsRequest.java @@ -0,0 +1,838 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Request for
+ * [GetGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.GetGenerativeSettings]
+ * RPC.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest} + */ +public final class GetGenerativeSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) + GetGenerativeSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGenerativeSettingsRequest.newBuilder() to construct. + private GetGenerativeSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGenerativeSettingsRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGenerativeSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_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_GetGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + 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.GetGenerativeSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest other = + (com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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; + } + /** + * + * + *
+   * Request for
+   * [GetGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.GetGenerativeSettings]
+   * RPC.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetGenerativeSettingsRequest_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_GetGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + languageCode_ = ""; + 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_GetGenerativeSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest build() { + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest result = + new com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.GetGenerativeSettingsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + languageCode_ = 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = 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.GetGenerativeSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest + 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/GetGenerativeSettingsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetGenerativeSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..c65cbe8d0530 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetGenerativeSettingsRequestOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetGenerativeSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequest.java index f73919a2d6c7..7a959044bfbf 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequest.java @@ -76,7 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -104,7 +106,9 @@ public java.lang.String getName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -579,7 +583,9 @@ public Builder mergeFrom( * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -606,7 +612,9 @@ public java.lang.String getName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -633,7 +641,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -659,7 +669,9 @@ public Builder setName(java.lang.String value) { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -681,7 +693,9 @@ public Builder clearName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequestOrBuilder.java index ac23ce118f6e..e754f2cdf0c3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface GetTransitionRouteGroupRequestOrBuilder * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -47,7 +49,9 @@ public interface GetTransitionRouteGroupRequestOrBuilder * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequest.java index c0d99b04b3b7..7d2a2478a4c3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequest.java @@ -503,6 +503,66 @@ public com.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption getImpor : result; } + public static final int FLOW_IMPORT_STRATEGY_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3.FlowImportStrategy flowImportStrategy_; + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + @java.lang.Override + public boolean hasFlowImportStrategy() { + return flowImportStrategy_ != null; + } + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy getFlowImportStrategy() { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder + getFlowImportStrategyOrBuilder() { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -532,6 +592,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, importOption_); } + if (flowImportStrategy_ != null) { + output.writeMessage(5, getFlowImportStrategy()); + } getUnknownFields().writeTo(output); } @@ -558,6 +621,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, importOption_); } + if (flowImportStrategy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFlowImportStrategy()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -576,6 +642,10 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (importOption_ != other.importOption_) return false; + if (hasFlowImportStrategy() != other.hasFlowImportStrategy()) return false; + if (hasFlowImportStrategy()) { + if (!getFlowImportStrategy().equals(other.getFlowImportStrategy())) return false; + } if (!getFlowCase().equals(other.getFlowCase())) return false; switch (flowCase_) { case 2: @@ -602,6 +672,10 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + IMPORT_OPTION_FIELD_NUMBER; hash = (53 * hash) + importOption_; + if (hasFlowImportStrategy()) { + hash = (37 * hash) + FLOW_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getFlowImportStrategy().hashCode(); + } switch (flowCase_) { case 2: hash = (37 * hash) + FLOW_URI_FIELD_NUMBER; @@ -756,6 +830,11 @@ public Builder clear() { bitField0_ = 0; parent_ = ""; importOption_ = 0; + flowImportStrategy_ = null; + if (flowImportStrategyBuilder_ != null) { + flowImportStrategyBuilder_.dispose(); + flowImportStrategyBuilder_ = null; + } flowCase_ = 0; flow_ = null; return this; @@ -801,6 +880,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ImportFlowRequest r if (((from_bitField0_ & 0x00000008) != 0)) { result.importOption_ = importOption_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.flowImportStrategy_ = + flowImportStrategyBuilder_ == null + ? flowImportStrategy_ + : flowImportStrategyBuilder_.build(); + } } private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.ImportFlowRequest result) { @@ -862,6 +947,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportFlowRequest oth if (other.importOption_ != 0) { setImportOptionValue(other.getImportOptionValue()); } + if (other.hasFlowImportStrategy()) { + mergeFlowImportStrategy(other.getFlowImportStrategy()); + } switch (other.getFlowCase()) { case FLOW_URI: { @@ -931,6 +1019,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 42: + { + input.readMessage( + getFlowImportStrategyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1432,6 +1527,222 @@ public Builder clearImportOption() { return this; } + private com.google.cloud.dialogflow.cx.v3.FlowImportStrategy flowImportStrategy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder> + flowImportStrategyBuilder_; + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + public boolean hasFlowImportStrategy() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy getFlowImportStrategy() { + if (flowImportStrategyBuilder_ == null) { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } else { + return flowImportStrategyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy value) { + if (flowImportStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + flowImportStrategy_ = value; + } else { + flowImportStrategyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder builderForValue) { + if (flowImportStrategyBuilder_ == null) { + flowImportStrategy_ = builderForValue.build(); + } else { + flowImportStrategyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy value) { + if (flowImportStrategyBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && flowImportStrategy_ != null + && flowImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance()) { + getFlowImportStrategyBuilder().mergeFrom(value); + } else { + flowImportStrategy_ = value; + } + } else { + flowImportStrategyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFlowImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000010); + flowImportStrategy_ = null; + if (flowImportStrategyBuilder_ != null) { + flowImportStrategyBuilder_.dispose(); + flowImportStrategyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder + getFlowImportStrategyBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getFlowImportStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder + getFlowImportStrategyOrBuilder() { + if (flowImportStrategyBuilder_ != null) { + return flowImportStrategyBuilder_.getMessageOrBuilder(); + } else { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder> + getFlowImportStrategyFieldBuilder() { + if (flowImportStrategyBuilder_ == null) { + flowImportStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder>( + getFlowImportStrategy(), getParentForChildren(), isClean()); + flowImportStrategy_ = null; + } + return flowImportStrategyBuilder_; + } + @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/ImportFlowRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequestOrBuilder.java index c993f33e714f..f9f6291d1c2f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportFlowRequestOrBuilder.java @@ -165,5 +165,49 @@ public interface ImportFlowRequestOrBuilder */ com.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption getImportOption(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + boolean hasFlowImportStrategy(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3.FlowImportStrategy getFlowImportStrategy(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.FlowImportStrategyOrBuilder getFlowImportStrategyOrBuilder(); + com.google.cloud.dialogflow.cx.v3.ImportFlowRequest.FlowCase getFlowCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategy.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategy.java new file mode 100644 index 000000000000..1c54823857fe --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategy.java @@ -0,0 +1,252 @@ +/* + * 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/import_strategy.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Import strategies for the conflict resolution of resources (i.e. intents,
+ * entities, and webhooks) with identical display names during import
+ * operations.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ImportStrategy} + */ +public enum ImportStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified. Treated as 'CREATE_NEW'.
+   * 
+ * + * IMPORT_STRATEGY_UNSPECIFIED = 0; + */ + IMPORT_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+   * Create a new resource with a numeric suffix appended to the end of the
+   * existing display name.
+   * 
+ * + * IMPORT_STRATEGY_CREATE_NEW = 1; + */ + IMPORT_STRATEGY_CREATE_NEW(1), + /** + * + * + *
+   * Replace existing resource with incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_REPLACE = 2; + */ + IMPORT_STRATEGY_REPLACE(2), + /** + * + * + *
+   * Keep existing resource and discard incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_KEEP = 3; + */ + IMPORT_STRATEGY_KEEP(3), + /** + * + * + *
+   * Combine existing and incoming resources when a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_MERGE = 4; + */ + IMPORT_STRATEGY_MERGE(4), + /** + * + * + *
+   * Throw error if a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_THROW_ERROR = 5; + */ + IMPORT_STRATEGY_THROW_ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified. Treated as 'CREATE_NEW'.
+   * 
+ * + * IMPORT_STRATEGY_UNSPECIFIED = 0; + */ + public static final int IMPORT_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Create a new resource with a numeric suffix appended to the end of the
+   * existing display name.
+   * 
+ * + * IMPORT_STRATEGY_CREATE_NEW = 1; + */ + public static final int IMPORT_STRATEGY_CREATE_NEW_VALUE = 1; + /** + * + * + *
+   * Replace existing resource with incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_REPLACE = 2; + */ + public static final int IMPORT_STRATEGY_REPLACE_VALUE = 2; + /** + * + * + *
+   * Keep existing resource and discard incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_KEEP = 3; + */ + public static final int IMPORT_STRATEGY_KEEP_VALUE = 3; + /** + * + * + *
+   * Combine existing and incoming resources when a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_MERGE = 4; + */ + public static final int IMPORT_STRATEGY_MERGE_VALUE = 4; + /** + * + * + *
+   * Throw error if a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_THROW_ERROR = 5; + */ + public static final int IMPORT_STRATEGY_THROW_ERROR_VALUE = 5; + + 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 ImportStrategy 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 ImportStrategy forNumber(int value) { + switch (value) { + case 0: + return IMPORT_STRATEGY_UNSPECIFIED; + case 1: + return IMPORT_STRATEGY_CREATE_NEW; + case 2: + return IMPORT_STRATEGY_REPLACE; + case 3: + return IMPORT_STRATEGY_KEEP; + case 4: + return IMPORT_STRATEGY_MERGE; + case 5: + return IMPORT_STRATEGY_THROW_ERROR; + 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 ImportStrategy findValueByNumber(int number) { + return ImportStrategy.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.ImportStrategyProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ImportStrategy[] VALUES = values(); + + public static ImportStrategy 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 ImportStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ImportStrategy) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategyProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategyProto.java new file mode 100644 index 000000000000..39234238ad51 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportStrategyProto.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/import_strategy.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class ImportStrategyProto { + private ImportStrategyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/dialogflow/cx/v3/import_s" + + "trategy.proto\022\035google.cloud.dialogflow.c" + + "x.v3*\304\001\n\016ImportStrategy\022\037\n\033IMPORT_STRATE" + + "GY_UNSPECIFIED\020\000\022\036\n\032IMPORT_STRATEGY_CREA" + + "TE_NEW\020\001\022\033\n\027IMPORT_STRATEGY_REPLACE\020\002\022\030\n" + + "\024IMPORT_STRATEGY_KEEP\020\003\022\031\n\025IMPORT_STRATE" + + "GY_MERGE\020\004\022\037\n\033IMPORT_STRATEGY_THROW_ERRO" + + "R\020\005B\225\001\n!com.google.cloud.dialogflow.cx.v" + + "3B\023ImportStrategyProtoP\001Z1cloud.google.c" + + "om/go/dialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002" + + "\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/KnowledgeConnectorSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/KnowledgeConnectorSettings.java new file mode 100644 index 000000000000..8c85c9aa632a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/KnowledgeConnectorSettings.java @@ -0,0 +1,2032 @@ +/* + * 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/page.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The Knowledge Connector settings for this page or flow.
+ * This includes information such as the attached Knowledge Bases, and the way
+ * to execute fulfillment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings} + */ +public final class KnowledgeConnectorSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) + KnowledgeConnectorSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeConnectorSettings.newBuilder() to construct. + private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeConnectorSettings() { + dataStoreConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeConnectorSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PageProto + .internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PageProto + .internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.class, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder.class); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TARGET_PAGE(4), + TARGET_FLOW(5), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 4: + return TARGET_PAGE; + case 5: + return TARGET_FLOW; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * + * + *
+   * Whether Knowledge Connector is enabled or not.
+   * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int TRIGGER_FULFILLMENT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Fulfillment triggerFulfillment_; + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + @java.lang.Override + public boolean hasTriggerFulfillment() { + return triggerFulfillment_ != null; + } + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Fulfillment getTriggerFulfillment() { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder() { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + + public static final int TARGET_PAGE_FIELD_NUMBER = 4; + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + public boolean hasTargetPage() { + return targetCase_ == 4; + } + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + public java.lang.String getTargetPage() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 4) { + target_ = s; + } + return s; + } + } + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + public com.google.protobuf.ByteString getTargetPageBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 4) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FLOW_FIELD_NUMBER = 5; + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + public boolean hasTargetFlow() { + return targetCase_ == 5; + } + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + public java.lang.String getTargetFlow() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 5) { + target_ = s; + } + return s; + } + } + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + public com.google.protobuf.ByteString getTargetFlowBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 5) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_STORE_CONNECTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + dataStoreConnections_; + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsList() { + return dataStoreConnections_; + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsOrBuilderList() { + return dataStoreConnections_; + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDataStoreConnectionsCount() { + return dataStoreConnections_.size(); + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections(int index) { + return dataStoreConnections_.get(index); + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + return dataStoreConnections_.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 { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (triggerFulfillment_ != null) { + output.writeMessage(3, getTriggerFulfillment()); + } + if (targetCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, target_); + } + if (targetCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + for (int i = 0; i < dataStoreConnections_.size(); i++) { + output.writeMessage(6, dataStoreConnections_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + if (triggerFulfillment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTriggerFulfillment()); + } + if (targetCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, target_); + } + if (targetCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + for (int i = 0; i < dataStoreConnections_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, dataStoreConnections_.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.KnowledgeConnectorSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings other = + (com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (hasTriggerFulfillment() != other.hasTriggerFulfillment()) return false; + if (hasTriggerFulfillment()) { + if (!getTriggerFulfillment().equals(other.getTriggerFulfillment())) return false; + } + if (!getDataStoreConnectionsList().equals(other.getDataStoreConnectionsList())) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 4: + if (!getTargetPage().equals(other.getTargetPage())) return false; + break; + case 5: + if (!getTargetFlow().equals(other.getTargetFlow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + if (hasTriggerFulfillment()) { + hash = (37 * hash) + TRIGGER_FULFILLMENT_FIELD_NUMBER; + hash = (53 * hash) + getTriggerFulfillment().hashCode(); + } + if (getDataStoreConnectionsCount() > 0) { + hash = (37 * hash) + DATA_STORE_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreConnectionsList().hashCode(); + } + switch (targetCase_) { + case 4: + hash = (37 * hash) + TARGET_PAGE_FIELD_NUMBER; + hash = (53 * hash) + getTargetPage().hashCode(); + break; + case 5: + hash = (37 * hash) + TARGET_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getTargetFlow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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 Knowledge Connector settings for this page or flow.
+   * This includes information such as the attached Knowledge Bases, and the way
+   * to execute fulfillment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PageProto + .internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PageProto + .internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.class, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + triggerFulfillment_ = null; + if (triggerFulfillmentBuilder_ != null) { + triggerFulfillmentBuilder_.dispose(); + triggerFulfillmentBuilder_ = null; + } + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + } else { + dataStoreConnections_ = null; + dataStoreConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PageProto + .internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings build() { + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings result = + new com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings result) { + if (dataStoreConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + dataStoreConnections_ = java.util.Collections.unmodifiableList(dataStoreConnections_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.dataStoreConnections_ = dataStoreConnections_; + } else { + result.dataStoreConnections_ = dataStoreConnectionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.triggerFulfillment_ = + triggerFulfillmentBuilder_ == null + ? triggerFulfillment_ + : triggerFulfillmentBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @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.KnowledgeConnectorSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance()) + return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.hasTriggerFulfillment()) { + mergeTriggerFulfillment(other.getTriggerFulfillment()); + } + if (dataStoreConnectionsBuilder_ == null) { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnections_.isEmpty()) { + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.addAll(other.dataStoreConnections_); + } + onChanged(); + } + } else { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnectionsBuilder_.isEmpty()) { + dataStoreConnectionsBuilder_.dispose(); + dataStoreConnectionsBuilder_ = null; + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000010); + dataStoreConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataStoreConnectionsFieldBuilder() + : null; + } else { + dataStoreConnectionsBuilder_.addAllMessages(other.dataStoreConnections_); + } + } + } + switch (other.getTargetCase()) { + case TARGET_PAGE: + { + targetCase_ = 4; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_FLOW: + { + targetCase_ = 5; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + input.readMessage( + getTriggerFulfillmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 4; + target_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 5; + target_ = s; + break; + } // case 42 + case 50: + { + com.google.cloud.dialogflow.cx.v3.DataStoreConnection m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.parser(), + extensionRegistry); + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(m); + } else { + dataStoreConnectionsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private boolean enabled_; + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Fulfillment triggerFulfillment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + triggerFulfillmentBuilder_; + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + public boolean hasTriggerFulfillment() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment getTriggerFulfillment() { + if (triggerFulfillmentBuilder_ == null) { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } else { + return triggerFulfillmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public Builder setTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (triggerFulfillmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + triggerFulfillment_ = value; + } else { + triggerFulfillmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public Builder setTriggerFulfillment( + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder builderForValue) { + if (triggerFulfillmentBuilder_ == null) { + triggerFulfillment_ = builderForValue.build(); + } else { + triggerFulfillmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public Builder mergeTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (triggerFulfillmentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && triggerFulfillment_ != null + && triggerFulfillment_ + != com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance()) { + getTriggerFulfillmentBuilder().mergeFrom(value); + } else { + triggerFulfillment_ = value; + } + } else { + triggerFulfillmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public Builder clearTriggerFulfillment() { + bitField0_ = (bitField0_ & ~0x00000002); + triggerFulfillment_ = null; + if (triggerFulfillmentBuilder_ != null) { + triggerFulfillmentBuilder_.dispose(); + triggerFulfillmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder getTriggerFulfillmentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTriggerFulfillmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder() { + if (triggerFulfillmentBuilder_ != null) { + return triggerFulfillmentBuilder_.getMessageOrBuilder(); + } else { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + getTriggerFulfillmentFieldBuilder() { + if (triggerFulfillmentBuilder_ == null) { + triggerFulfillmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder>( + getTriggerFulfillment(), getParentForChildren(), isClean()); + triggerFulfillment_ = null; + } + return triggerFulfillmentBuilder_; + } + + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + @java.lang.Override + public boolean hasTargetPage() { + return targetCase_ == 4; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + @java.lang.Override + public java.lang.String getTargetPage() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 4) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetPageBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 4) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The targetPage to set. + * @return This builder for chaining. + */ + public Builder setTargetPage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 4; + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetPage() { + if (targetCase_ == 4) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetPage to set. + * @return This builder for chaining. + */ + public Builder setTargetPageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 4; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + @java.lang.Override + public boolean hasTargetFlow() { + return targetCase_ == 5; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + @java.lang.Override + public java.lang.String getTargetFlow() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 5) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetFlowBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 5) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The targetFlow to set. + * @return This builder for chaining. + */ + public Builder setTargetFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 5; + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetFlow() { + if (targetCase_ == 5) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetFlow to set. + * @return This builder for chaining. + */ + public Builder setTargetFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 5; + target_ = value; + onChanged(); + return this; + } + + private java.util.List + dataStoreConnections_ = java.util.Collections.emptyList(); + + private void ensureDataStoreConnectionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + dataStoreConnections_ = + new java.util.ArrayList( + dataStoreConnections_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder> + dataStoreConnectionsBuilder_; + + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreConnectionsList() { + if (dataStoreConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } else { + return dataStoreConnectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDataStoreConnectionsCount() { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.size(); + } else { + return dataStoreConnectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections( + int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDataStoreConnections( + java.lang.Iterable + values) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreConnections_); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataStoreConnections() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + dataStoreConnectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDataStoreConnections(int index) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.remove(index); + onChanged(); + } else { + dataStoreConnectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + getDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreConnectionsOrBuilderList() { + if (dataStoreConnectionsBuilder_ != null) { + return dataStoreConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + addDataStoreConnectionsBuilder() { + return getDataStoreConnectionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + addDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreConnectionsBuilderList() { + return getDataStoreConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder> + getDataStoreConnectionsFieldBuilder() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder>( + dataStoreConnections_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + dataStoreConnections_ = null; + } + return dataStoreConnectionsBuilder_; + } + + @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.KnowledgeConnectorSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) + private static final com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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/KnowledgeConnectorSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/KnowledgeConnectorSettingsOrBuilder.java new file mode 100644 index 000000000000..69bfa629cb95 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/KnowledgeConnectorSettingsOrBuilder.java @@ -0,0 +1,243 @@ +/* + * 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/page.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface KnowledgeConnectorSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether Knowledge Connector is enabled or not.
+   * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + boolean hasTriggerFulfillment(); + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + com.google.cloud.dialogflow.cx.v3.Fulfillment getTriggerFulfillment(); + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder(); + + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + boolean hasTargetPage(); + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + java.lang.String getTargetPage(); + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + com.google.protobuf.ByteString getTargetPageBytes(); + + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + boolean hasTargetFlow(); + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + java.lang.String getTargetFlow(); + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + com.google.protobuf.ByteString getTargetFlowBytes(); + + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDataStoreConnectionsList(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections(int index); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDataStoreConnectionsCount(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDataStoreConnectionsOrBuilderList(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder getDataStoreConnectionsOrBuilder( + int index); + + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.TargetCase getTargetCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequest.java index 376387f6503c..1dc9e98e589d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequest.java @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -103,7 +104,8 @@ public java.lang.String getParent() { *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -699,7 +701,8 @@ public Builder mergeFrom( *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -725,7 +728,8 @@ public java.lang.String getParent() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -751,7 +755,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -776,7 +781,8 @@ public Builder setParent(java.lang.String value) { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -797,7 +803,8 @@ public Builder clearParent() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequestOrBuilder.java index 006fd2063143..32aa4190d1c0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequestOrBuilder.java @@ -29,7 +29,8 @@ public interface ListTransitionRouteGroupsRequestOrBuilder *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -45,7 +46,8 @@ public interface ListTransitionRouteGroupsRequestOrBuilder *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java index 7226425bae7e..8d7c5635debf 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java @@ -305,8 +305,10 @@ public com.google.cloud.dialogflow.cx.v3.FormOrBuilder getFormOrBuilder() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -316,7 +318,10 @@ public com.google.cloud.dialogflow.cx.v3.FormOrBuilder getFormOrBuilder() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -333,8 +338,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -344,7 +351,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -361,8 +371,10 @@ public int getTransitionRouteGroupsCount() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -372,7 +384,10 @@ public int getTransitionRouteGroupsCount() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -390,8 +405,10 @@ public java.lang.String getTransitionRouteGroups(int index) { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -401,7 +418,10 @@ public java.lang.String getTransitionRouteGroups(int index) {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -669,6 +689,64 @@ public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersO return eventHandlers_.get(index); } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; + private com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledgeConnectorSettings_; + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -705,6 +783,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 11, transitionRouteGroups_.getRaw(i)); } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(18, getKnowledgeConnectorSettings()); + } getUnknownFields().writeTo(output); } @@ -740,6 +821,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getKnowledgeConnectorSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -768,6 +854,11 @@ public boolean equals(final java.lang.Object obj) { if (!getTransitionRouteGroupsList().equals(other.getTransitionRouteGroupsList())) return false; if (!getTransitionRoutesList().equals(other.getTransitionRoutesList())) return false; if (!getEventHandlersList().equals(other.getEventHandlersList())) return false; + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -803,6 +894,10 @@ public int hashCode() { hash = (37 * hash) + EVENT_HANDLERS_FIELD_NUMBER; hash = (53 * hash) + getEventHandlersList().hashCode(); } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -984,6 +1079,11 @@ public Builder clear() { eventHandlersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } return this; } @@ -1059,6 +1159,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Page result) { transitionRouteGroups_.makeImmutable(); result.transitionRouteGroups_ = transitionRouteGroups_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } } @java.lang.Override @@ -1186,6 +1292,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { } } } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1271,6 +1380,13 @@ public Builder mergeFrom( transitionRouteGroups_.add(s); break; } // case 90 + case 146: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1921,8 +2037,10 @@ private void ensureTransitionRouteGroupsIsMutable() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -1932,7 +2050,10 @@ private void ensureTransitionRouteGroupsIsMutable() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -1951,8 +2072,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -1962,7 +2085,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -1980,8 +2106,10 @@ public int getTransitionRouteGroupsCount() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -1991,7 +2119,10 @@ public int getTransitionRouteGroupsCount() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2010,8 +2141,10 @@ public java.lang.String getTransitionRouteGroups(int index) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2021,7 +2154,10 @@ public java.lang.String getTransitionRouteGroups(int index) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2040,8 +2176,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2051,7 +2189,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2078,8 +2219,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2089,7 +2232,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2115,8 +2261,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2126,7 +2274,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2149,8 +2300,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2160,7 +2313,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2182,8 +2338,10 @@ public Builder clearTransitionRouteGroups() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2193,7 +2351,10 @@ public Builder clearTransitionRouteGroups() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -3332,6 +3493,216 @@ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBu return eventHandlersBuilder_; } + private com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + .getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + @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/PageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java index 29a5563f2729..b543863ba75e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java @@ -164,8 +164,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -175,7 +177,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -190,8 +195,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -201,7 +208,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -216,8 +226,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -227,7 +239,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -243,8 +258,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -254,7 +271,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -479,4 +499,46 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr * repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; */ com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersOrBuilder(int index); + + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java index 4139c5e263be..d4a77d4b116e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java @@ -75,6 +75,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_DeletePageRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_DeletePageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -88,101 +92,115 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\035google.cloud.dialogflow.cx.v3\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032/google/clo" - + "ud/dialogflow/cx/v3/fulfillment.proto\032\033g" - + "oogle/protobuf/empty.proto\032 google/proto" - + "buf/field_mask.proto\032\034google/protobuf/st" - + "ruct.proto\"\207\004\n\004Page\022\014\n\004name\030\001 \001(\t\022\032\n\014dis" - + "play_name\030\002 \001(\tB\004\342A\001\002\022E\n\021entry_fulfillme" - + "nt\030\007 \001(\0132*.google.cloud.dialogflow.cx.v3" - + ".Fulfillment\0221\n\004form\030\004 \001(\0132#.google.clou" - + "d.dialogflow.cx.v3.Form\022T\n\027transition_ro" - + "ute_groups\030\013 \003(\tB3\372A0\n.dialogflow.google" - + "apis.com/TransitionRouteGroup\022I\n\021transit" - + "ion_routes\030\t \003(\0132..google.cloud.dialogfl" - + "ow.cx.v3.TransitionRoute\022C\n\016event_handle" - + "rs\030\n \003(\0132+.google.cloud.dialogflow.cx.v3" - + ".EventHandler:u\352Ar\n\036dialogflow.googleapi" - + "s.com/Page\022Pprojects/{project}/locations" - + "/{location}/agents/{agent}/flows/{flow}/" - + "pages/{page}\"\247\004\n\004Form\022A\n\nparameters\030\001 \003(" - + "\0132-.google.cloud.dialogflow.cx.v3.Form.P" - + "arameter\032\333\003\n\tParameter\022\032\n\014display_name\030\001" - + " \001(\tB\004\342A\001\002\022\020\n\010required\030\002 \001(\010\022B\n\013entity_t" - + "ype\030\003 \001(\tB-\342A\001\002\372A&\n$dialogflow.googleapi" - + "s.com/EntityType\022\017\n\007is_list\030\004 \001(\010\022W\n\rfil" - + "l_behavior\030\007 \001(\0132:.google.cloud.dialogfl" - + "ow.cx.v3.Form.Parameter.FillBehaviorB\004\342A" - + "\001\002\022-\n\rdefault_value\030\t \001(\0132\026.google.proto" - + "buf.Value\022\016\n\006redact\030\013 \001(\010\032\262\001\n\014FillBehavi" - + "or\022T\n\032initial_prompt_fulfillment\030\003 \001(\0132*" - + ".google.cloud.dialogflow.cx.v3.Fulfillme" - + "ntB\004\342A\001\002\022L\n\027reprompt_event_handlers\030\005 \003(" - + "\0132+.google.cloud.dialogflow.cx.v3.EventH" - + "andler\"\202\002\n\014EventHandler\022\022\n\004name\030\006 \001(\tB\004\342" - + "A\001\003\022\023\n\005event\030\004 \001(\tB\004\342A\001\002\022G\n\023trigger_fulf" - + "illment\030\005 \001(\0132*.google.cloud.dialogflow." - + "cx.v3.Fulfillment\022:\n\013target_page\030\002 \001(\tB#" - + "\372A \n\036dialogflow.googleapis.com/PageH\000\022:\n" - + "\013target_flow\030\003 \001(\tB#\372A \n\036dialogflow.goog" - + "leapis.com/FlowH\000B\010\n\006target\"\272\002\n\017Transiti" - + "onRoute\022\022\n\004name\030\006 \001(\tB\004\342A\001\003\0225\n\006intent\030\001 " - + "\001(\tB%\372A\"\n dialogflow.googleapis.com/Inte" - + "nt\022\021\n\tcondition\030\002 \001(\t\022G\n\023trigger_fulfill" - + "ment\030\003 \001(\0132*.google.cloud.dialogflow.cx." - + "v3.Fulfillment\022:\n\013target_page\030\004 \001(\tB#\372A " - + "\n\036dialogflow.googleapis.com/PageH\000\022:\n\013ta" - + "rget_flow\030\005 \001(\tB#\372A \n\036dialogflow.googlea" - + "pis.com/FlowH\000B\010\n\006target\"\211\001\n\020ListPagesRe" - + "quest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogfl" - + "ow.googleapis.com/Page\022\025\n\rlanguage_code\030" - + "\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004" - + " \001(\t\"`\n\021ListPagesResponse\0222\n\005pages\030\001 \003(\013" - + "2#.google.cloud.dialogflow.cx.v3.Page\022\027\n" - + "\017next_page_token\030\002 \001(\t\"^\n\016GetPageRequest" - + "\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.goog" - + "leapis.com/Page\022\025\n\rlanguage_code\030\002 \001(\t\"\234" - + "\001\n\021CreatePageRequest\0227\n\006parent\030\001 \001(\tB\'\342A" - + "\001\002\372A \022\036dialogflow.googleapis.com/Page\0227\n" - + "\004page\030\002 \001(\0132#.google.cloud.dialogflow.cx" - + ".v3.PageB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\224\001" - + "\n\021UpdatePageRequest\0227\n\004page\030\001 \001(\0132#.goog" - + "le.cloud.dialogflow.cx.v3.PageB\004\342A\001\002\022\025\n\r" - + "language_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\013" - + "2\032.google.protobuf.FieldMask\"Y\n\021DeletePa" - + "geRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialog" - + "flow.googleapis.com/Page\022\r\n\005force\030\002 \001(\0102" - + "\224\010\n\005Pages\022\273\001\n\tListPages\022/.google.cloud.d" - + "ialogflow.cx.v3.ListPagesRequest\0320.googl" - + "e.cloud.dialogflow.cx.v3.ListPagesRespon" - + "se\"K\332A\006parent\202\323\344\223\002<\022:/v3/{parent=project" - + "s/*/locations/*/agents/*/flows/*}/pages\022" - + "\250\001\n\007GetPage\022-.google.cloud.dialogflow.cx" - + ".v3.GetPageRequest\032#.google.cloud.dialog" - + "flow.cx.v3.Page\"I\332A\004name\202\323\344\223\002<\022:/v3/{nam" - + "e=projects/*/locations/*/agents/*/flows/" - + "*/pages/*}\022\273\001\n\nCreatePage\0220.google.cloud" - + ".dialogflow.cx.v3.CreatePageRequest\032#.go" - + "ogle.cloud.dialogflow.cx.v3.Page\"V\332A\013par" - + "ent,page\202\323\344\223\002B\":/v3/{parent=projects/*/l" - + "ocations/*/agents/*/flows/*}/pages:\004page" - + "\022\305\001\n\nUpdatePage\0220.google.cloud.dialogflo" - + "w.cx.v3.UpdatePageRequest\032#.google.cloud" - + ".dialogflow.cx.v3.Page\"`\332A\020page,update_m" - + "ask\202\323\344\223\002G2?/v3/{page.name=projects/*/loc" - + "ations/*/agents/*/flows/*/pages/*}:\004page" - + "\022\241\001\n\nDeletePage\0220.google.cloud.dialogflo" - + "w.cx.v3.DeletePageRequest\032\026.google.proto" - + "buf.Empty\"I\332A\004name\202\323\344\223\002<*:/v3/{name=proj" + + "o\032\031google/api/resource.proto\0329google/clo" + + "ud/dialogflow/cx/v3/data_store_connectio" + + "n.proto\032/google/cloud/dialogflow/cx/v3/f" + + "ulfillment.proto\032\033google/protobuf/empty." + + "proto\032 google/protobuf/field_mask.proto\032" + + "\034google/protobuf/struct.proto\"\356\004\n\004Page\022\014" + + "\n\004name\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002" + + "\022E\n\021entry_fulfillment\030\007 \001(\0132*.google.clo" + + "ud.dialogflow.cx.v3.Fulfillment\0221\n\004form\030" + + "\004 \001(\0132#.google.cloud.dialogflow.cx.v3.Fo" + + "rm\022T\n\027transition_route_groups\030\013 \003(\tB3\372A0" + + "\n.dialogflow.googleapis.com/TransitionRo" + + "uteGroup\022I\n\021transition_routes\030\t \003(\0132..go" + + "ogle.cloud.dialogflow.cx.v3.TransitionRo" + + "ute\022C\n\016event_handlers\030\n \003(\0132+.google.clo" + + "ud.dialogflow.cx.v3.EventHandler\022e\n\034know" + + "ledge_connector_settings\030\022 \001(\01329.google." + + "cloud.dialogflow.cx.v3.KnowledgeConnecto" + + "rSettingsB\004\342A\001\001:u\352Ar\n\036dialogflow.googlea" + + "pis.com/Page\022Pprojects/{project}/locatio" + + "ns/{location}/agents/{agent}/flows/{flow" + + "}/pages/{page}\"\247\004\n\004Form\022A\n\nparameters\030\001 " + + "\003(\0132-.google.cloud.dialogflow.cx.v3.Form" + + ".Parameter\032\333\003\n\tParameter\022\032\n\014display_name" + + "\030\001 \001(\tB\004\342A\001\002\022\020\n\010required\030\002 \001(\010\022B\n\013entity" + + "_type\030\003 \001(\tB-\342A\001\002\372A&\n$dialogflow.googlea" + + "pis.com/EntityType\022\017\n\007is_list\030\004 \001(\010\022W\n\rf" + + "ill_behavior\030\007 \001(\0132:.google.cloud.dialog" + + "flow.cx.v3.Form.Parameter.FillBehaviorB\004" + + "\342A\001\002\022-\n\rdefault_value\030\t \001(\0132\026.google.pro" + + "tobuf.Value\022\016\n\006redact\030\013 \001(\010\032\262\001\n\014FillBeha" + + "vior\022T\n\032initial_prompt_fulfillment\030\003 \001(\013" + + "2*.google.cloud.dialogflow.cx.v3.Fulfill" + + "mentB\004\342A\001\002\022L\n\027reprompt_event_handlers\030\005 " + + "\003(\0132+.google.cloud.dialogflow.cx.v3.Even" + + "tHandler\"\202\002\n\014EventHandler\022\022\n\004name\030\006 \001(\tB" + + "\004\342A\001\003\022\023\n\005event\030\004 \001(\tB\004\342A\001\002\022G\n\023trigger_fu" + + "lfillment\030\005 \001(\0132*.google.cloud.dialogflo" + + "w.cx.v3.Fulfillment\022:\n\013target_page\030\002 \001(\t" + + "B#\372A \n\036dialogflow.googleapis.com/PageH\000\022" + + ":\n\013target_flow\030\003 \001(\tB#\372A \n\036dialogflow.go" + + "ogleapis.com/FlowH\000B\010\n\006target\"\325\002\n\017Transi" + + "tionRoute\022\022\n\004name\030\006 \001(\tB\004\342A\001\003\022\031\n\013descrip" + + "tion\030\010 \001(\tB\004\342A\001\001\0225\n\006intent\030\001 \001(\tB%\372A\"\n d" + + "ialogflow.googleapis.com/Intent\022\021\n\tcondi" + + "tion\030\002 \001(\t\022G\n\023trigger_fulfillment\030\003 \001(\0132" + + "*.google.cloud.dialogflow.cx.v3.Fulfillm" + + "ent\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflo" + + "w.googleapis.com/PageH\000\022:\n\013target_flow\030\005" + + " \001(\tB#\372A \n\036dialogflow.googleapis.com/Flo" + + "wH\000B\010\n\006target\"\211\001\n\020ListPagesRequest\0227\n\006pa" + + "rent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleap" + + "is.com/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpa" + + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"`\n\021Lis" + + "tPagesResponse\0222\n\005pages\030\001 \003(\0132#.google.c" + + "loud.dialogflow.cx.v3.Page\022\027\n\017next_page_" + + "token\030\002 \001(\t\"^\n\016GetPageRequest\0225\n\004name\030\001 " + + "\001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com/" + + "Page\022\025\n\rlanguage_code\030\002 \001(\t\"\234\001\n\021CreatePa" + + "geRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dial" + + "ogflow.googleapis.com/Page\0227\n\004page\030\002 \001(\013" + + "2#.google.cloud.dialogflow.cx.v3.PageB\004\342" + + "A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\224\001\n\021UpdatePag" + + "eRequest\0227\n\004page\030\001 \001(\0132#.google.cloud.di" + + "alogflow.cx.v3.PageB\004\342A\001\002\022\025\n\rlanguage_co" + + "de\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.google.p" + + "rotobuf.FieldMask\"Y\n\021DeletePageRequest\0225" + + "\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.google" + + "apis.com/Page\022\r\n\005force\030\002 \001(\010\"\322\002\n\032Knowled" + + "geConnectorSettings\022\017\n\007enabled\030\001 \001(\010\022G\n\023" + + "trigger_fulfillment\030\003 \001(\0132*.google.cloud" + + ".dialogflow.cx.v3.Fulfillment\022:\n\013target_" + + "page\030\004 \001(\tB#\372A \n\036dialogflow.googleapis.c" + + "om/PageH\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dia" + + "logflow.googleapis.com/FlowH\000\022X\n\026data_st" + + "ore_connections\030\006 \003(\01322.google.cloud.dia" + + "logflow.cx.v3.DataStoreConnectionB\004\342A\001\001B" + + "\010\n\006target2\224\010\n\005Pages\022\273\001\n\tListPages\022/.goog" + + "le.cloud.dialogflow.cx.v3.ListPagesReque" + + "st\0320.google.cloud.dialogflow.cx.v3.ListP" + + "agesResponse\"K\332A\006parent\202\323\344\223\002<\022:/v3/{pare" + + "nt=projects/*/locations/*/agents/*/flows" + + "/*}/pages\022\250\001\n\007GetPage\022-.google.cloud.dia" + + "logflow.cx.v3.GetPageRequest\032#.google.cl" + + "oud.dialogflow.cx.v3.Page\"I\332A\004name\202\323\344\223\002<" + + "\022:/v3/{name=projects/*/locations/*/agent" + + "s/*/flows/*/pages/*}\022\273\001\n\nCreatePage\0220.go" + + "ogle.cloud.dialogflow.cx.v3.CreatePageRe" + + "quest\032#.google.cloud.dialogflow.cx.v3.Pa" + + "ge\"V\332A\013parent,page\202\323\344\223\002B\":/v3/{parent=pr" + + "ojects/*/locations/*/agents/*/flows/*}/p" + + "ages:\004page\022\305\001\n\nUpdatePage\0220.google.cloud" + + ".dialogflow.cx.v3.UpdatePageRequest\032#.go" + + "ogle.cloud.dialogflow.cx.v3.Page\"`\332A\020pag" + + "e,update_mask\202\323\344\223\002G2?/v3/{page.name=proj" + "ects/*/locations/*/agents/*/flows/*/page" - + "s/*}\032x\312A\031dialogflow.googleapis.com\322AYhtt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "orm,https://www.googleapis.com/auth/dial" - + "ogflowB\257\001\n!com.google.cloud.dialogflow.c" - + "x.v3B\tPageProtoP\001Z1cloud.google.com/go/d" - + "ialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035G" - + "oogle.Cloud.Dialogflow.Cx.V3\352\002!Google::C" - + "loud::Dialogflow::CX::V3b\006proto3" + + "s/*}:\004page\022\241\001\n\nDeletePage\0220.google.cloud" + + ".dialogflow.cx.v3.DeletePageRequest\032\026.go" + + "ogle.protobuf.Empty\"I\332A\004name\202\323\344\223\002<*:/v3/" + + "{name=projects/*/locations/*/agents/*/fl" + + "ows/*/pages/*}\032x\312A\031dialogflow.googleapis" + + ".com\322AYhttps://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/dialogflowB\257\001\n!com.google.cloud.di" + + "alogflow.cx.v3B\tPageProtoP\001Z1cloud.googl" + + "e.com/go/dialogflow/cx/apiv3/cxpb;cxpb\370\001" + + "\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002" + + "!Google::Cloud::Dialogflow::CX::V3b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -192,6 +210,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -210,6 +229,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TransitionRouteGroups", "TransitionRoutes", "EventHandlers", + "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3_Form_descriptor = getDescriptor().getMessageTypes().get(1); @@ -258,6 +278,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_dialogflow_cx_v3_TransitionRoute_descriptor, new java.lang.String[] { "Name", + "Description", "Intent", "Condition", "TriggerFulfillment", @@ -313,6 +334,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_KnowledgeConnectorSettings_descriptor, + new java.lang.String[] { + "Enabled", + "TriggerFulfillment", + "TargetPage", + "TargetFlow", + "DataStoreConnections", + "Target", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -328,6 +362,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java index 82a1d336ebfd..ed6cf2b13041 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java @@ -24,15 +24,15 @@ *
  * Represents the query input. It can contain one of:
  *
- * 1.  A conversational query in the form of text.
+ * 1. A conversational query in the form of text.
  *
- * 2.  An intent query that specifies which intent to trigger.
+ * 2. An intent query that specifies which intent to trigger.
  *
- * 3.  Natural language speech audio to be processed.
+ * 3. Natural language speech audio to be processed.
  *
- * 4.  An event to be triggered.
+ * 4. An event to be triggered.
  *
- * 5.  DTMF digits to invoke an intent and fill in parameter value.
+ * 5. DTMF digits to invoke an intent and fill in parameter value.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.QueryInput} @@ -691,15 +691,15 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Represents the query input. It can contain one of:
    *
-   * 1.  A conversational query in the form of text.
+   * 1. A conversational query in the form of text.
    *
-   * 2.  An intent query that specifies which intent to trigger.
+   * 2. An intent query that specifies which intent to trigger.
    *
-   * 3.  Natural language speech audio to be processed.
+   * 3. Natural language speech audio to be processed.
    *
-   * 4.  An event to be triggered.
+   * 4. An event to be triggered.
    *
-   * 5.  DTMF digits to invoke an intent and fill in parameter value.
+   * 5. DTMF digits to invoke an intent and fill in parameter value.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.QueryInput} 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 69380867f251..e914d28c36e1 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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @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=734 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=737 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -4769,7 +4769,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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -4791,7 +4791,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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @return The intent. */ @java.lang.Deprecated @@ -5007,7 +5007,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=734 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=737 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5033,7 +5033,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=734 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=737 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5063,7 +5063,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=734 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=737 * @return This builder for chaining. */ @java.lang.Deprecated 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 55308d1ceca1..33c9b9b54318 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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @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=723 + * google/cloud/dialogflow/cx/v3/session.proto;l=726 * @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=734 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=737 * @return The intentDetectionConfidence. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 0cb841f277d7..a1ed33776716 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -54,6 +54,7 @@ private ResponseMessage(com.google.protobuf.GeneratedMessageV3.Builder builde } private ResponseMessage() { + responseType_ = 0; channel_ = ""; } @@ -78,6 +79,199 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder.class); } + /** + * + * + *
+   * Represents different response types.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType} + */ + public enum ResponseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RESPONSE_TYPE_UNSPECIFIED = 0; + */ + RESPONSE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The response is from an [entry
+     * prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the
+     * page.
+     * 
+ * + * ENTRY_PROMPT = 1; + */ + ENTRY_PROMPT(1), + /** + * + * + *
+     * The response is from [form-filling
+     * prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in
+     * the page.
+     * 
+ * + * PARAMETER_PROMPT = 2; + */ + PARAMETER_PROMPT(2), + /** + * + * + *
+     * The response is from a [transition
+     * route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event
+     * handler][EventHandler] in the page or flow or transition route group.
+     * 
+ * + * HANDLER_PROMPT = 3; + */ + HANDLER_PROMPT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RESPONSE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESPONSE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The response is from an [entry
+     * prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the
+     * page.
+     * 
+ * + * ENTRY_PROMPT = 1; + */ + public static final int ENTRY_PROMPT_VALUE = 1; + /** + * + * + *
+     * The response is from [form-filling
+     * prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in
+     * the page.
+     * 
+ * + * PARAMETER_PROMPT = 2; + */ + public static final int PARAMETER_PROMPT_VALUE = 2; + /** + * + * + *
+     * The response is from a [transition
+     * route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event
+     * handler][EventHandler] in the page or flow or transition route group.
+     * 
+ * + * HANDLER_PROMPT = 3; + */ + public static final int HANDLER_PROMPT_VALUE = 3; + + 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 ResponseType 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 ResponseType forNumber(int value) { + switch (value) { + case 0: + return RESPONSE_TYPE_UNSPECIFIED; + case 1: + return ENTRY_PROMPT; + case 2: + return PARAMETER_PROMPT; + case 3: + return HANDLER_PROMPT; + 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 ResponseType findValueByNumber(int number) { + return ResponseType.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.ResponseMessage.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResponseType[] VALUES = values(); + + public static ResponseType 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 ResponseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType) + } + public interface TextOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.Text) @@ -7952,126 +8146,570 @@ public com.google.protobuf.Parser getParserForType() { } } - private int messageCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object message_; - - public enum MessageCase + public interface KnowledgeInfoCardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Represents info card response. If the response contains generative
+   * knowledge prediction, Dialogflow will return a payload with Infobot
+   * Messenger compatible info card.
+   *
+   * Otherwise, the info card response is skipped.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard} + */ + public static final class KnowledgeInfoCard extends com.google.protobuf.GeneratedMessageV3 implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TEXT(1), - PAYLOAD(2), - CONVERSATION_SUCCESS(9), - OUTPUT_AUDIO_TEXT(8), - LIVE_AGENT_HANDOFF(10), - END_INTERACTION(11), - PLAY_AUDIO(12), - MIXED_AUDIO(13), - TELEPHONY_TRANSFER_CALL(18), - MESSAGE_NOT_SET(0); - private final int value; - - private MessageCase(int value) { - this.value = value; + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) + KnowledgeInfoCardOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeInfoCard.newBuilder() to construct. + private KnowledgeInfoCard(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MessageCase valueOf(int value) { - return forNumber(value); + + private KnowledgeInfoCard() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeInfoCard(); } - public static MessageCase forNumber(int value) { - switch (value) { - case 1: - return TEXT; - case 2: - return PAYLOAD; - case 9: - return CONVERSATION_SUCCESS; - case 8: - return OUTPUT_AUDIO_TEXT; - case 10: - return LIVE_AGENT_HANDOFF; - case 11: - return END_INTERACTION; - case 12: - return PLAY_AUDIO; - case 13: - return MIXED_AUDIO; - case 18: - return TELEPHONY_TRANSFER_CALL; - case 0: - return MESSAGE_NOT_SET; - default: - return null; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor; } - public int getNumber() { - return this.value; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder.class); } - }; - public MessageCase getMessageCase() { - return MessageCase.forNumber(messageCase_); - } + private byte memoizedIsInitialized = -1; - public static final int TEXT_FIELD_NUMBER = 1; - /** - * - * - *
-   * Returns a text response.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; - * - * @return Whether the text field is set. - */ - @java.lang.Override - public boolean hasText() { - return messageCase_ == 1; - } - /** - * - * - *
-   * Returns a text response.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; - * - * @return The text. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getText() { - if (messageCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance(); - } - /** - * - * - *
-   * Returns a text response.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder getTextOrBuilder() { - if (messageCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); } - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance(); - } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ResponseMessage.KnowledgeInfoCard)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents info card response. If the response contains generative
+     * knowledge prediction, Dialogflow will return a payload with Infobot
+     * Messenger compatible info card.
+     *
+     * Otherwise, the info card response is skipped.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance()) return this; + 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; + 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; + } + + @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.ResponseMessage.KnowledgeInfoCard) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard(); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int messageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object message_; + + public enum MessageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + PAYLOAD(2), + CONVERSATION_SUCCESS(9), + OUTPUT_AUDIO_TEXT(8), + LIVE_AGENT_HANDOFF(10), + END_INTERACTION(11), + PLAY_AUDIO(12), + MIXED_AUDIO(13), + TELEPHONY_TRANSFER_CALL(18), + KNOWLEDGE_INFO_CARD(20), + MESSAGE_NOT_SET(0); + private final int value; + + private MessageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MessageCase valueOf(int value) { + return forNumber(value); + } + + public static MessageCase forNumber(int value) { + switch (value) { + case 1: + return TEXT; + case 2: + return PAYLOAD; + case 9: + return CONVERSATION_SUCCESS; + case 8: + return OUTPUT_AUDIO_TEXT; + case 10: + return LIVE_AGENT_HANDOFF; + case 11: + return END_INTERACTION; + case 12: + return PLAY_AUDIO; + case 13: + return MIXED_AUDIO; + case 18: + return TELEPHONY_TRANSFER_CALL; + case 20: + return KNOWLEDGE_INFO_CARD; + case 0: + return MESSAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MessageCase getMessageCase() { + return MessageCase.forNumber(messageCase_); + } + + public static final int TEXT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Returns a text response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return messageCase_ == 1; + } + /** + * + * + *
+   * Returns a text response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getText() { + if (messageCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance(); + } + /** + * + * + *
+   * Returns a text response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder getTextOrBuilder() { + if (messageCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance(); + } public static final int PAYLOAD_FIELD_NUMBER = 2; /** @@ -8551,22 +9189,121 @@ public boolean hasTelephonyTransferCall() { * * *
-   * A signal that the client should transfer the phone call connected to
-   * this agent to a third-party endpoint.
+   * A signal that the client should transfer the phone call connected to
+   * this agent to a third-party endpoint.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCallOrBuilder + getTelephonyTransferCallOrBuilder() { + if (messageCase_ == 18) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall + .getDefaultInstance(); + } + + public static final int KNOWLEDGE_INFO_CARD_FIELD_NUMBER = 20; + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + @java.lang.Override + public boolean hasKnowledgeInfoCard() { + return messageCase_ == 20; + } + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + getKnowledgeInfoCard() { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.getDefaultInstance(); + } + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder() { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.getDefaultInstance(); + } + + public static final int RESPONSE_TYPE_FIELD_NUMBER = 4; + private int responseType_ = 0; + /** + * + * + *
+   * Response type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The enum numeric value on the wire for responseType. + */ + @java.lang.Override + public int getResponseTypeValue() { + return responseType_; + } + /** + * + * + *
+   * Response type.
    * 
* - * - * .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; - * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The responseType. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCallOrBuilder - getTelephonyTransferCallOrBuilder() { - if (messageCase_ == 18) { - return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall) message_; - } - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall - .getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType getResponseType() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType result = + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.forNumber(responseType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.UNRECOGNIZED + : result; } public static final int CHANNEL_FIELD_NUMBER = 19; @@ -8646,6 +9383,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (messageCase_ == 2) { output.writeMessage(2, (com.google.protobuf.Struct) message_); } + if (responseType_ + != com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.RESPONSE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, responseType_); + } if (messageCase_ == 8) { output.writeMessage( 8, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_); @@ -8677,6 +9419,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, channel_); } + if (messageCase_ == 20) { + output.writeMessage( + 20, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_); + } getUnknownFields().writeTo(output); } @@ -8696,6 +9442,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.protobuf.Struct) message_); } + if (responseType_ + != com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.RESPONSE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, responseType_); + } if (messageCase_ == 8) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -8735,6 +9486,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, channel_); } + if (messageCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8751,6 +9507,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dialogflow.cx.v3.ResponseMessage other = (com.google.cloud.dialogflow.cx.v3.ResponseMessage) obj; + if (responseType_ != other.responseType_) return false; if (!getChannel().equals(other.getChannel())) return false; if (!getMessageCase().equals(other.getMessageCase())) return false; switch (messageCase_) { @@ -8781,6 +9538,9 @@ public boolean equals(final java.lang.Object obj) { case 18: if (!getTelephonyTransferCall().equals(other.getTelephonyTransferCall())) return false; break; + case 20: + if (!getKnowledgeInfoCard().equals(other.getKnowledgeInfoCard())) return false; + break; case 0: default: } @@ -8795,6 +9555,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESPONSE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + responseType_; hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); switch (messageCase_) { @@ -8834,6 +9596,10 @@ public int hashCode() { hash = (37 * hash) + TELEPHONY_TRANSFER_CALL_FIELD_NUMBER; hash = (53 * hash) + getTelephonyTransferCall().hashCode(); break; + case 20: + hash = (37 * hash) + KNOWLEDGE_INFO_CARD_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeInfoCard().hashCode(); + break; case 0: default: } @@ -9019,6 +9785,10 @@ public Builder clear() { if (telephonyTransferCallBuilder_ != null) { telephonyTransferCallBuilder_.clear(); } + if (knowledgeInfoCardBuilder_ != null) { + knowledgeInfoCardBuilder_.clear(); + } + responseType_ = 0; channel_ = ""; messageCase_ = 0; message_ = null; @@ -9059,7 +9829,10 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ResponseMessage result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { + result.responseType_ = responseType_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { result.channel_ = channel_; } } @@ -9094,6 +9867,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.ResponseMessag if (messageCase_ == 18 && telephonyTransferCallBuilder_ != null) { result.message_ = telephonyTransferCallBuilder_.build(); } + if (messageCase_ == 20 && knowledgeInfoCardBuilder_ != null) { + result.message_ = knowledgeInfoCardBuilder_.build(); + } } @java.lang.Override @@ -9142,9 +9918,12 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage other) { if (other == com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()) return this; + if (other.responseType_ != 0) { + setResponseTypeValue(other.getResponseTypeValue()); + } if (!other.getChannel().isEmpty()) { channel_ = other.channel_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); } switch (other.getMessageCase()) { @@ -9193,6 +9972,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage other mergeTelephonyTransferCall(other.getTelephonyTransferCall()); break; } + case KNOWLEDGE_INFO_CARD: + { + mergeKnowledgeInfoCard(other.getKnowledgeInfoCard()); + break; + } case MESSAGE_NOT_SET: { break; @@ -9236,6 +10020,12 @@ public Builder mergeFrom( messageCase_ = 2; break; } // case 18 + case 32: + { + responseType_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 32 case 66: { input.readMessage(getOutputAudioTextFieldBuilder().getBuilder(), extensionRegistry); @@ -9284,9 +10074,16 @@ public Builder mergeFrom( case 154: { channel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; break; } // case 154 + case 162: + { + input.readMessage( + getKnowledgeInfoCardFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 20; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11506,6 +12303,349 @@ public Builder clearTelephonyTransferCall() { return telephonyTransferCallBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder> + knowledgeInfoCardBuilder_; + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + @java.lang.Override + public boolean hasKnowledgeInfoCard() { + return messageCase_ == 20; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + getKnowledgeInfoCard() { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } else { + if (messageCase_ == 20) { + return knowledgeInfoCardBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder setKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard value) { + if (knowledgeInfoCardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + knowledgeInfoCardBuilder_.setMessage(value); + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder setKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder + builderForValue) { + if (knowledgeInfoCardBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + knowledgeInfoCardBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder mergeKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard value) { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20 + && message_ + != com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance()) { + message_ = + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.newBuilder( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) + message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 20) { + knowledgeInfoCardBuilder_.mergeFrom(value); + } else { + knowledgeInfoCardBuilder_.setMessage(value); + } + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder clearKnowledgeInfoCard() { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + } + knowledgeInfoCardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder + getKnowledgeInfoCardBuilder() { + return getKnowledgeInfoCardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder() { + if ((messageCase_ == 20) && (knowledgeInfoCardBuilder_ != null)) { + return knowledgeInfoCardBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder> + getKnowledgeInfoCardFieldBuilder() { + if (knowledgeInfoCardBuilder_ == null) { + if (!(messageCase_ == 20)) { + message_ = + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + knowledgeInfoCardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 20; + onChanged(); + return knowledgeInfoCardBuilder_; + } + + private int responseType_ = 0; + /** + * + * + *
+     * Response type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The enum numeric value on the wire for responseType. + */ + @java.lang.Override + public int getResponseTypeValue() { + return responseType_; + } + /** + * + * + *
+     * Response type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @param value The enum numeric value on the wire for responseType to set. + * @return This builder for chaining. + */ + public Builder setResponseTypeValue(int value) { + responseType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Response type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The responseType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType getResponseType() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType result = + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.forNumber(responseType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Response type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @param value The responseType to set. + * @return This builder for chaining. + */ + public Builder setResponseType( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + responseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Response type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearResponseType() { + bitField0_ = (bitField0_ & ~0x00000400); + responseType_ = 0; + onChanged(); + return this; + } + private java.lang.Object channel_ = ""; /** * @@ -11577,7 +12717,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -11597,7 +12737,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -11622,7 +12762,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java index 824f48efe953..ced333416283 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java @@ -419,6 +419,76 @@ public interface ResponseMessageOrBuilder com.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCallOrBuilder getTelephonyTransferCallOrBuilder(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + boolean hasKnowledgeInfoCard(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard getKnowledgeInfoCard(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder(); + + /** + * + * + *
+   * Response type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The enum numeric value on the wire for responseType. + */ + int getResponseTypeValue(); + /** + * + * + *
+   * Response type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * + * @return The responseType. + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType getResponseType(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index 7322eb67c38c..51d62fd2be47 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -67,6 +67,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_TelephonyTransferCall_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_TelephonyTransferCall_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -79,7 +83,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n4google/cloud/dialogflow/cx/v3/response" + "_message.proto\022\035google.cloud.dialogflow." + "cx.v3\032\037google/api/field_behavior.proto\032\034" - + "google/protobuf/struct.proto\"\304\013\n\017Respons" + + "google/protobuf/struct.proto\"\371\r\n\017Respons" + "eMessage\022C\n\004text\030\001 \001(\01323.google.cloud.di" + "alogflow.cx.v3.ResponseMessage.TextH\000\022*\n" + "\007payload\030\002 \001(\0132\027.google.protobuf.StructH" @@ -99,29 +103,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "esponseMessage.MixedAudioB\004\342A\001\003H\000\022g\n\027tel" + "ephony_transfer_call\030\022 \001(\0132D.google.clou" + "d.dialogflow.cx.v3.ResponseMessage.Telep" - + "honyTransferCallH\000\022\017\n\007channel\030\023 \001(\t\032E\n\004T" - + "ext\022\022\n\004text\030\001 \003(\tB\004\342A\001\002\022)\n\033allow_playbac" - + "k_interruption\030\002 \001(\010B\004\342A\001\003\032=\n\020LiveAgentH" - + "andoff\022)\n\010metadata\030\001 \001(\0132\027.google.protob" - + "uf.Struct\032@\n\023ConversationSuccess\022)\n\010meta" - + "data\030\001 \001(\0132\027.google.protobuf.Struct\032f\n\017O" - + "utputAudioText\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002" - + " \001(\tH\000\022)\n\033allow_playback_interruption\030\003 " - + "\001(\010B\004\342A\001\003B\010\n\006source\032\020\n\016EndInteraction\032O\n" - + "\tPlayAudio\022\027\n\taudio_uri\030\001 \001(\tB\004\342A\001\002\022)\n\033a" - + "llow_playback_interruption\030\002 \001(\010B\004\342A\001\003\032\302" - + "\001\n\nMixedAudio\022S\n\010segments\030\001 \003(\0132A.google" - + ".cloud.dialogflow.cx.v3.ResponseMessage." - + "MixedAudio.Segment\032_\n\007Segment\022\017\n\005audio\030\001" - + " \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022)\n\033allow_playback_" - + "interruption\030\003 \001(\010B\004\342A\001\003B\t\n\007content\032;\n\025T" - + "elephonyTransferCall\022\026\n\014phone_number\030\001 \001" - + "(\tH\000B\n\n\010endpointB\t\n\007messageB\272\001\n!com.goog" - + "le.cloud.dialogflow.cx.v3B\024ResponseMessa" - + "geProtoP\001Z1cloud.google.com/go/dialogflo" - + "w/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cl" - + "oud.Dialogflow.Cx.V3\352\002!Google::Cloud::Di" - + "alogflow::CX::V3b\006proto3" + + "honyTransferCallH\000\022_\n\023knowledge_info_car" + + "d\030\024 \001(\0132@.google.cloud.dialogflow.cx.v3." + + "ResponseMessage.KnowledgeInfoCardH\000\022R\n\rr" + + "esponse_type\030\004 \001(\0162;.google.cloud.dialog" + + "flow.cx.v3.ResponseMessage.ResponseType\022" + + "\017\n\007channel\030\023 \001(\t\032E\n\004Text\022\022\n\004text\030\001 \003(\tB\004" + + "\342A\001\002\022)\n\033allow_playback_interruption\030\002 \001(" + + "\010B\004\342A\001\003\032=\n\020LiveAgentHandoff\022)\n\010metadata\030" + + "\001 \001(\0132\027.google.protobuf.Struct\032@\n\023Conver" + + "sationSuccess\022)\n\010metadata\030\001 \001(\0132\027.google" + + ".protobuf.Struct\032f\n\017OutputAudioText\022\016\n\004t" + + "ext\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022)\n\033allow_pla" + + "yback_interruption\030\003 \001(\010B\004\342A\001\003B\010\n\006source" + + "\032\020\n\016EndInteraction\032O\n\tPlayAudio\022\027\n\taudio" + + "_uri\030\001 \001(\tB\004\342A\001\002\022)\n\033allow_playback_inter" + + "ruption\030\002 \001(\010B\004\342A\001\003\032\302\001\n\nMixedAudio\022S\n\010se" + + "gments\030\001 \003(\0132A.google.cloud.dialogflow.c" + + "x.v3.ResponseMessage.MixedAudio.Segment\032" + + "_\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\t" + + "H\000\022)\n\033allow_playback_interruption\030\003 \001(\010B" + + "\004\342A\001\003B\t\n\007content\032;\n\025TelephonyTransferCal" + + "l\022\026\n\014phone_number\030\001 \001(\tH\000B\n\n\010endpoint\032\023\n" + + "\021KnowledgeInfoCard\"i\n\014ResponseType\022\035\n\031RE" + + "SPONSE_TYPE_UNSPECIFIED\020\000\022\020\n\014ENTRY_PROMP" + + "T\020\001\022\024\n\020PARAMETER_PROMPT\020\002\022\022\n\016HANDLER_PRO" + + "MPT\020\003B\t\n\007messageB\272\001\n!com.google.cloud.di" + + "alogflow.cx.v3B\024ResponseMessageProtoP\001Z1" + + "cloud.google.com/go/dialogflow/cx/apiv3/" + + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" + + "low.Cx.V3\352\002!Google::Cloud::Dialogflow::C" + + "X::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -145,6 +157,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PlayAudio", "MixedAudio", "TelephonyTransferCall", + "KnowledgeInfoCard", + "ResponseType", "Channel", "Message", }); @@ -236,6 +250,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PhoneNumber", "Endpoint", }); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor + .getNestedTypes() + .get(8); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_KnowledgeInfoCard_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java new file mode 100644 index 000000000000..3b92c416275e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java @@ -0,0 +1,1823 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Settings for Generative Safety.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings} + */ +public final class SafetySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SafetySettings) + SafetySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SafetySettings.newBuilder() to construct. + private SafetySettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SafetySettings() { + bannedPhrases_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SafetySettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder.class); + } + + public interface PhraseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + } + /** + * + * + *
+   * Text input which can be used for prompt or banned phrases.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} + */ + public static final class Phrase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) + PhraseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Phrase.newBuilder() to construct. + private Phrase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Phrase() { + text_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Phrase(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + 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.SafetySettings.Phrase)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) obj; + + if (!getText().equals(other.getText())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase 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.SafetySettings.Phrase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase 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.SafetySettings.Phrase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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; + } + /** + * + * + *
+     * Text input which can be used for prompt or banned phrases.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.SafetySettings.Phrase) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase other) { + if (other == com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + 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: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + languageCode_ = 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 java.lang.Object text_ = ""; + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = 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.SafetySettings.Phrase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) + private static final com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase(); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Phrase 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.SafetySettings.Phrase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bannedPhrases_; + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public java.util.List + getBannedPhrasesList() { + return bannedPhrases_; + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public java.util.List + getBannedPhrasesOrBuilderList() { + return bannedPhrases_; + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( + int index) { + return bannedPhrases_.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 < bannedPhrases_.size(); i++) { + output.writeMessage(1, bannedPhrases_.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 < bannedPhrases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bannedPhrases_.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.SafetySettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings) obj; + + if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) 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 (getBannedPhrasesCount() > 0) { + hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhrasesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.SafetySettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.SafetySettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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 Generative Safety.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings) + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SafetySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + } else { + bannedPhrases_ = null; + bannedPhrasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.SafetySettings result) { + if (bannedPhrasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = java.util.Collections.unmodifiableList(bannedPhrases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bannedPhrases_ = bannedPhrases_; + } else { + result.bannedPhrases_ = bannedPhrasesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SafetySettings 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.SafetySettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SafetySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SafetySettings other) { + if (other == com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()) + return this; + if (bannedPhrasesBuilder_ == null) { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrases_.isEmpty()) { + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.addAll(other.bannedPhrases_); + } + onChanged(); + } + } else { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrasesBuilder_.isEmpty()) { + bannedPhrasesBuilder_.dispose(); + bannedPhrasesBuilder_ = null; + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + bannedPhrasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBannedPhrasesFieldBuilder() + : null; + } else { + bannedPhrasesBuilder_.addAllMessages(other.bannedPhrases_); + } + } + } + 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.SafetySettings.Phrase m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.parser(), + extensionRegistry); + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(m); + } else { + bannedPhrasesBuilder_.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 bannedPhrases_ = + java.util.Collections.emptyList(); + + private void ensureBannedPhrasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = + new java.util.ArrayList( + bannedPhrases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + bannedPhrasesBuilder_; + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesList() { + if (bannedPhrasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } else { + return bannedPhrasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public int getBannedPhrasesCount() { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.size(); + } else { + return bannedPhrasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addAllBannedPhrases( + java.lang.Iterable + values) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); + onChanged(); + } else { + bannedPhrasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder clearBannedPhrases() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bannedPhrasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder removeBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.remove(index); + onChanged(); + } else { + bannedPhrasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder getBannedPhrasesBuilder( + int index) { + return getBannedPhrasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + if (bannedPhrasesBuilder_ != null) { + return bannedPhrasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder + addBannedPhrasesBuilder() { + return getBannedPhrasesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder addBannedPhrasesBuilder( + int index) { + return getBannedPhrasesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesBuilderList() { + return getBannedPhrasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + getBannedPhrasesFieldBuilder() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder>( + bannedPhrases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bannedPhrases_ = null; + } + return bannedPhrasesBuilder_; + } + + @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.SafetySettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SafetySettings) + private static final com.google.cloud.dialogflow.cx.v3.SafetySettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.SafetySettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetySettings 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.SafetySettings 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/SafetySettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java new file mode 100644 index 000000000000..3991572c4ebd --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface SafetySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + java.util.List getBannedPhrasesList(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + int getBannedPhrasesCount(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + java.util.List + getBannedPhrasesOrBuilderList(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( + int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java new file mode 100644 index 000000000000..20f0ac418b32 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java @@ -0,0 +1,92 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class SafetySettingsProto { + private SafetySettingsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/dialogflow/cx/v3/safety_s" + + "ettings.proto\022\035google.cloud.dialogflow.c" + + "x.v3\032\037google/api/field_behavior.proto\"\231\001" + + "\n\016SafetySettings\022L\n\016banned_phrases\030\001 \003(\013" + + "24.google.cloud.dialogflow.cx.v3.SafetyS" + + "ettings.Phrase\0329\n\006Phrase\022\022\n\004text\030\001 \001(\tB\004" + + "\342A\001\002\022\033\n\rlanguage_code\030\002 \001(\tB\004\342A\001\002B\225\001\n!co" + + "m.google.cloud.dialogflow.cx.v3B\023SafetyS" + + "ettingsProtoP\001Z1cloud.google.com/go/dial" + + "ogflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Goog" + + "le.Cloud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor, + new java.lang.String[] { + "BannedPhrases", + }); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor, + new java.lang.String[] { + "Text", "LanguageCode", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java index dca408feb22b..b0c8905b9c74 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java @@ -351,6 +351,150 @@ private RedactionScope(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope) } + /** + * + * + *
+   * Defines how long we retain persisted data that contains sensitive info.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy} + */ + public enum RetentionStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Retains the persisted data with Dialogflow's internal default 365d TTLs.
+     * 
+ * + * RETENTION_STRATEGY_UNSPECIFIED = 0; + */ + RETENTION_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+     * Removes data when the conversation ends. If there is no [Conversation][]
+     * explicitly established, a default conversation ends when the
+     * corresponding Dialogflow session ends.
+     * 
+ * + * REMOVE_AFTER_CONVERSATION = 1; + */ + REMOVE_AFTER_CONVERSATION(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Retains the persisted data with Dialogflow's internal default 365d TTLs.
+     * 
+ * + * RETENTION_STRATEGY_UNSPECIFIED = 0; + */ + public static final int RETENTION_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Removes data when the conversation ends. If there is no [Conversation][]
+     * explicitly established, a default conversation ends when the
+     * corresponding Dialogflow session ends.
+     * 
+ * + * REMOVE_AFTER_CONVERSATION = 1; + */ + public static final int REMOVE_AFTER_CONVERSATION_VALUE = 1; + + 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 RetentionStrategy 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 RetentionStrategy forNumber(int value) { + switch (value) { + case 0: + return RETENTION_STRATEGY_UNSPECIFIED; + case 1: + return REMOVE_AFTER_CONVERSATION; + 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 RetentionStrategy findValueByNumber(int number) { + return RetentionStrategy.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.SecuritySettings.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final RetentionStrategy[] VALUES = values(); + + public static RetentionStrategy 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 RetentionStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy) + } + /** * * @@ -466,7 +610,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.SecuritySettings.getDescriptor() .getEnumTypes() - .get(2); + .get(3); } private static final PurgeDataType[] VALUES = values(); @@ -2480,6 +2624,7 @@ public enum DataRetentionCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RETENTION_WINDOW_DAYS(6), + RETENTION_STRATEGY(7), DATARETENTION_NOT_SET(0); private final int value; @@ -2500,6 +2645,8 @@ public static DataRetentionCase forNumber(int value) { switch (value) { case 6: return RETENTION_WINDOW_DAYS; + case 7: + return RETENTION_STRATEGY; case 0: return DATARETENTION_NOT_SET; default: @@ -2926,6 +3073,69 @@ public int getRetentionWindowDays() { return 0; } + public static final int RETENTION_STRATEGY_FIELD_NUMBER = 7; + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + public boolean hasRetentionStrategy() { + return dataRetentionCase_ == 7; + } + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + public int getRetentionStrategyValue() { + if (dataRetentionCase_ == 7) { + return (java.lang.Integer) dataRetention_; + } + return 0; + } + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + getRetentionStrategy() { + if (dataRetentionCase_ == 7) { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy result = + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy.forNumber( + (java.lang.Integer) dataRetention_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy.UNRECOGNIZED + : result; + } + return com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + .RETENTION_STRATEGY_UNSPECIFIED; + } + public static final int PURGE_DATA_TYPES_FIELD_NUMBER = 8; @SuppressWarnings("serial") @@ -3264,6 +3474,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataRetentionCase_ == 6) { output.writeInt32(6, (int) ((java.lang.Integer) dataRetention_)); } + if (dataRetentionCase_ == 7) { + output.writeEnum(7, ((java.lang.Integer) dataRetention_)); + } if (getPurgeDataTypesList().size() > 0) { output.writeUInt32NoTag(66); output.writeUInt32NoTag(purgeDataTypesMemoizedSerializedSize); @@ -3315,6 +3528,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 6, (int) ((java.lang.Integer) dataRetention_)); } + if (dataRetentionCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 7, ((java.lang.Integer) dataRetention_)); + } { int dataSize = 0; for (int i = 0; i < purgeDataTypes_.size(); i++) { @@ -3378,6 +3596,9 @@ public boolean equals(final java.lang.Object obj) { case 6: if (getRetentionWindowDays() != other.getRetentionWindowDays()) return false; break; + case 7: + if (getRetentionStrategyValue() != other.getRetentionStrategyValue()) return false; + break; case 0: default: } @@ -3421,6 +3642,10 @@ public int hashCode() { hash = (37 * hash) + RETENTION_WINDOW_DAYS_FIELD_NUMBER; hash = (53 * hash) + getRetentionWindowDays(); break; + case 7: + hash = (37 * hash) + RETENTION_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getRetentionStrategyValue(); + break; case 0: default: } @@ -3572,7 +3797,7 @@ public Builder clear() { inspectTemplate_ = ""; deidentifyTemplate_ = ""; purgeDataTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); audioExportSettings_ = null; if (audioExportSettingsBuilder_ != null) { audioExportSettingsBuilder_.dispose(); @@ -3623,9 +3848,9 @@ public com.google.cloud.dialogflow.cx.v3.SecuritySettings buildPartial() { private void buildPartialRepeatedFields( com.google.cloud.dialogflow.cx.v3.SecuritySettings result) { - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { purgeDataTypes_ = java.util.Collections.unmodifiableList(purgeDataTypes_); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } result.purgeDataTypes_ = purgeDataTypes_; } @@ -3650,13 +3875,13 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SecuritySettings re if (((from_bitField0_ & 0x00000020) != 0)) { result.deidentifyTemplate_ = deidentifyTemplate_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.audioExportSettings_ = audioExportSettingsBuilder_ == null ? audioExportSettings_ : audioExportSettingsBuilder_.build(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.insightsExportSettings_ = insightsExportSettingsBuilder_ == null ? insightsExportSettings_ @@ -3744,7 +3969,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SecuritySettings othe if (!other.purgeDataTypes_.isEmpty()) { if (purgeDataTypes_.isEmpty()) { purgeDataTypes_ = other.purgeDataTypes_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensurePurgeDataTypesIsMutable(); purgeDataTypes_.addAll(other.purgeDataTypes_); @@ -3763,6 +3988,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SecuritySettings othe setRetentionWindowDays(other.getRetentionWindowDays()); break; } + case RETENTION_STRATEGY: + { + setRetentionStrategyValue(other.getRetentionStrategyValue()); + break; + } case DATARETENTION_NOT_SET: { break; @@ -3824,6 +4054,13 @@ public Builder mergeFrom( dataRetentionCase_ = 6; break; } // case 48 + case 56: + { + int rawValue = input.readEnum(); + dataRetentionCase_ = 7; + dataRetention_ = rawValue; + break; + } // case 56 case 64: { int tmpRaw = input.readEnum(); @@ -3853,14 +4090,14 @@ public Builder mergeFrom( { input.readMessage( getAudioExportSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 98 case 106: { input.readMessage( getInsightsExportSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 106 case 138: @@ -4821,12 +5058,148 @@ public Builder clearRetentionWindowDays() { return this; } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + @java.lang.Override + public boolean hasRetentionStrategy() { + return dataRetentionCase_ == 7; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + @java.lang.Override + public int getRetentionStrategyValue() { + if (dataRetentionCase_ == 7) { + return ((java.lang.Integer) dataRetention_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @param value The enum numeric value on the wire for retentionStrategy to set. + * @return This builder for chaining. + */ + public Builder setRetentionStrategyValue(int value) { + dataRetentionCase_ = 7; + dataRetention_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + getRetentionStrategy() { + if (dataRetentionCase_ == 7) { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy result = + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy.forNumber( + (java.lang.Integer) dataRetention_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy.UNRECOGNIZED + : result; + } + return com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + .RETENTION_STRATEGY_UNSPECIFIED; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @param value The retentionStrategy to set. + * @return This builder for chaining. + */ + public Builder setRetentionStrategy( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + dataRetentionCase_ = 7; + dataRetention_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearRetentionStrategy() { + if (dataRetentionCase_ == 7) { + dataRetentionCase_ = 0; + dataRetention_ = null; + onChanged(); + } + return this; + } + private java.util.List purgeDataTypes_ = java.util.Collections.emptyList(); private void ensurePurgeDataTypesIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { + if (!((bitField0_ & 0x00000100) != 0)) { purgeDataTypes_ = new java.util.ArrayList(purgeDataTypes_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; } } /** @@ -4971,7 +5344,7 @@ public Builder addAllPurgeDataTypes( */ public Builder clearPurgeDataTypes() { purgeDataTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -5109,7 +5482,7 @@ public Builder addAllPurgeDataTypesValue(java.lang.Iterable v * @return Whether the audioExportSettings field is set. */ public boolean hasAudioExportSettings() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -5188,7 +5561,7 @@ public Builder setAudioExportSettings( } else { audioExportSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5227,7 +5600,7 @@ public Builder setAudioExportSettings( } else { audioExportSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5261,7 +5634,7 @@ public Builder setAudioExportSettings( public Builder mergeAudioExportSettings( com.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings value) { if (audioExportSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && audioExportSettings_ != null && audioExportSettings_ != com.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings @@ -5273,7 +5646,7 @@ public Builder mergeAudioExportSettings( } else { audioExportSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5305,7 +5678,7 @@ public Builder mergeAudioExportSettings( *
*/ public Builder clearAudioExportSettings() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); audioExportSettings_ = null; if (audioExportSettingsBuilder_ != null) { audioExportSettingsBuilder_.dispose(); @@ -5343,7 +5716,7 @@ public Builder clearAudioExportSettings() { */ public com.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.Builder getAudioExportSettingsBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getAudioExportSettingsFieldBuilder().getBuilder(); } @@ -5456,7 +5829,7 @@ public Builder clearAudioExportSettings() { * @return Whether the insightsExportSettings field is set. */ public boolean hasInsightsExportSettings() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -5515,7 +5888,7 @@ public Builder setInsightsExportSettings( } else { insightsExportSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5544,7 +5917,7 @@ public Builder setInsightsExportSettings( } else { insightsExportSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5568,7 +5941,7 @@ public Builder setInsightsExportSettings( public Builder mergeInsightsExportSettings( com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings value) { if (insightsExportSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000400) != 0) && insightsExportSettings_ != null && insightsExportSettings_ != com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings @@ -5580,7 +5953,7 @@ public Builder mergeInsightsExportSettings( } else { insightsExportSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5602,7 +5975,7 @@ public Builder mergeInsightsExportSettings( *
*/ public Builder clearInsightsExportSettings() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); insightsExportSettings_ = null; if (insightsExportSettingsBuilder_ != null) { insightsExportSettingsBuilder_.dispose(); @@ -5630,7 +6003,7 @@ public Builder clearInsightsExportSettings() { */ public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder getInsightsExportSettingsBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return getInsightsExportSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java index f0d7e88f6112..2313eae2c7f7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java @@ -292,6 +292,49 @@ public interface SecuritySettingsOrBuilder */ int getRetentionWindowDays(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + boolean hasRetentionStrategy(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + int getRetentionStrategyValue(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + com.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy getRetentionStrategy(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java index 5d131e9d7282..2e7d36605f45 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java @@ -99,7 +99,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ow.cx.v3.SecuritySettingsB\004\342A\001\002\"b\n\035Delet" + "eSecuritySettingsRequest\022A\n\004name\030\001 \001(\tB3" + "\342A\001\002\372A,\n*dialogflow.googleapis.com/Secur" - + "itySettings\"\226\013\n\020SecuritySettings\022\014\n\004name" + + "itySettings\"\317\014\n\020SecuritySettings\022\014\n\004name" + "\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022]\n\022re" + "daction_strategy\030\003 \001(\0162A.google.cloud.di" + "alogflow.cx.v3.SecuritySettings.Redactio" @@ -109,80 +109,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\tB\'\372A$\n\"dlp.googleapis.com/InspectTem" + "plate\022G\n\023deidentify_template\030\021 \001(\tB*\372A\'\n" + "%dlp.googleapis.com/DeidentifyTemplate\022\037" - + "\n\025retention_window_days\030\006 \001(\005H\000\022W\n\020purge" - + "_data_types\030\010 \003(\0162=.google.cloud.dialogf" - + "low.cx.v3.SecuritySettings.PurgeDataType" - + "\022b\n\025audio_export_settings\030\014 \001(\0132C.google" + + "\n\025retention_window_days\030\006 \001(\005H\000\022_\n\022reten" + + "tion_strategy\030\007 \001(\0162A.google.cloud.dialo" + + "gflow.cx.v3.SecuritySettings.RetentionSt" + + "rategyH\000\022W\n\020purge_data_types\030\010 \003(\0162=.goo" + + "gle.cloud.dialogflow.cx.v3.SecuritySetti" + + "ngs.PurgeDataType\022b\n\025audio_export_settin" + + "gs\030\014 \001(\0132C.google.cloud.dialogflow.cx.v3" + + ".SecuritySettings.AudioExportSettings\022h\n" + + "\030insights_export_settings\030\r \001(\0132F.google" + + ".cloud.dialogflow.cx.v3.SecuritySettings" + + ".InsightsExportSettings\032\230\002\n\023AudioExportS" + + "ettings\022\022\n\ngcs_bucket\030\001 \001(\t\022\034\n\024audio_exp" + + "ort_pattern\030\002 \001(\t\022\036\n\026enable_audio_redact" + + "ion\030\003 \001(\010\022e\n\014audio_format\030\004 \001(\0162O.google" + ".cloud.dialogflow.cx.v3.SecuritySettings" - + ".AudioExportSettings\022h\n\030insights_export_" - + "settings\030\r \001(\0132F.google.cloud.dialogflow" - + ".cx.v3.SecuritySettings.InsightsExportSe" - + "ttings\032\230\002\n\023AudioExportSettings\022\022\n\ngcs_bu" - + "cket\030\001 \001(\t\022\034\n\024audio_export_pattern\030\002 \001(\t" - + "\022\036\n\026enable_audio_redaction\030\003 \001(\010\022e\n\014audi" - + "o_format\030\004 \001(\0162O.google.cloud.dialogflow" - + ".cx.v3.SecuritySettings.AudioExportSetti" - + "ngs.AudioFormat\"H\n\013AudioFormat\022\034\n\030AUDIO_" - + "FORMAT_UNSPECIFIED\020\000\022\t\n\005MULAW\020\001\022\007\n\003MP3\020\002" - + "\022\007\n\003OGG\020\003\0328\n\026InsightsExportSettings\022\036\n\026e" - + "nable_insights_export\030\001 \001(\010\"P\n\021Redaction" - + "Strategy\022\"\n\036REDACTION_STRATEGY_UNSPECIFI" - + "ED\020\000\022\027\n\023REDACT_WITH_SERVICE\020\001\"J\n\016Redacti" - + "onScope\022\037\n\033REDACTION_SCOPE_UNSPECIFIED\020\000" - + "\022\027\n\023REDACT_DISK_STORAGE\020\002\"H\n\rPurgeDataTy" - + "pe\022\037\n\033PURGE_DATA_TYPE_UNSPECIFIED\020\000\022\026\n\022D" - + "IALOGFLOW_HISTORY\020\001:}\352Az\n*dialogflow.goo" - + "gleapis.com/SecuritySettings\022Lprojects/{" - + "project}/locations/{location}/securitySe" - + "ttings/{security_settings}B\020\n\016data_reten" - + "tion2\357\t\n\027SecuritySettingsService\022\363\001\n\026Cre" - + "ateSecuritySettings\022<.google.cloud.dialo" - + "gflow.cx.v3.CreateSecuritySettingsReques" - + "t\032/.google.cloud.dialogflow.cx.v3.Securi" - + "tySettings\"j\332A\030parent,security_settings\202" - + "\323\344\223\002I\"4/v3/{parent=projects/*/locations/" - + "*}/securitySettings:\021security_settings\022\306" - + "\001\n\023GetSecuritySettings\0229.google.cloud.di" - + "alogflow.cx.v3.GetSecuritySettingsReques" - + "t\032/.google.cloud.dialogflow.cx.v3.Securi" - + "tySettings\"C\332A\004name\202\323\344\223\0026\0224/v3/{name=pro" - + "jects/*/locations/*/securitySettings/*}\022" - + "\213\002\n\026UpdateSecuritySettings\022<.google.clou" - + "d.dialogflow.cx.v3.UpdateSecuritySetting" - + "sRequest\032/.google.cloud.dialogflow.cx.v3" - + ".SecuritySettings\"\201\001\332A\035security_settings" - + ",update_mask\202\323\344\223\002[2F/v3/{security_settin" - + "gs.name=projects/*/locations/*/securityS" - + "ettings/*}:\021security_settings\022\326\001\n\024ListSe" - + "curitySettings\022:.google.cloud.dialogflow" - + ".cx.v3.ListSecuritySettingsRequest\032;.goo" - + "gle.cloud.dialogflow.cx.v3.ListSecurityS" - + "ettingsResponse\"E\332A\006parent\202\323\344\223\0026\0224/v3/{p" - + "arent=projects/*/locations/*}/securitySe" - + "ttings\022\263\001\n\026DeleteSecuritySettings\022<.goog" - + "le.cloud.dialogflow.cx.v3.DeleteSecurity" - + "SettingsRequest\032\026.google.protobuf.Empty\"" - + "C\332A\004name\202\323\344\223\0026*4/v3/{name=projects/*/loc" - + "ations/*/securitySettings/*}\032x\312A\031dialogf" - + "low.googleapis.com\322AYhttps://www.googlea" - + "pis.com/auth/cloud-platform,https://www." - + "googleapis.com/auth/dialogflowB\342\004\n!com.g" - + "oogle.cloud.dialogflow.cx.v3B\025SecuritySe" - + "ttingsProtoP\001Z1cloud.google.com/go/dialo" - + "gflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Googl" - + "e.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud" - + "::Dialogflow::CX::V3\352A\310\001\n\"dlp.googleapis" - + ".com/InspectTemplate\022Uorganizations/{org" - + "anization}/locations/{location}/inspectT" - + "emplates/{inspect_template}\022Kprojects/{p" - + "roject}/locations/{location}/inspectTemp" - + "lates/{inspect_template}\352A\327\001\n%dlp.google" - + "apis.com/DeidentifyTemplate\022[organizatio" - + "ns/{organization}/locations/{location}/d" - + "eidentifyTemplates/{deidentify_template}" - + "\022Qprojects/{project}/locations/{location" - + "}/deidentifyTemplates/{deidentify_templa" - + "te}b\006proto3" + + ".AudioExportSettings.AudioFormat\"H\n\013Audi" + + "oFormat\022\034\n\030AUDIO_FORMAT_UNSPECIFIED\020\000\022\t\n" + + "\005MULAW\020\001\022\007\n\003MP3\020\002\022\007\n\003OGG\020\003\0328\n\026InsightsEx" + + "portSettings\022\036\n\026enable_insights_export\030\001" + + " \001(\010\"P\n\021RedactionStrategy\022\"\n\036REDACTION_S" + + "TRATEGY_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SER" + + "VICE\020\001\"J\n\016RedactionScope\022\037\n\033REDACTION_SC" + + "OPE_UNSPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE" + + "\020\002\"V\n\021RetentionStrategy\022\"\n\036RETENTION_STR" + + "ATEGY_UNSPECIFIED\020\000\022\035\n\031REMOVE_AFTER_CONV" + + "ERSATION\020\001\"H\n\rPurgeDataType\022\037\n\033PURGE_DAT" + + "A_TYPE_UNSPECIFIED\020\000\022\026\n\022DIALOGFLOW_HISTO" + + "RY\020\001:}\352Az\n*dialogflow.googleapis.com/Sec" + + "uritySettings\022Lprojects/{project}/locati" + + "ons/{location}/securitySettings/{securit" + + "y_settings}B\020\n\016data_retention2\357\t\n\027Securi" + + "tySettingsService\022\363\001\n\026CreateSecuritySett" + + "ings\022<.google.cloud.dialogflow.cx.v3.Cre" + + "ateSecuritySettingsRequest\032/.google.clou" + + "d.dialogflow.cx.v3.SecuritySettings\"j\332A\030" + + "parent,security_settings\202\323\344\223\002I\"4/v3/{par" + + "ent=projects/*/locations/*}/securitySett" + + "ings:\021security_settings\022\306\001\n\023GetSecurityS" + + "ettings\0229.google.cloud.dialogflow.cx.v3." + + "GetSecuritySettingsRequest\032/.google.clou" + + "d.dialogflow.cx.v3.SecuritySettings\"C\332A\004" + + "name\202\323\344\223\0026\0224/v3/{name=projects/*/locatio" + + "ns/*/securitySettings/*}\022\213\002\n\026UpdateSecur" + + "itySettings\022<.google.cloud.dialogflow.cx" + + ".v3.UpdateSecuritySettingsRequest\032/.goog" + + "le.cloud.dialogflow.cx.v3.SecuritySettin" + + "gs\"\201\001\332A\035security_settings,update_mask\202\323\344" + + "\223\002[2F/v3/{security_settings.name=project" + + "s/*/locations/*/securitySettings/*}:\021sec" + + "urity_settings\022\326\001\n\024ListSecuritySettings\022" + + ":.google.cloud.dialogflow.cx.v3.ListSecu" + + "ritySettingsRequest\032;.google.cloud.dialo" + + "gflow.cx.v3.ListSecuritySettingsResponse" + + "\"E\332A\006parent\202\323\344\223\0026\0224/v3/{parent=projects/" + + "*/locations/*}/securitySettings\022\263\001\n\026Dele" + + "teSecuritySettings\022<.google.cloud.dialog" + + "flow.cx.v3.DeleteSecuritySettingsRequest" + + "\032\026.google.protobuf.Empty\"C\332A\004name\202\323\344\223\0026*" + + "4/v3/{name=projects/*/locations/*/securi" + + "tySettings/*}\032x\312A\031dialogflow.googleapis." + + "com\322AYhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/" + + "auth/dialogflowB\342\004\n!com.google.cloud.dia" + + "logflow.cx.v3B\025SecuritySettingsProtoP\001Z1" + + "cloud.google.com/go/dialogflow/cx/apiv3/" + + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" + + "low.Cx.V3\352\002!Google::Cloud::Dialogflow::C" + + "X::V3\352A\310\001\n\"dlp.googleapis.com/InspectTem" + + "plate\022Uorganizations/{organization}/loca" + + "tions/{location}/inspectTemplates/{inspe" + + "ct_template}\022Kprojects/{project}/locatio" + + "ns/{location}/inspectTemplates/{inspect_" + + "template}\352A\327\001\n%dlp.googleapis.com/Deiden" + + "tifyTemplate\022[organizations/{organizatio" + + "n}/locations/{location}/deidentifyTempla" + + "tes/{deidentify_template}\022Qprojects/{pro" + + "ject}/locations/{location}/deidentifyTem" + + "plates/{deidentify_template}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -256,6 +260,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InspectTemplate", "DeidentifyTemplate", "RetentionWindowDays", + "RetentionStrategy", "PurgeDataTypes", "AudioExportSettings", "InsightsExportSettings", 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 2b5f713f9a22..506c825d9e96 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 @@ -160,7 +160,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\004\342A\001\002\022M\n\023output_audio_config\030\004 \001(\01320.go" + "ogle.cloud.dialogflow.cx.v3.OutputAudioC" + "onfig\022\037\n\027enable_partial_response\030\005 \001(\010\022\035" - + "\n\025enable_debugging_info\030\010 \001(\010\"\370\006\n\036CloudC" + + "\n\025enable_debugging_info\030\010 \001(\010\"\260\007\n\036CloudC" + "onversationDebuggingInfo\022\031\n\021audio_data_c" + "hunks\030\001 \001(\005\0229\n\026result_end_time_offset\030\002 " + "\001(\0132\031.google.protobuf.Duration\0227\n\024first_" @@ -178,159 +178,160 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\r \003(\0132\031.google.protobuf.Duration\022C\n sing" + "le_utterance_end_time_offset\030\016 \001(\0132\031.goo" + "gle.protobuf.Duration\0224\n\021no_speech_timeo" - + "ut\030\017 \001(\0132\031.google.protobuf.Duration\022\025\n\ri" - + "s_input_text\030\020 \001(\010\022@\n\035client_half_close_" - + "time_offset\030\021 \001(\0132\031.google.protobuf.Dura" - + "tion\022J\n\'client_half_close_streaming_time" - + "_offset\030\022 \001(\0132\031.google.protobuf.Duration" - + "\"\262\002\n\035StreamingDetectIntentResponse\022W\n\022re" - + "cognition_result\030\001 \001(\01329.google.cloud.di" - + "alogflow.cx.v3.StreamingRecognitionResul" - + "tH\000\022U\n\026detect_intent_response\030\002 \001(\01323.go" - + "ogle.cloud.dialogflow.cx.v3.DetectIntent" - + "ResponseH\000\022U\n\016debugging_info\030\004 \001(\0132=.goo" - + "gle.cloud.dialogflow.cx.v3.CloudConversa" - + "tionDebuggingInfoB\n\n\010response\"\266\003\n\032Stream" - + "ingRecognitionResult\022[\n\014message_type\030\001 \001" - + "(\0162E.google.cloud.dialogflow.cx.v3.Strea" - + "mingRecognitionResult.MessageType\022\022\n\ntra" - + "nscript\030\002 \001(\t\022\020\n\010is_final\030\003 \001(\010\022\022\n\nconfi" - + "dence\030\004 \001(\002\022\021\n\tstability\030\006 \001(\002\022G\n\020speech" - + "_word_info\030\007 \003(\0132-.google.cloud.dialogfl" - + "ow.cx.v3.SpeechWordInfo\0224\n\021speech_end_of" - + "fset\030\010 \001(\0132\031.google.protobuf.Duration\022\025\n" - + "\rlanguage_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030M" - + "ESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020" - + "\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"\212\005\n\017Query" - + "Parameters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_loc" - + "ation\030\002 \001(\0132\023.google.type.LatLng\022N\n\024sess" - + "ion_entity_types\030\003 \003(\01320.google.cloud.di" - + "alogflow.cx.v3.SessionEntityType\022(\n\007payl" - + "oad\030\004 \001(\0132\027.google.protobuf.Struct\022+\n\npa" - + "rameters\030\005 \001(\0132\027.google.protobuf.Struct\022" - + "9\n\014current_page\030\006 \001(\tB#\372A \n\036dialogflow.g" - + "oogleapis.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(\0132B.google.clou" - + "d.dialogflow.cx.v3.QueryParameters.Webho" - + "okHeadersEntry\022=\n\rflow_versions\030\016 \003(\tB&\372" - + "A#\n!dialogflow.googleapis.com/Version\022\017\n" - + "\007channel\030\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.go" - + "ogle.protobuf.DurationB\004\342A\001\001\0325\n\023WebhookH" - + "eadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"\334\002\n\nQueryInput\0228\n\004text\030\002 \001(\0132(.googl" - + "e.cloud.dialogflow.cx.v3.TextInputH\000\022<\n\006" - + "intent\030\003 \001(\0132*.google.cloud.dialogflow.c" - + "x.v3.IntentInputH\000\022:\n\005audio\030\005 \001(\0132).goog" - + "le.cloud.dialogflow.cx.v3.AudioInputH\000\022:" - + "\n\005event\030\006 \001(\0132).google.cloud.dialogflow." - + "cx.v3.EventInputH\000\0228\n\004dtmf\030\007 \001(\0132(.googl" - + "e.cloud.dialogflow.cx.v3.DtmfInputH\000\022\033\n\r" - + "language_code\030\004 \001(\tB\004\342A\001\002B\007\n\005input\"\241\006\n\013Q" - + "ueryResult\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_in" - + "tent\030\013 \001(\tB%\372A\"\n dialogflow.googleapis.c" - + "om/IntentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtri" - + "gger_event\030\016 \001(\tH\000\0228\n\004dtmf\030\027 \001(\0132(.googl" - + "e.cloud.dialogflow.cx.v3.DtmfInputH\000\022\025\n\r" - + "language_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132" - + "\027.google.protobuf.Struct\022I\n\021response_mes" - + "sages\030\004 \003(\0132..google.cloud.dialogflow.cx" - + ".v3.ResponseMessage\022,\n\020webhook_statuses\030" - + "\r \003(\0132\022.google.rpc.Status\0221\n\020webhook_pay" - + "loads\030\006 \003(\0132\027.google.protobuf.Struct\0229\n\014" - + "current_page\030\007 \001(\0132#.google.cloud.dialog" - + "flow.cx.v3.Page\0229\n\006intent\030\010 \001(\0132%.google" - + ".cloud.dialogflow.cx.v3.IntentB\002\030\001\022\'\n\033in" - + "tent_detection_confidence\030\t \001(\002B\002\030\001\0223\n\005m" - + "atch\030\017 \001(\0132$.google.cloud.dialogflow.cx." - + "v3.Match\0220\n\017diagnostic_info\030\n \001(\0132\027.goog" - + "le.protobuf.Struct\022Y\n\031sentiment_analysis" - + "_result\030\021 \001(\01326.google.cloud.dialogflow." - + "cx.v3.SentimentAnalysisResultB\007\n\005query\"\037" - + "\n\tTextInput\022\022\n\004text\030\001 \001(\tB\004\342A\001\002\"H\n\013Inten" - + "tInput\0229\n\006intent\030\001 \001(\tB)\342A\001\002\372A\"\n dialogf" - + "low.googleapis.com/Intent\"b\n\nAudioInput\022" - + "E\n\006config\030\001 \001(\0132/.google.cloud.dialogflo" - + "w.cx.v3.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\tDt" - + "mfInput\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\nparameters\030\002 \001(\0132\027.google.proto" - + "buf.Struct\022\026\n\016resolved_input\030\003 \001(\t\022B\n\nma" - + "tch_type\030\004 \001(\0162..google.cloud.dialogflow" - + ".cx.v3.Match.MatchType\022\022\n\nconfidence\030\005 \001" - + "(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYPE_UNSPECIFI" - + "ED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021P" - + "ARAMETER_FILLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_I" - + "NPUT\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.g" - + "oogleapis.com/Session\022D\n\014query_params\030\002 " - + "\001(\0132..google.cloud.dialogflow.cx.v3.Quer" - + "yParameters\022D\n\013query_input\030\003 \001(\0132).googl" - + "e.cloud.dialogflow.cx.v3.QueryInputB\004\342A\001" - + "\002\022!\n\031persist_parameter_changes\030\005 \001(\010\"\220\002\n" - + "\023MatchIntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016" - + "trigger_intent\030\002 \001(\tB%\372A\"\n dialogflow.go" - + "ogleapis.com/IntentH\000\022\024\n\ntranscript\030\003 \001(" - + "\tH\000\022\027\n\rtrigger_event\030\006 \001(\tH\000\0225\n\007matches\030" - + "\004 \003(\0132$.google.cloud.dialogflow.cx.v3.Ma" - + "tch\0229\n\014current_page\030\005 \001(\0132#.google.cloud" - + ".dialogflow.cx.v3.PageB\007\n\005query\"\353\001\n\024Fulf" - + "illIntentRequest\022O\n\024match_intent_request" - + "\030\001 \001(\01321.google.cloud.dialogflow.cx.v3.M" - + "atchIntentRequest\0223\n\005match\030\002 \001(\0132$.googl" - + "e.cloud.dialogflow.cx.v3.Match\022M\n\023output" - + "_audio_config\030\003 \001(\01320.google.cloud.dialo" - + "gflow.cx.v3.OutputAudioConfig\"\323\001\n\025Fulfil" - + "lIntentResponse\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\003" - + " \001(\014\022M\n\023output_audio_config\030\004 \001(\01320.goog" - + "le.cloud.dialogflow.cx.v3.OutputAudioCon" - + "fig\";\n\027SentimentAnalysisResult\022\r\n\005score\030" - + "\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\304\t\n\010Sessions\022\246\002" - + "\n\014DetectIntent\0222.google.cloud.dialogflow" - + ".cx.v3.DetectIntentRequest\0323.google.clou" - + "d.dialogflow.cx.v3.DetectIntentResponse\"" - + "\254\001\202\323\344\223\002\245\001\"E/v3/{session=projects/*/locat" - + "ions/*/agents/*/sessions/*}:detectIntent" - + ":\001*ZY\"T/v3/{session=projects/*/locations" - + "/*/agents/*/environments/*/sessions/*}:d" - + "etectIntent:\001*\022\230\001\n\025StreamingDetectIntent" - + "\022;.google.cloud.dialogflow.cx.v3.Streami" - + "ngDetectIntentRequest\032<.google.cloud.dia" - + "logflow.cx.v3.StreamingDetectIntentRespo" - + "nse\"\000(\0010\001\022\241\002\n\013MatchIntent\0221.google.cloud" - + ".dialogflow.cx.v3.MatchIntentRequest\0322.g" - + "oogle.cloud.dialogflow.cx.v3.MatchIntent" - + "Response\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=project" - + "s/*/locations/*/agents/*/sessions/*}:mat" - + "chIntent:\001*ZX\"S/v3/{session=projects/*/l" - + "ocations/*/agents/*/environments/*/sessi" - + "ons/*}:matchIntent:\001*\022\325\002\n\rFulfillIntent\022" - + "3.google.cloud.dialogflow.cx.v3.FulfillI" - + "ntentRequest\0324.google.cloud.dialogflow.c" - + "x.v3.FulfillIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v" - + "3/{match_intent_request.session=projects" - + "/*/locations/*/agents/*/sessions/*}:fulf" - + "illIntent:\001*Zo\"j/v3/{match_intent_reques" - + "t.session=projects/*/locations/*/agents/" - + "*/environments/*/sessions/*}:fulfillInte" - + "nt:\001*\032x\312A\031dialogflow.googleapis.com\322AYht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "form,https://www.googleapis.com/auth/dia" - + "logflowB\212\003\n!com.google.cloud.dialogflow." - + "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!Googl" - + "e::Cloud::Dialogflow::CX::V3\352A\324\001\n!dialog" - + "flow.googleapis.com/Session\022Iprojects/{p" - + "roject}/locations/{location}/agents/{age" - + "nt}/sessions/{session}\022dprojects/{projec" - + "t}/locations/{location}/agents/{agent}/e" - + "nvironments/{environment}/sessions/{sess" - + "ion}b\006proto3" + + "ut\030\017 \001(\0132\031.google.protobuf.Duration\0226\n\023e" + + "ndpointing_timeout\030\023 \001(\0132\031.google.protob" + + "uf.Duration\022\025\n\ris_input_text\030\020 \001(\010\022@\n\035cl" + + "ient_half_close_time_offset\030\021 \001(\0132\031.goog" + + "le.protobuf.Duration\022J\n\'client_half_clos" + + "e_streaming_time_offset\030\022 \001(\0132\031.google.p" + + "rotobuf.Duration\"\262\002\n\035StreamingDetectInte" + + "ntResponse\022W\n\022recognition_result\030\001 \001(\01329" + + ".google.cloud.dialogflow.cx.v3.Streaming" + + "RecognitionResultH\000\022U\n\026detect_intent_res" + + "ponse\030\002 \001(\01323.google.cloud.dialogflow.cx" + + ".v3.DetectIntentResponseH\000\022U\n\016debugging_" + + "info\030\004 \001(\0132=.google.cloud.dialogflow.cx." + + "v3.CloudConversationDebuggingInfoB\n\n\010res" + + "ponse\"\266\003\n\032StreamingRecognitionResult\022[\n\014" + + "message_type\030\001 \001(\0162E.google.cloud.dialog" + + "flow.cx.v3.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\022G\n\020speech_word_info\030\007 \003(\0132-.googl" + + "e.cloud.dialogflow.cx.v3.SpeechWordInfo\022" + + "4\n\021speech_end_offset\030\010 \001(\0132\031.google.prot" + + "obuf.Duration\022\025\n\rlanguage_code\030\n \001(\t\"X\n\013" + + "MessageType\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020" + + "\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_UTTER" + + "ANCE\020\002\"\212\005\n\017QueryParameters\022\021\n\ttime_zone\030" + + "\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.google.typ" + + "e.LatLng\022N\n\024session_entity_types\030\003 \003(\01320" + + ".google.cloud.dialogflow.cx.v3.SessionEn" + + "tityType\022(\n\007payload\030\004 \001(\0132\027.google.proto" + + "buf.Struct\022+\n\nparameters\030\005 \001(\0132\027.google." + + "protobuf.Struct\0229\n\014current_page\030\006 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/Page\022\027\n\017di" + + "sable_webhook\030\007 \001(\010\022$\n\034analyze_query_tex" + + "t_sentiment\030\010 \001(\010\022[\n\017webhook_headers\030\n \003" + + "(\0132B.google.cloud.dialogflow.cx.v3.Query" + + "Parameters.WebhookHeadersEntry\022=\n\rflow_v" + + "ersions\030\016 \003(\tB&\372A#\n!dialogflow.googleapi" + + "s.com/Version\022\017\n\007channel\030\017 \001(\t\0224\n\013sessio" + + "n_ttl\030\020 \001(\0132\031.google.protobuf.DurationB\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\"\334\002\n\nQueryInput\0228\n\004te" + + "xt\030\002 \001(\0132(.google.cloud.dialogflow.cx.v3" + + ".TextInputH\000\022<\n\006intent\030\003 \001(\0132*.google.cl" + + "oud.dialogflow.cx.v3.IntentInputH\000\022:\n\005au" + + "dio\030\005 \001(\0132).google.cloud.dialogflow.cx.v" + + "3.AudioInputH\000\022:\n\005event\030\006 \001(\0132).google.c" + + "loud.dialogflow.cx.v3.EventInputH\000\0228\n\004dt" + + "mf\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3" + + ".DtmfInputH\000\022\033\n\rlanguage_code\030\004 \001(\tB\004\342A\001" + + "\002B\007\n\005input\"\241\006\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\0228\n\004dt" + + "mf\030\027 \001(\0132(.google.cloud.dialogflow.cx.v3" + + ".DtmfInputH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\np" + + "arameters\030\003 \001(\0132\027.google.protobuf.Struct" + + "\022I\n\021response_messages\030\004 \003(\0132..google.clo" + + "ud.dialogflow.cx.v3.ResponseMessage\022,\n\020w" + + "ebhook_statuses\030\r \003(\0132\022.google.rpc.Statu" + + "s\0221\n\020webhook_payloads\030\006 \003(\0132\027.google.pro" + + "tobuf.Struct\0229\n\014current_page\030\007 \001(\0132#.goo" + + "gle.cloud.dialogflow.cx.v3.Page\0229\n\006inten" + + "t\030\010 \001(\0132%.google.cloud.dialogflow.cx.v3." + + "IntentB\002\030\001\022\'\n\033intent_detection_confidenc" + + "e\030\t \001(\002B\002\030\001\0223\n\005match\030\017 \001(\0132$.google.clou" + + "d.dialogflow.cx.v3.Match\0220\n\017diagnostic_i" + + "nfo\030\n \001(\0132\027.google.protobuf.Struct\022Y\n\031se" + + "ntiment_analysis_result\030\021 \001(\01326.google.c" + + "loud.dialogflow.cx.v3.SentimentAnalysisR" + + "esultB\007\n\005query\"\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/Inten" + + "t\"b\n\nAudioInput\022E\n\006config\030\001 \001(\0132/.google" + + ".cloud.dialogflow.cx.v3.InputAudioConfig" + + "B\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005e" + + "vent\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\006inten" + + "t\030\001 \001(\0132%.google.cloud.dialogflow.cx.v3." + + "Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001(" + + "\0132\027.google.protobuf.Struct\022\026\n\016resolved_i" + + "nput\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\tMatchType\022\032\n\026MATC" + + "H_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRE" + + "CT_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\022Ma" + + "tchIntentRequest\022;\n\007session\030\001 \001(\tB*\342A\001\002\372" + + "A#\n!dialogflow.googleapis.com/Session\022D\n" + + "\014query_params\030\002 \001(\0132..google.cloud.dialo" + + "gflow.cx.v3.QueryParameters\022D\n\013query_inp" + + "ut\030\003 \001(\0132).google.cloud.dialogflow.cx.v3" + + ".QueryInputB\004\342A\001\002\022!\n\031persist_parameter_c" + + "hanges\030\005 \001(\010\"\220\002\n\023MatchIntentResponse\022\016\n\004" + + "text\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\rtrigger_event\030\006 \001" + + "(\tH\000\0225\n\007matches\030\004 \003(\0132$.google.cloud.dia" + + "logflow.cx.v3.Match\0229\n\014current_page\030\005 \001(" + + "\0132#.google.cloud.dialogflow.cx.v3.PageB\007" + + "\n\005query\"\353\001\n\024FulfillIntentRequest\022O\n\024matc" + + "h_intent_request\030\001 \001(\01321.google.cloud.di" + + "alogflow.cx.v3.MatchIntentRequest\0223\n\005mat" + + "ch\030\002 \001(\0132$.google.cloud.dialogflow.cx.v3" + + ".Match\022M\n\023output_audio_config\030\003 \001(\01320.go" + + "ogle.cloud.dialogflow.cx.v3.OutputAudioC" + + "onfig\"\323\001\n\025FulfillIntentResponse\022\023\n\013respo" + + "nse_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\0132*.goo" + + "gle.cloud.dialogflow.cx.v3.QueryResult\022\024" + + "\n\014output_audio\030\003 \001(\014\022M\n\023output_audio_con" + + "fig\030\004 \001(\01320.google.cloud.dialogflow.cx.v" + + "3.OutputAudioConfig\";\n\027SentimentAnalysis" + + "Result\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\002" + + "2\304\t\n\010Sessions\022\246\002\n\014DetectIntent\0222.google." + + "cloud.dialogflow.cx.v3.DetectIntentReque" + + "st\0323.google.cloud.dialogflow.cx.v3.Detec" + + "tIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{session=" + + "projects/*/locations/*/agents/*/sessions" + + "/*}:detectIntent:\001*ZY\"T/v3/{session=proj" + + "ects/*/locations/*/agents/*/environments" + + "/*/sessions/*}:detectIntent:\001*\022\230\001\n\025Strea" + + "mingDetectIntent\022;.google.cloud.dialogfl" + + "ow.cx.v3.StreamingDetectIntentRequest\032<." + + "google.cloud.dialogflow.cx.v3.StreamingD" + + "etectIntentResponse\"\000(\0010\001\022\241\002\n\013MatchInten" + + "t\0221.google.cloud.dialogflow.cx.v3.MatchI" + + "ntentRequest\0322.google.cloud.dialogflow.c" + + "x.v3.MatchIntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/" + + "{session=projects/*/locations/*/agents/*" + + "/sessions/*}:matchIntent:\001*ZX\"S/v3/{sess" + + "ion=projects/*/locations/*/agents/*/envi" + + "ronments/*/sessions/*}:matchIntent:\001*\022\325\002" + + "\n\rFulfillIntent\0223.google.cloud.dialogflo" + + "w.cx.v3.FulfillIntentRequest\0324.google.cl" + + "oud.dialogflow.cx.v3.FulfillIntentRespon" + + "se\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_intent_request." + + "session=projects/*/locations/*/agents/*/" + + "sessions/*}:fulfillIntent:\001*Zo\"j/v3/{mat" + + "ch_intent_request.session=projects/*/loc" + + "ations/*/agents/*/environments/*/session" + + "s/*}:fulfillIntent:\001*\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\212\003\n!com.google.c" + + "loud.dialogflow.cx.v3B\014SessionProtoP\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\352A\324\001\n!dialogflow.googleapis.com/Sess" + + "ion\022Iprojects/{project}/locations/{locat" + + "ion}/agents/{agent}/sessions/{session}\022d" + + "projects/{project}/locations/{location}/" + + "agents/{agent}/environments/{environment" + + "}/sessions/{session}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -404,6 +405,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DtmfFinalResultsTimes", "SingleUtteranceEndTimeOffset", "NoSpeechTimeout", + "EndpointingTimeout", "IsInputText", "ClientHalfCloseTimeOffset", "ClientHalfCloseStreamingTimeOffset", diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java index bd538b3682a5..629a442d312b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java @@ -54,6 +54,7 @@ private TransitionRoute(com.google.protobuf.GeneratedMessageV3.Builder builde private TransitionRoute() { name_ = ""; + description_ = ""; intent_ = ""; condition_ = ""; } @@ -179,6 +180,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int INTENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -551,6 +605,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } getUnknownFields().writeTo(output); } @@ -578,6 +635,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -595,6 +655,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3.TransitionRoute) obj; if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (!getIntent().equals(other.getIntent())) return false; if (!getCondition().equals(other.getCondition())) return false; if (hasTriggerFulfillment() != other.hasTriggerFulfillment()) return false; @@ -625,6 +686,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + INTENT_FIELD_NUMBER; hash = (53 * hash) + getIntent().hashCode(); hash = (37 * hash) + CONDITION_FIELD_NUMBER; @@ -800,6 +863,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; + description_ = ""; intent_ = ""; condition_ = ""; triggerFulfillment_ = null; @@ -850,12 +914,15 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.TransitionRoute res result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.intent_ = intent_; + result.description_ = description_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.condition_ = condition_; + result.intent_ = intent_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.triggerFulfillment_ = triggerFulfillmentBuilder_ == null ? triggerFulfillment_ @@ -919,14 +986,19 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TransitionRoute other bitField0_ |= 0x00000001; onChanged(); } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } if (!other.getIntent().isEmpty()) { intent_ = other.intent_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getCondition().isEmpty()) { condition_ = other.condition_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.hasTriggerFulfillment()) { @@ -981,20 +1053,20 @@ public Builder mergeFrom( case 10: { intent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 10 case 18: { condition_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 18 case 26: { input.readMessage( getTriggerFulfillmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 26 case 34: @@ -1017,6 +1089,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 50 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1156,6 +1234,117 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private java.lang.Object intent_ = ""; /** * @@ -1239,7 +1428,7 @@ public Builder setIntent(java.lang.String value) { throw new NullPointerException(); } intent_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1263,7 +1452,7 @@ public Builder setIntent(java.lang.String value) { */ public Builder clearIntent() { intent_ = getDefaultInstance().getIntent(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1292,7 +1481,7 @@ public Builder setIntentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); intent_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1383,7 +1572,7 @@ public Builder setCondition(java.lang.String value) { throw new NullPointerException(); } condition_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1408,7 +1597,7 @@ public Builder setCondition(java.lang.String value) { */ public Builder clearCondition() { condition_ = getDefaultInstance().getCondition(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1438,7 +1627,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); condition_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1463,7 +1652,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { * @return Whether the triggerFulfillment field is set. */ public boolean hasTriggerFulfillment() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1507,7 +1696,7 @@ public Builder setTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillme } else { triggerFulfillmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1529,7 +1718,7 @@ public Builder setTriggerFulfillment( } else { triggerFulfillmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1546,7 +1735,7 @@ public Builder setTriggerFulfillment( */ public Builder mergeTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { if (triggerFulfillmentBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && triggerFulfillment_ != null && triggerFulfillment_ != com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance()) { @@ -1557,7 +1746,7 @@ public Builder mergeTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfill } else { triggerFulfillmentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1573,7 +1762,7 @@ public Builder mergeTriggerFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfill * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; */ public Builder clearTriggerFulfillment() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); triggerFulfillment_ = null; if (triggerFulfillmentBuilder_ != null) { triggerFulfillmentBuilder_.dispose(); @@ -1594,7 +1783,7 @@ public Builder clearTriggerFulfillment() { * .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; */ public com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder getTriggerFulfillmentBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getTriggerFulfillmentFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java index 873c21ac2f0b..4b3c9bb55652 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java @@ -22,7 +22,7 @@ * * *
- * An TransitionRouteGroup represents a group of
+ * A TransitionRouteGroup represents a group of
  * [`TransitionRoutes`][google.cloud.dialogflow.cx.v3.TransitionRoute] to be
  * used by a [Page][google.cloud.dialogflow.cx.v3.Page].
  * 
@@ -78,7 +78,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -105,7 +106,8 @@ public java.lang.String getName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -440,7 +442,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An TransitionRouteGroup represents a group of
+   * A TransitionRouteGroup represents a group of
    * [`TransitionRoutes`][google.cloud.dialogflow.cx.v3.TransitionRoute] to be
    * used by a [Page][google.cloud.dialogflow.cx.v3.Page].
    * 
@@ -707,7 +709,8 @@ public Builder mergeFrom( * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -733,7 +736,8 @@ public java.lang.String getName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -759,7 +763,8 @@ public com.google.protobuf.ByteString getNameBytes() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -784,7 +789,8 @@ public Builder setName(java.lang.String value) { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -805,7 +811,8 @@ public Builder clearName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java index e0bf6e9e2481..77aba40a278d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java @@ -16,7 +16,9 @@ package com.google.cloud.dialogflow.cx.v3; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -32,7 +34,12 @@ public class TransitionRouteGroupName implements ResourceName { private static final PathTemplate PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"); + private static final PathTemplate PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; private final String project; private final String location; private final String agent; @@ -54,6 +61,16 @@ private TransitionRouteGroupName(Builder builder) { agent = Preconditions.checkNotNull(builder.getAgent()); flow = Preconditions.checkNotNull(builder.getFlow()); transitionRouteGroup = Preconditions.checkNotNull(builder.getTransitionRouteGroup()); + pathTemplate = PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP; + } + + private TransitionRouteGroupName(ProjectLocationAgentTransitionRouteGroupBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + transitionRouteGroup = Preconditions.checkNotNull(builder.getTransitionRouteGroup()); + flow = null; + pathTemplate = PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP; } public String getProject() { @@ -80,6 +97,17 @@ public static Builder newBuilder() { return new Builder(); } + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationAgentFlowTransitionRouteGroupBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationAgentTransitionRouteGroupBuilder + newProjectLocationAgentTransitionRouteGroupBuilder() { + return new ProjectLocationAgentTransitionRouteGroupBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -95,6 +123,29 @@ public static TransitionRouteGroupName of( .build(); } + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TransitionRouteGroupName ofProjectLocationAgentFlowTransitionRouteGroupName( + String project, String location, String agent, String flow, String transitionRouteGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TransitionRouteGroupName ofProjectLocationAgentTransitionRouteGroupName( + String project, String location, String agent, String transitionRouteGroup) { + return newProjectLocationAgentTransitionRouteGroupBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + } + public static String format( String project, String location, String agent, String flow, String transitionRouteGroup) { return newBuilder() @@ -107,19 +158,55 @@ public static String format( .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationAgentFlowTransitionRouteGroupName( + String project, String location, String agent, String flow, String transitionRouteGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .setTransitionRouteGroup(transitionRouteGroup) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationAgentTransitionRouteGroupName( + String project, String location, String agent, String transitionRouteGroup) { + return newProjectLocationAgentTransitionRouteGroupBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTransitionRouteGroup(transitionRouteGroup) + .build() + .toString(); + } + public static TransitionRouteGroupName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.validatedMatch( - formattedString, "TransitionRouteGroupName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("agent"), - matchMap.get("flow"), - matchMap.get("transition_route_group")); + if (PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.match(formattedString); + return ofProjectLocationAgentFlowTransitionRouteGroupName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("flow"), + matchMap.get("transition_route_group")); + } else if (PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.match(formattedString); + return ofProjectLocationAgentTransitionRouteGroupName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("transition_route_group")); + } + throw new ValidationException( + "TransitionRouteGroupName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -143,7 +230,8 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString); + return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString) + || PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.matches(formattedString); } @Override @@ -180,17 +268,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.instantiate( - "project", - project, - "location", - location, - "agent", - agent, - "flow", - flow, - "transition_route_group", - transitionRouteGroup); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } @Override @@ -213,6 +291,8 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; h ^= Objects.hashCode(project); h *= 1000003; h ^= Objects.hashCode(location); @@ -284,6 +364,11 @@ public Builder setTransitionRouteGroup(String transitionRouteGroup) { } private Builder(TransitionRouteGroupName transitionRouteGroupName) { + Preconditions.checkArgument( + Objects.equals( + transitionRouteGroupName.pathTemplate, + PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP), + "toBuilder is only supported when TransitionRouteGroupName has the pattern of projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"); this.project = transitionRouteGroupName.project; this.location = transitionRouteGroupName.location; this.agent = transitionRouteGroupName.agent; @@ -295,4 +380,59 @@ public TransitionRouteGroupName build() { return new TransitionRouteGroupName(this); } } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationAgentTransitionRouteGroupBuilder { + private String project; + private String location; + private String agent; + private String transitionRouteGroup; + + protected ProjectLocationAgentTransitionRouteGroupBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTransitionRouteGroup() { + return transitionRouteGroup; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setAgent(String agent) { + this.agent = agent; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setTransitionRouteGroup( + String transitionRouteGroup) { + this.transitionRouteGroup = transitionRouteGroup; + return this; + } + + public TransitionRouteGroupName build() { + return new TransitionRouteGroupName(this); + } + } } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java index 1f3ac3b7a96c..34d28f01e557 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java @@ -31,7 +31,8 @@ public interface TransitionRouteGroupOrBuilder * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; @@ -47,7 +48,8 @@ public interface TransitionRouteGroupOrBuilder * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` + * . * * * string name = 1; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupProto.java index bb2384a3c170..e62c72c3ce10 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupProto.java @@ -71,82 +71,96 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ield_behavior.proto\032\031google/api/resource" + ".proto\032(google/cloud/dialogflow/cx/v3/pa" + "ge.proto\032\033google/protobuf/empty.proto\032 g" - + "oogle/protobuf/field_mask.proto\"\266\002\n\024Tran" + + "oogle/protobuf/field_mask.proto\"\312\003\n\024Tran" + "sitionRouteGroup\022\014\n\004name\030\001 \001(\t\022\032\n\014displa" + "y_name\030\002 \001(\tB\004\342A\001\002\022I\n\021transition_routes\030" + "\005 \003(\0132..google.cloud.dialogflow.cx.v3.Tr" - + "ansitionRoute:\250\001\352A\244\001\n.dialogflow.googlea" + + "ansitionRoute:\274\002\352A\270\002\n.dialogflow.googlea" + "pis.com/TransitionRouteGroup\022rprojects/{" + "project}/locations/{location}/agents/{ag" + "ent}/flows/{flow}/transitionRouteGroups/" - + "{transition_route_group}\"\251\001\n ListTransit" - + "ionRouteGroupsRequest\022G\n\006parent\030\001 \001(\tB7\342" - + "A\001\002\372A0\022.dialogflow.googleapis.com/Transi" - + "tionRouteGroup\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" - + "e_token\030\003 \001(\t\022\025\n\rlanguage_code\030\004 \001(\t\"\222\001\n" - + "!ListTransitionRouteGroupsResponse\022T\n\027tr" - + "ansition_route_groups\030\001 \003(\01323.google.clo" - + "ud.dialogflow.cx.v3.TransitionRouteGroup" - + "\022\027\n\017next_page_token\030\002 \001(\t\"~\n\036GetTransiti" - + "onRouteGroupRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372" - + "A0\n.dialogflow.googleapis.com/Transition" - + "RouteGroup\022\025\n\rlanguage_code\030\002 \001(\t\"\336\001\n!Cr" - + "eateTransitionRouteGroupRequest\022G\n\006paren" - + "t\030\001 \001(\tB7\342A\001\002\372A0\022.dialogflow.googleapis." - + "com/TransitionRouteGroup\022Y\n\026transition_r" - + "oute_group\030\002 \001(\01323.google.cloud.dialogfl" - + "ow.cx.v3.TransitionRouteGroupB\004\342A\001\002\022\025\n\rl" - + "anguage_code\030\003 \001(\t\"\306\001\n!UpdateTransitionR" - + "outeGroupRequest\022Y\n\026transition_route_gro" - + "up\030\001 \001(\01323.google.cloud.dialogflow.cx.v3" - + ".TransitionRouteGroupB\004\342A\001\002\022/\n\013update_ma" - + "sk\030\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\r" - + "language_code\030\003 \001(\t\"y\n!DeleteTransitionR" - + "outeGroupRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n" - + ".dialogflow.googleapis.com/TransitionRou" - + "teGroup\022\r\n\005force\030\002 \001(\0102\260\013\n\025TransitionRou" - + "teGroups\022\373\001\n\031ListTransitionRouteGroups\022?" - + ".google.cloud.dialogflow.cx.v3.ListTrans" - + "itionRouteGroupsRequest\032@.google.cloud.d" - + "ialogflow.cx.v3.ListTransitionRouteGroup" - + "sResponse\"[\332A\006parent\202\323\344\223\002L\022J/v3/{parent=" - + "projects/*/locations/*/agents/*/flows/*}" - + "/transitionRouteGroups\022\350\001\n\027GetTransition" - + "RouteGroup\022=.google.cloud.dialogflow.cx." - + "v3.GetTransitionRouteGroupRequest\0323.goog" - + "le.cloud.dialogflow.cx.v3.TransitionRout" - + "eGroup\"Y\332A\004name\202\323\344\223\002L\022J/v3/{name=project" - + "s/*/locations/*/agents/*/flows/*/transit" - + "ionRouteGroups/*}\022\240\002\n\032CreateTransitionRo" - + "uteGroup\022@.google.cloud.dialogflow.cx.v3" - + ".CreateTransitionRouteGroupRequest\0323.goo" - + "gle.cloud.dialogflow.cx.v3.TransitionRou" - + "teGroup\"\212\001\332A\035parent,transition_route_gro" - + "up\202\323\344\223\002d\"J/v3/{parent=projects/*/locatio" - + "ns/*/agents/*/flows/*}/transitionRouteGr" - + "oups:\026transition_route_group\022\274\002\n\032UpdateT" - + "ransitionRouteGroup\022@.google.cloud.dialo" - + "gflow.cx.v3.UpdateTransitionRouteGroupRe" - + "quest\0323.google.cloud.dialogflow.cx.v3.Tr" - + "ansitionRouteGroup\"\246\001\332A\"transition_route" - + "_group,update_mask\202\323\344\223\002{2a/v3/{transitio" - + "n_route_group.name=projects/*/locations/" - + "*/agents/*/flows/*/transitionRouteGroups" - + "/*}:\026transition_route_group\022\321\001\n\032DeleteTr" - + "ansitionRouteGroup\022@.google.cloud.dialog" - + "flow.cx.v3.DeleteTransitionRouteGroupReq" - + "uest\032\026.google.protobuf.Empty\"Y\332A\004name\202\323\344" - + "\223\002L*J/v3/{name=projects/*/locations/*/ag" - + "ents/*/flows/*/transitionRouteGroups/*}\032" - + "x\312A\031dialogflow.googleapis.com\322AYhttps://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/dialogflo" - + "wB\277\001\n!com.google.cloud.dialogflow.cx.v3B" - + "\031TransitionRouteGroupProtoP\001Z1cloud.goog" - + "le.com/go/dialogflow/cx/apiv3/cxpb;cxpb\370" - + "\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352" - + "\002!Google::Cloud::Dialogflow::CX::V3b\006pro" - + "to3" + + "{transition_route_group}\022eprojects/{proj" + + "ect}/locations/{location}/agents/{agent}" + + "/transitionRouteGroups/{transition_route" + + "_group}*\025transitionRouteGroups2\024transiti" + + "onRouteGroup\"\251\001\n ListTransitionRouteGrou" + + "psRequest\022G\n\006parent\030\001 \001(\tB7\342A\001\002\372A0\022.dial" + + "ogflow.googleapis.com/TransitionRouteGro" + + "up\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\022\025\n\rlanguage_code\030\004 \001(\t\"\222\001\n!ListTransit" + + "ionRouteGroupsResponse\022T\n\027transition_rou" + + "te_groups\030\001 \003(\01323.google.cloud.dialogflo" + + "w.cx.v3.TransitionRouteGroup\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"~\n\036GetTransitionRouteGroup" + + "Request\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogfl" + + "ow.googleapis.com/TransitionRouteGroup\022\025" + + "\n\rlanguage_code\030\002 \001(\t\"\336\001\n!CreateTransiti" + + "onRouteGroupRequest\022G\n\006parent\030\001 \001(\tB7\342A\001" + + "\002\372A0\022.dialogflow.googleapis.com/Transiti" + + "onRouteGroup\022Y\n\026transition_route_group\030\002" + + " \001(\01323.google.cloud.dialogflow.cx.v3.Tra" + + "nsitionRouteGroupB\004\342A\001\002\022\025\n\rlanguage_code" + + "\030\003 \001(\t\"\306\001\n!UpdateTransitionRouteGroupReq" + + "uest\022Y\n\026transition_route_group\030\001 \001(\01323.g" + + "oogle.cloud.dialogflow.cx.v3.TransitionR" + + "outeGroupB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMask\022\025\n\rlanguage_cod" + + "e\030\003 \001(\t\"y\n!DeleteTransitionRouteGroupReq" + + "uest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow." + + "googleapis.com/TransitionRouteGroup\022\r\n\005f" + + "orce\030\002 \001(\0102\335\016\n\025TransitionRouteGroups\022\303\002\n" + + "\031ListTransitionRouteGroups\022?.google.clou" + + "d.dialogflow.cx.v3.ListTransitionRouteGr" + + "oupsRequest\032@.google.cloud.dialogflow.cx" + + ".v3.ListTransitionRouteGroupsResponse\"\242\001" + + "\332A\006parent\202\323\344\223\002\222\001\022J/v3/{parent=projects/*" + + "/locations/*/agents/*/flows/*}/transitio" + + "nRouteGroupsZD\022B/v3/{parent=projects/*/l" + + "ocations/*/agents/*}/transitionRouteGrou" + + "ps\022\260\002\n\027GetTransitionRouteGroup\022=.google." + + "cloud.dialogflow.cx.v3.GetTransitionRout" + + "eGroupRequest\0323.google.cloud.dialogflow." + + "cx.v3.TransitionRouteGroup\"\240\001\332A\004name\202\323\344\223" + + "\002\222\001\022J/v3/{name=projects/*/locations/*/ag" + + "ents/*/flows/*/transitionRouteGroups/*}Z" + + "D\022B/v3/{name=projects/*/locations/*/agen" + + "ts/*/transitionRouteGroups/*}\022\377\002\n\032Create" + + "TransitionRouteGroup\022@.google.cloud.dial" + + "ogflow.cx.v3.CreateTransitionRouteGroupR" + + "equest\0323.google.cloud.dialogflow.cx.v3.T" + + "ransitionRouteGroup\"\351\001\332A\035parent,transiti" + + "on_route_group\202\323\344\223\002\302\001\"J/v3/{parent=proje" + + "cts/*/locations/*/agents/*/flows/*}/tran" + + "sitionRouteGroups:\026transition_route_grou" + + "pZ\\\"B/v3/{parent=projects/*/locations/*/" + + "agents/*}/transitionRouteGroups:\026transit" + + "ion_route_group\022\262\003\n\032UpdateTransitionRout" + + "eGroup\022@.google.cloud.dialogflow.cx.v3.U" + + "pdateTransitionRouteGroupRequest\0323.googl" + + "e.cloud.dialogflow.cx.v3.TransitionRoute" + + "Group\"\234\002\332A\"transition_route_group,update" + + "_mask\202\323\344\223\002\360\0012a/v3/{transition_route_grou" + + "p.name=projects/*/locations/*/agents/*/f" + + "lows/*/transitionRouteGroups/*}:\026transit" + + "ion_route_groupZs2Y/v3/{transition_route" + + "_group.name=projects/*/locations/*/agent" + + "s/*/transitionRouteGroups/*}:\026transition" + + "_route_group\022\231\002\n\032DeleteTransitionRouteGr" + + "oup\022@.google.cloud.dialogflow.cx.v3.Dele" + + "teTransitionRouteGroupRequest\032\026.google.p" + + "rotobuf.Empty\"\240\001\332A\004name\202\323\344\223\002\222\001*J/v3/{nam" + + "e=projects/*/locations/*/agents/*/flows/" + + "*/transitionRouteGroups/*}ZD*B/v3/{name=" + + "projects/*/locations/*/agents/*/transiti" + + "onRouteGroups/*}\032x\312A\031dialogflow.googleap" + + "is.com\322AYhttps://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.c" + + "om/auth/dialogflowB\277\001\n!com.google.cloud." + + "dialogflow.cx.v3B\031TransitionRouteGroupPr" + + "otoP\001Z1cloud.google.com/go/dialogflow/cx" + + "/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud." + + "Dialogflow.Cx.V3\352\002!Google::Cloud::Dialog" + + "flow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteOrBuilder.java index 023d10d277d1..4996b9d5c586 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteOrBuilder.java @@ -48,6 +48,33 @@ public interface TransitionRouteOrBuilder */ com.google.protobuf.ByteString getNameBytes(); + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateGenerativeSettingsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateGenerativeSettingsRequest.java new file mode 100644 index 000000000000..92ada03a773f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateGenerativeSettingsRequest.java @@ -0,0 +1,1039 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Request for
+ * [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.UpdateGenerativeSettings]
+ * RPC.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest} + */ +public final class UpdateGenerativeSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) + UpdateGenerativeSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateGenerativeSettingsRequest.newBuilder() to construct. + private UpdateGenerativeSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateGenerativeSettingsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateGenerativeSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_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_UpdateGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.Builder.class); + } + + public static final int GENERATIVE_SETTINGS_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.GenerativeSettings generativeSettings_; + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + @java.lang.Override + public boolean hasGenerativeSettings() { + return generativeSettings_ != null; + } + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings getGenerativeSettings() { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder + getGenerativeSettingsOrBuilder() { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 (generativeSettings_ != null) { + output.writeMessage(1, getGenerativeSettings()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (generativeSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenerativeSettings()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.UpdateGenerativeSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) obj; + + if (hasGenerativeSettings() != other.hasGenerativeSettings()) return false; + if (hasGenerativeSettings()) { + if (!getGenerativeSettings().equals(other.getGenerativeSettings())) 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(); + if (hasGenerativeSettings()) { + hash = (37 * hash) + GENERATIVE_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenerativeSettings().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.UpdateGenerativeSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest + 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.UpdateGenerativeSettingsRequest + 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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; + } + /** + * + * + *
+   * Request for
+   * [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.UpdateGenerativeSettings]
+   * RPC.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_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_UpdateGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + generativeSettings_ = null; + if (generativeSettingsBuilder_ != null) { + generativeSettingsBuilder_.dispose(); + generativeSettingsBuilder_ = 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.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateGenerativeSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.generativeSettings_ = + generativeSettingsBuilder_ == null + ? generativeSettings_ + : generativeSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 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.UpdateGenerativeSettingsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest.getDefaultInstance()) + return this; + if (other.hasGenerativeSettings()) { + mergeGenerativeSettings(other.getGenerativeSettings()); + } + 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: + { + input.readMessage( + getGenerativeSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.cloud.dialogflow.cx.v3.GenerativeSettings generativeSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder> + generativeSettingsBuilder_; + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + public boolean hasGenerativeSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings getGenerativeSettings() { + if (generativeSettingsBuilder_ == null) { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } else { + return generativeSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings value) { + if (generativeSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generativeSettings_ = value; + } else { + generativeSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder builderForValue) { + if (generativeSettingsBuilder_ == null) { + generativeSettings_ = builderForValue.build(); + } else { + generativeSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGenerativeSettings( + com.google.cloud.dialogflow.cx.v3.GenerativeSettings value) { + if (generativeSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && generativeSettings_ != null + && generativeSettings_ + != com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance()) { + getGenerativeSettingsBuilder().mergeFrom(value); + } else { + generativeSettings_ = value; + } + } else { + generativeSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGenerativeSettings() { + bitField0_ = (bitField0_ & ~0x00000001); + generativeSettings_ = null; + if (generativeSettingsBuilder_ != null) { + generativeSettingsBuilder_.dispose(); + generativeSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder + getGenerativeSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenerativeSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder + getGenerativeSettingsOrBuilder() { + if (generativeSettingsBuilder_ != null) { + return generativeSettingsBuilder_.getMessageOrBuilder(); + } else { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder> + getGenerativeSettingsFieldBuilder() { + if (generativeSettingsBuilder_ == null) { + generativeSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder>( + getGenerativeSettings(), getParentForChildren(), isClean()); + generativeSettings_ = null; + } + return generativeSettingsBuilder_; + } + + 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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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.UpdateGenerativeSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest + 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/UpdateGenerativeSettingsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateGenerativeSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..42694ff7b8da --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateGenerativeSettingsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface UpdateGenerativeSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + boolean hasGenerativeSettings(); + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettings getGenerativeSettings(); + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder getGenerativeSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java index 1b06af11a812..2b4461f65574 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java @@ -216,6 +216,16 @@ public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { * TRANSITION_ROUTE_GROUP = 7; */ TRANSITION_ROUTE_GROUP(7), + /** + * + * + *
+     * Agent transition route group.
+     * 
+ * + * AGENT_TRANSITION_ROUTE_GROUP = 14; + */ + AGENT_TRANSITION_ROUTE_GROUP(14), UNRECOGNIZED(-1), ; @@ -359,6 +369,16 @@ public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { * TRANSITION_ROUTE_GROUP = 7; */ public static final int TRANSITION_ROUTE_GROUP_VALUE = 7; + /** + * + * + *
+     * Agent transition route group.
+     * 
+ * + * AGENT_TRANSITION_ROUTE_GROUP = 14; + */ + public static final int AGENT_TRANSITION_ROUTE_GROUP_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -412,6 +432,8 @@ public static ResourceType forNumber(int value) { return PAGES; case 7: return TRANSITION_ROUTE_GROUP; + case 14: + return AGENT_TRANSITION_ROUTE_GROUP; default: return null; } @@ -700,7 +722,7 @@ public com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType getResou * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -717,7 +739,7 @@ public com.google.protobuf.ProtocolStringList getResourcesList() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -734,7 +756,7 @@ public int getResourcesCount() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -752,7 +774,7 @@ public java.lang.String getResources(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ @@ -1539,7 +1561,7 @@ private void ensureResourcesIsMutable() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -1557,7 +1579,7 @@ public com.google.protobuf.ProtocolStringList getResourcesList() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -1574,7 +1596,7 @@ public int getResourcesCount() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -1592,7 +1614,7 @@ public java.lang.String getResources(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ @@ -1610,7 +1632,7 @@ public com.google.protobuf.ByteString getResourcesBytes(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index to set the value at. * @param value The resources to set. * @return This builder for chaining. @@ -1636,7 +1658,7 @@ public Builder setResources(int index, java.lang.String value) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param value The resources to add. * @return This builder for chaining. */ @@ -1661,7 +1683,7 @@ public Builder addResources(java.lang.String value) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param values The resources to add. * @return This builder for chaining. */ @@ -1683,7 +1705,7 @@ public Builder addAllResources(java.lang.Iterable values) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1704,7 +1726,7 @@ public Builder clearResources() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param value The bytes of the resources to add. * @return This builder for chaining. */ diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java index d5f3a37718c7..169cf60249c2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java @@ -58,7 +58,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -73,7 +73,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -88,7 +88,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -104,7 +104,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java index 471fa32df044..3e56ba3108e3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java @@ -46,29 +46,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n6google/cloud/dialogflow/cx/v3/validati" + "on_message.proto\022\035google.cloud.dialogflo" - + "w.cx.v3\"\370\004\n\021ValidationMessage\022T\n\rresourc" + + "w.cx.v3\"\232\005\n\021ValidationMessage\022T\n\rresourc" + "e_type\030\001 \001(\0162=.google.cloud.dialogflow.c" + "x.v3.ValidationMessage.ResourceType\022\025\n\tr" + "esources\030\002 \003(\tB\002\030\001\022C\n\016resource_names\030\006 \003" + "(\0132+.google.cloud.dialogflow.cx.v3.Resou" + "rceName\022K\n\010severity\030\003 \001(\01629.google.cloud" + ".dialogflow.cx.v3.ValidationMessage.Seve" - + "rity\022\016\n\006detail\030\004 \001(\t\"\213\002\n\014ResourceType\022\035\n" + + "rity\022\016\n\006detail\030\004 \001(\t\"\255\002\n\014ResourceType\022\035\n" + "\031RESOURCE_TYPE_UNSPECIFIED\020\000\022\t\n\005AGENT\020\001\022" + "\n\n\006INTENT\020\002\022\032\n\026INTENT_TRAINING_PHRASE\020\010\022" + "\024\n\020INTENT_PARAMETER\020\t\022\013\n\007INTENTS\020\n\022\033\n\027IN" + "TENT_TRAINING_PHRASES\020\013\022\017\n\013ENTITY_TYPE\020\003" + "\022\020\n\014ENTITY_TYPES\020\014\022\013\n\007WEBHOOK\020\004\022\010\n\004FLOW\020" + "\005\022\010\n\004PAGE\020\006\022\t\n\005PAGES\020\r\022\032\n\026TRANSITION_ROU" - + "TE_GROUP\020\007\"F\n\010Severity\022\030\n\024SEVERITY_UNSPE" - + "CIFIED\020\000\022\010\n\004INFO\020\001\022\013\n\007WARNING\020\002\022\t\n\005ERROR" - + "\020\003\"2\n\014ResourceName\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" - + "lay_name\030\002 \001(\tB\274\001\n!com.google.cloud.dial" - + "ogflow.cx.v3B\026ValidationMessageProtoP\001Z1" - + "cloud.google.com/go/dialogflow/cx/apiv3/" - + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" - + "low.Cx.V3\352\002!Google::Cloud::Dialogflow::C" - + "X::V3b\006proto3" + + "TE_GROUP\020\007\022 \n\034AGENT_TRANSITION_ROUTE_GRO" + + "UP\020\016\"F\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED" + + "\020\000\022\010\n\004INFO\020\001\022\013\n\007WARNING\020\002\022\t\n\005ERROR\020\003\"2\n\014" + + "ResourceName\022\014\n\004name\030\001 \001(\t\022\024\n\014display_na" + + "me\030\002 \001(\tB\274\001\n!com.google.cloud.dialogflow" + + ".cx.v3B\026ValidationMessageProtoP\001Z1cloud." + + "google.com/go/dialogflow/cx/apiv3/cxpb;c" + + "xpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx" + + ".V3\352\002!Google::Cloud::Dialogflow::CX::V3b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( 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 5526daaa4872..7a086796fced 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 @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/audio_config.proto"; import "google/cloud/dialogflow/cx/v3/flow.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -162,6 +163,25 @@ service Agents { }; option (google.api.method_signature) = "name"; } + + // Gets the generative settings for the agent. + rpc GetGenerativeSettings(GetGenerativeSettingsRequest) + returns (GenerativeSettings) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/generativeSettings}" + }; + option (google.api.method_signature) = "name,language_code"; + } + + // Updates the generative settings for the agent. + rpc UpdateGenerativeSettings(UpdateGenerativeSettingsRequest) + returns (GenerativeSettings) { + option (google.api.http) = { + patch: "/v3/{generative_settings.name=projects/*/locations/*/agents/*/generativeSettings}" + body: "generative_settings" + }; + option (google.api.method_signature) = "generative_settings,update_mask"; + } } // Settings related to speech recognition. @@ -180,8 +200,9 @@ message SpeechToTextSettings { // Types][google.cloud.dialogflow.cx.v3.EntityType], // [Flows][google.cloud.dialogflow.cx.v3.Flow], // [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], -// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the -// conversation flows.. +// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], +// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] +// and so on to manage the conversation flows. message Agent { option (google.api.resource) = { type: "dialogflow.googleapis.com/Agent" @@ -198,7 +219,7 @@ message Agent { // The GitHub repository URI related to the agent. string repository_uri = 2; - // The branch of GitHub repository tracked for this agent. + // The branch of the GitHub repository tracked for this agent. string tracking_branch = 3; // The access token used to authenticate the access to the GitHub @@ -216,6 +237,14 @@ message Agent { } } + // Settings for Gen App Builder. + message GenAppBuilderSettings { + // Required. The full name of the Gen App Builder engine related to this + // agent if there is one. Format: `projects/{Project ID}/locations/{Location + // ID}/collections/{Collection ID}/engines/{Engine ID}` + string engine = 1 [(google.api.field_behavior) = REQUIRED]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] @@ -303,6 +332,9 @@ message Agent { // Settings on instructing the speech synthesizer on how to generate the // output audio content. TextToSpeechSettings text_to_speech_settings = 31; + + // Gen App Builder-related agent-level settings. + optional GenAppBuilderSettings gen_app_builder_settings = 33; } // The request message for @@ -473,7 +505,7 @@ message ExportAgentResponse { bytes agent_content = 2; // Commit SHA of the git push. This field is populated if - // `git_destination` are specified in + // `git_destination` is specified in // [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. string commit_sha = 3; } @@ -585,3 +617,34 @@ message AgentValidationResult { // Contains all flow validation results. repeated FlowValidationResult flow_validation_results = 2; } + +// Request for +// [GetGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.GetGenerativeSettings] +// RPC. +message GetGenerativeSettingsRequest { + // Required. Format: `projects//locations//agents//generativeSettings`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AgentGenerativeSettings" + } + ]; + + // Required. Language code of the generative settings. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for +// [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3.Agents.UpdateGenerativeSettings] +// RPC. +message UpdateGenerativeSettingsRequest { + // Required. Generative settings to update. + GenerativeSettings generative_settings = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto new file mode 100644 index 000000000000..e1bffb307823 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto @@ -0,0 +1,55 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "DataStoreConnectionProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// A data store connection. It represents a data store in Discovery Engine and +// the type of the contents it contains. +message DataStoreConnection { + // The type of the connected data store. + DataStoreType data_store_type = 1; + + // The full name of the referenced data store. + // Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + string data_store = 2; +} + +// Type of a data store. +// Determines how search is performed in the data store. +enum DataStoreType { + // Not specified. This value indicates that the data store type is not + // specified, so it will not be used during search. + DATA_STORE_TYPE_UNSPECIFIED = 0; + + // A data store that contains public web content. + PUBLIC_WEB = 1; + + // A data store that contains unstructured private data. + UNSTRUCTURED = 2; + + // A data store that contains structured data (for example FAQ). + STRUCTURED = 3; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index b136137c635f..24706eb90a2f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; @@ -308,7 +309,10 @@ message Flow { // defined in the page have higher priority than those defined in the flow. // // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/` for agent-level + // groups. repeated string transition_route_groups = 15 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" @@ -316,6 +320,10 @@ message Flow { // NLU related settings of the flow. NluSettings nlu_settings = 11; + + // Optional. Knowledge connector configuration. + KnowledgeConnectorSettings knowledge_connector_settings = 18 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for @@ -582,6 +590,22 @@ message ImportFlowRequest { // Flow import mode. If not specified, `KEEP` is assumed. ImportOption import_option = 4; + + // Optional. Specifies the import strategy used when resolving resource + // conflicts. + FlowImportStrategy flow_import_strategy = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The flow import strategy used for resource conflict resolution associated +// with an [ImportFlowRequest][google.cloud.dialogflow.cx.v3.ImportFlowRequest]. +message FlowImportStrategy { + // Optional. Import strategy for resource conflict resolution, applied + // globally throughout the flow. It will be applied for all display name + // conflicts in the imported content. If not specified, 'CREATE_NEW' is + // assumed. + ImportStrategy global_import_strategy = 1 + [(google.api.field_behavior) = OPTIONAL]; } // The response message for diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto new file mode 100644 index 000000000000..87053e1b9415 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto @@ -0,0 +1,102 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/safety_settings.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "GenerativeSettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Settings for Generative AI. +message GenerativeSettings { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/AgentGenerativeSettings" + pattern: "projects/{project}/locations/{location}/agents/{agent}/generativeSettings" + }; + + // Settings for Generative Fallback. + message FallbackSettings { + // Prompt template. + message PromptTemplate { + // Prompt name. + string display_name = 1; + + // Prompt text that is sent to a LLM on no-match default, placeholders are + // filled downstream. For example: "Here is a conversation $conversation, + // a response is: " + string prompt_text = 2; + + // If the flag is true, the prompt is frozen and cannot be modified by + // users. + bool frozen = 3; + } + + // Display name of the selected prompt. + string selected_prompt = 3; + + // Stored prompts that can be selected, for example default templates like + // "conservative" or "chatty", or user defined ones. + repeated PromptTemplate prompt_templates = 4; + } + + // Settings for knowledge connector. These parameters are used for LLM prompt + // like "You are . You are a helpful and verbose at + // , . Your task is to help humans on + // ". + message KnowledgeConnectorSettings { + // Name of the company, organization or other entity that the agent + // represents. Used for knowledge connector LLM prompt and for knowledge + // search. + string business = 1; + + // Name of the virtual agent. Used for LLM prompt. Can be left empty. + string agent = 2; + + // Identity of the agent, e.g. "virtual agent", "AI assistant". + string agent_identity = 3; + + // Company description, used for LLM prompt, e.g. "a family company selling + // freshly roasted coffee beans". + string business_description = 4; + + // Agent scope, e.g. "Example company website", "internal Example + // company website for employees", "manual of car owner". + string agent_scope = 5; + } + + // Format: `projects//locations//agents//generativeSettings`. + string name = 5; + + // Settings for Generative Fallback. + FallbackSettings fallback_settings = 1; + + // Settings for Generative Safety. + SafetySettings generative_safety_settings = 3; + + // Settings for knowledge connector. + KnowledgeConnectorSettings knowledge_connector_settings = 7; + + // Language for this settings. + string language_code = 4; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto new file mode 100644 index 000000000000..68cf3373c7d1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto @@ -0,0 +1,51 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ImportStrategyProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Import strategies for the conflict resolution of resources (i.e. intents, +// entities, and webhooks) with identical display names during import +// operations. +enum ImportStrategy { + // Unspecified. Treated as 'CREATE_NEW'. + IMPORT_STRATEGY_UNSPECIFIED = 0; + + // Create a new resource with a numeric suffix appended to the end of the + // existing display name. + IMPORT_STRATEGY_CREATE_NEW = 1; + + // Replace existing resource with incoming resource in the content to be + // imported. + IMPORT_STRATEGY_REPLACE = 2; + + // Keep existing resource and discard incoming resource in the content to be + // imported. + IMPORT_STRATEGY_KEEP = 3; + + // Combine existing and incoming resources when a conflict is encountered. + IMPORT_STRATEGY_MERGE = 4; + + // Throw error if a conflict is encountered. + IMPORT_STRATEGY_THROW_ERROR = 5; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 08aa938af61d..57420037634d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/data_store_connection.proto"; import "google/cloud/dialogflow/cx/v3/fulfillment.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -139,8 +140,10 @@ message Page { // Ordered list of // [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - // associated with the page. Transition route groups must be unique within a - // page. + // added to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and agent-level + // transition route groups, the flow-level ones will have higher priority and + // will be put before the agent-level ones. // // * If multiple transition routes within a page scope refer to the same // intent, then the precedence order is: page's transition route -> page's @@ -150,7 +153,10 @@ message Page { // intent, then the first group in the ordered list takes precedence. // // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/` for agent-level + // groups. repeated string transition_route_groups = 11 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" @@ -183,6 +189,10 @@ message Page { // Handlers associated with the page to handle events such as webhook errors, // no match or no input. repeated EventHandler event_handlers = 10; + + // Optional. Knowledge connector configuration. + KnowledgeConnectorSettings knowledge_connector_settings = 18 + [(google.api.field_behavior) = OPTIONAL]; } // A form is a data model that groups related parameters that can be collected @@ -351,6 +361,10 @@ message TransitionRoute { // Output only. The unique identifier of this transition route. string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The description of the transition route. The maximum length is + // 500 characters. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + // The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. // Format: `projects//locations//agents//intents/`. @@ -586,3 +600,44 @@ message DeletePageRequest { // this page will be cleared). bool force = 2; } + +// The Knowledge Connector settings for this page or flow. +// This includes information such as the attached Knowledge Bases, and the way +// to execute fulfillment. +message KnowledgeConnectorSettings { + // Whether Knowledge Connector is enabled or not. + bool enabled = 1; + + // The fulfillment to be triggered. + // + // When the answers from the Knowledge Connector are selected by Dialogflow, + // you can utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) to + // construct the fulfillment. + Fulfillment trigger_fulfillment = 3; + + // The target to transition to, either a page in the same host flow (the flow + // that owns this + // [KnowledgeConnectorSettings][google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings]), + // or another flow in the same agent. + oneof target { + // The target page to transition to. + // Format: `projects//locations//agents//flows//pages/`. + string target_page = 4 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; + + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + string target_flow = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + } + + // Optional. List of related data store connections. + repeated DataStoreConnection data_store_connections = 6 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index 9b002a103bfd..bf09929533f2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -180,6 +180,34 @@ message ResponseMessage { } } + // Represents info card response. If the response contains generative + // knowledge prediction, Dialogflow will return a payload with Infobot + // Messenger compatible info card. + // + // Otherwise, the info card response is skipped. + message KnowledgeInfoCard {} + + // Represents different response types. + enum ResponseType { + // Not specified. + RESPONSE_TYPE_UNSPECIFIED = 0; + + // The response is from an [entry + // prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the + // page. + ENTRY_PROMPT = 1; + + // The response is from [form-filling + // prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in + // the page. + PARAMETER_PROMPT = 2; + + // The response is from a [transition + // route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event + // handler][EventHandler] in the page or flow or transition route group. + HANDLER_PROMPT = 3; + } + // Required. The rich response message. oneof message { // Returns a text response. @@ -224,8 +252,15 @@ message ResponseMessage { // A signal that the client should transfer the phone call connected to // this agent to a third-party endpoint. TelephonyTransferCall telephony_transfer_call = 18; + + // Represents info card for knowledge answers, to be better rendered in + // Dialogflow Messenger. + KnowledgeInfoCard knowledge_info_card = 20; } + // Response type. + ResponseType response_type = 4; + // The channel which the response is associated with. Clients can specify the // channel via // [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto new file mode 100644 index 000000000000..c1ad021316b8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto @@ -0,0 +1,42 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "SafetySettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Settings for Generative Safety. +message SafetySettings { + // Text input which can be used for prompt or banned phrases. + message Phrase { + // Required. Text input which can be used for prompt or banned phrases. + string text = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Language code of the phrase. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Banned phrases for generated text. + repeated Phrase banned_phrases = 1; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto index eeb231e93797..641f2d894c7b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -218,6 +218,17 @@ message SecuritySettings { REDACT_DISK_STORAGE = 2; } + // Defines how long we retain persisted data that contains sensitive info. + enum RetentionStrategy { + // Retains the persisted data with Dialogflow's internal default 365d TTLs. + RETENTION_STRATEGY_UNSPECIFIED = 0; + + // Removes data when the conversation ends. If there is no [Conversation][] + // explicitly established, a default conversation ends when the + // corresponding Dialogflow session ends. + REMOVE_AFTER_CONVERSATION = 1; + } + // Type of data we purge after retention settings triggers purge. enum PurgeDataType { // Unspecified. Do not use. @@ -345,6 +356,10 @@ message SecuritySettings { // Setting a value higher than that has no effect. A missing value or // setting to 0 also means we use default TTL. int32 retention_window_days = 6; + + // Specifies the retention behavior defined by + // [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. + RetentionStrategy retention_strategy = 7; } // List of types of data to remove when retention settings triggers purge. 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 fe1315e5b98b..62b3c8b4fe52 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 @@ -324,9 +324,12 @@ message CloudConversationDebuggingInfo { // beginning of the stream. google.protobuf.Duration single_utterance_end_time_offset = 14; - // No speech timeout settings observed at runtime. + // No speech timeout settings for the stream. google.protobuf.Duration no_speech_timeout = 15; + // Speech endpointing timeout settings for the stream. + google.protobuf.Duration endpointing_timeout = 19; + // Whether the streaming terminates with an injected text query. bool is_input_text = 16; @@ -607,15 +610,15 @@ message QueryParameters { // Represents the query input. It can contain one of: // -// 1. A conversational query in the form of text. +// 1. A conversational query in the form of text. // -// 2. An intent query that specifies which intent to trigger. +// 2. An intent query that specifies which intent to trigger. // -// 3. Natural language speech audio to be processed. +// 3. Natural language speech audio to be processed. // -// 4. An event to be triggered. +// 4. An event to be triggered. // -// 5. DTMF digits to invoke an intent and fill in parameter value. +// 5. DTMF digits to invoke an intent and fill in parameter value. message QueryInput { // Required. The input specification. oneof input { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 507eb17f4c7a..85ad8a6fd609 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -46,6 +46,9 @@ service TransitionRouteGroups { returns (ListTransitionRouteGroupsResponse) { option (google.api.http) = { get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups" + additional_bindings { + get: "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups" + } }; option (google.api.method_signature) = "parent"; } @@ -56,6 +59,9 @@ service TransitionRouteGroups { returns (TransitionRouteGroup) { option (google.api.http) = { get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" + additional_bindings { + get: "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + } }; option (google.api.method_signature) = "name"; } @@ -72,6 +78,10 @@ service TransitionRouteGroups { option (google.api.http) = { post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups" body: "transition_route_group" + additional_bindings { + post: "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups" + body: "transition_route_group" + } }; option (google.api.method_signature) = "parent,transition_route_group"; } @@ -87,6 +97,10 @@ service TransitionRouteGroups { option (google.api.http) = { patch: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" body: "transition_route_group" + additional_bindings { + patch: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + body: "transition_route_group" + } }; option (google.api.method_signature) = "transition_route_group,update_mask"; } @@ -101,25 +115,32 @@ service TransitionRouteGroups { returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" + additional_bindings { + delete: "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + } }; option (google.api.method_signature) = "name"; } } -// An TransitionRouteGroup represents a group of +// A TransitionRouteGroup represents a group of // [`TransitionRoutes`][google.cloud.dialogflow.cx.v3.TransitionRoute] to be // used by a [Page][google.cloud.dialogflow.cx.v3.Page]. message TransitionRouteGroup { option (google.api.resource) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}" + pattern: "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}" + plural: "transitionRouteGroups" + singular: "transitionRouteGroup" }; // The unique identifier of the transition route group. // [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] // populates the name automatically. Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/transitionRouteGroups/` + // . string name = 1; // Required. The human-readable name of the transition route group, unique @@ -136,7 +157,8 @@ message TransitionRouteGroup { message ListTransitionRouteGroupsRequest { // Required. The flow to list all transition route groups for. // Format: `projects//locations//agents//flows/`. + // ID>/flows/` + // or `projects//locations//agents/. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -187,7 +209,9 @@ message GetTransitionRouteGroupRequest { // Required. The name of the // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. // Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -216,7 +240,9 @@ message CreateTransitionRouteGroupRequest { // Required. The flow to create an // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] // for. Format: `projects//locations//agents//flows/`. + // ID>/flows/` + // or `projects//locations//agents/` + // for agent-level groups. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -273,7 +299,8 @@ message DeleteTransitionRouteGroupRequest { // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] // to delete. Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // Route Group ID>` or `projects//locations//agents//transitionRouteGroups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto index 4db4bfcd8666..58c11d1da9f3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -70,6 +70,9 @@ message ValidationMessage { // Transition route group. TRANSITION_ROUTE_GROUP = 7; + + // Agent transition route group. + AGENT_TRANSITION_ROUTE_GROUP = 14; } // Severity level. 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 990904aab96b..7123ec8ad4ce 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 @@ -32,8 +32,9 @@ * Types][google.cloud.dialogflow.cx.v3beta1.EntityType], * [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], * [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage - * the conversation flows.. + * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], + * [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] + * and so on to manage the conversation flows. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent} @@ -2673,6 +2674,678 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface GenAppBuilderSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + java.lang.String getEngine(); + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + com.google.protobuf.ByteString getEngineBytes(); + } + /** + * + * + *
+   * Settings for Gen App Builder.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} + */ + public static final class GenAppBuilderSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) + GenAppBuilderSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenAppBuilderSettings.newBuilder() to construct. + private GenAppBuilderSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenAppBuilderSettings() { + engine_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenAppBuilderSettings(); + } + + 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_GenAppBuilderSettings_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_GenAppBuilderSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder.class); + } + + public static final int ENGINE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object engine_ = ""; + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + @java.lang.Override + public java.lang.String getEngine() { + java.lang.Object ref = engine_; + 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(); + engine_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The full name of the Gen App Builder engine related to this
+     * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+     * ID}/collections/{Collection ID}/engines/{Engine ID}`
+     * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEngineBytes() { + java.lang.Object ref = engine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + engine_ = 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(engine_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, engine_); + } + 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(engine_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, engine_); + } + 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.GenAppBuilderSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) obj; + + if (!getEngine().equals(other.getEngine())) 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) + ENGINE_FIELD_NUMBER; + hash = (53 * hash) + getEngine().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings + 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.GenAppBuilderSettings + 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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.GenAppBuilderSettings 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 Gen App Builder.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder { + 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_GenAppBuilderSettings_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_GenAppBuilderSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + engine_ = ""; + 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_GenAppBuilderSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.engine_ = engine_; + } + } + + @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.GenAppBuilderSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + .getDefaultInstance()) return this; + if (!other.getEngine().isEmpty()) { + engine_ = other.engine_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + engine_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object engine_ = ""; + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The engine. + */ + public java.lang.String getEngine() { + java.lang.Object ref = engine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + engine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for engine. + */ + public com.google.protobuf.ByteString getEngineBytes() { + java.lang.Object ref = engine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + engine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The engine to set. + * @return This builder for chaining. + */ + public Builder setEngine(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + engine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEngine() { + engine_ = getDefaultInstance().getEngine(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the Gen App Builder engine related to this
+       * agent if there is one. Format: `projects/{Project ID}/locations/{Location
+       * ID}/collections/{Collection ID}/engines/{Engine ID}`
+       * 
+ * + * string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for engine to set. + * @return This builder for chaining. + */ + public Builder setEngineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + engine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenAppBuilderSettings 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.GenAppBuilderSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3274,7 +3947,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=285 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -3491,6 +4164,64 @@ public com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings getTextToSpee : textToSpeechSettings_; } + public static final int GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER = 33; + private com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings genAppBuilderSettings_; + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + @java.lang.Override + public boolean hasGenAppBuilderSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + getGenAppBuilderSettings() { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder() { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.getDefaultInstance() + : genAppBuilderSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3554,6 +4285,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (textToSpeechSettings_ != null) { output.writeMessage(31, getTextToSpeechSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(33, getGenAppBuilderSettings()); + } getUnknownFields().writeTo(output); } @@ -3619,6 +4353,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getTextToSpeechSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(33, getGenAppBuilderSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3664,6 +4402,10 @@ public boolean equals(final java.lang.Object obj) { if (hasTextToSpeechSettings()) { if (!getTextToSpeechSettings().equals(other.getTextToSpeechSettings())) return false; } + if (hasGenAppBuilderSettings() != other.hasGenAppBuilderSettings()) return false; + if (hasGenAppBuilderSettings()) { + if (!getGenAppBuilderSettings().equals(other.getGenAppBuilderSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3717,6 +4459,10 @@ public int hashCode() { hash = (37 * hash) + TEXT_TO_SPEECH_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getTextToSpeechSettings().hashCode(); } + if (hasGenAppBuilderSettings()) { + hash = (37 * hash) + GEN_APP_BUILDER_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenAppBuilderSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3831,8 +4577,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Types][google.cloud.dialogflow.cx.v3beta1.EntityType], * [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], * [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage - * the conversation flows.. + * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], + * [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] + * and so on to manage the conversation flows. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent} @@ -3857,10 +4604,23 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3beta1.Agent.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSpeechToTextSettingsFieldBuilder(); + getAdvancedSettingsFieldBuilder(); + getGitIntegrationSettingsFieldBuilder(); + getTextToSpeechSettingsFieldBuilder(); + getGenAppBuilderSettingsFieldBuilder(); + } } @java.lang.Override @@ -3899,6 +4659,11 @@ public Builder clear() { textToSpeechSettingsBuilder_.dispose(); textToSpeechSettingsBuilder_ = null; } + genAppBuilderSettings_ = null; + if (genAppBuilderSettingsBuilder_ != null) { + genAppBuilderSettingsBuilder_.dispose(); + genAppBuilderSettingsBuilder_ = null; + } return this; } @@ -3994,6 +4759,15 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Agent result) ? textToSpeechSettings_ : textToSpeechSettingsBuilder_.build(); } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.genAppBuilderSettings_ = + genAppBuilderSettingsBuilder_ == null + ? genAppBuilderSettings_ + : genAppBuilderSettingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -4112,6 +4886,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { if (other.hasTextToSpeechSettings()) { mergeTextToSpeechSettings(other.getTextToSpeechSettings()); } + if (other.hasGenAppBuilderSettings()) { + mergeGenAppBuilderSettings(other.getGenAppBuilderSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4239,6 +5016,13 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 250 + case 266: + { + input.readMessage( + getGenAppBuilderSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 266 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5643,7 +6427,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=285 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -5664,7 +6448,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=285 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -5689,7 +6473,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=285 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 * @return This builder for chaining. */ @java.lang.Deprecated @@ -6431,6 +7215,219 @@ public Builder clearTextToSpeechSettings() { return textToSpeechSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + genAppBuilderSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder> + genAppBuilderSettingsBuilder_; + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + public boolean hasGenAppBuilderSettings() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + getGenAppBuilderSettings() { + if (genAppBuilderSettingsBuilder_ == null) { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + .getDefaultInstance() + : genAppBuilderSettings_; + } else { + return genAppBuilderSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder setGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings value) { + if (genAppBuilderSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genAppBuilderSettings_ = value; + } else { + genAppBuilderSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder setGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder + builderForValue) { + if (genAppBuilderSettingsBuilder_ == null) { + genAppBuilderSettings_ = builderForValue.build(); + } else { + genAppBuilderSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder mergeGenAppBuilderSettings( + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings value) { + if (genAppBuilderSettingsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && genAppBuilderSettings_ != null + && genAppBuilderSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + .getDefaultInstance()) { + getGenAppBuilderSettingsBuilder().mergeFrom(value); + } else { + genAppBuilderSettings_ = value; + } + } else { + genAppBuilderSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public Builder clearGenAppBuilderSettings() { + bitField0_ = (bitField0_ & ~0x00010000); + genAppBuilderSettings_ = null; + if (genAppBuilderSettingsBuilder_ != null) { + genAppBuilderSettingsBuilder_.dispose(); + genAppBuilderSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder + getGenAppBuilderSettingsBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getGenAppBuilderSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder() { + if (genAppBuilderSettingsBuilder_ != null) { + return genAppBuilderSettingsBuilder_.getMessageOrBuilder(); + } else { + return genAppBuilderSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + .getDefaultInstance() + : genAppBuilderSettings_; + } + } + /** + * + * + *
+     * Gen App Builder-related agent-level settings.
+     * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder> + getGenAppBuilderSettingsFieldBuilder() { + if (genAppBuilderSettingsBuilder_ == null) { + genAppBuilderSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder>( + getGenAppBuilderSettings(), getParentForChildren(), isClean()); + genAppBuilderSettings_ = null; + } + return genAppBuilderSettingsBuilder_; + } + @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/AgentGenerativeSettingsName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentGenerativeSettingsName.java new file mode 100644 index 000000000000..a64f573c7ffc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentGenerativeSettingsName.java @@ -0,0 +1,224 @@ +/* + * 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentGenerativeSettingsName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/generativeSettings"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + + @Deprecated + protected AgentGenerativeSettingsName() { + project = null; + location = null; + agent = null; + } + + private AgentGenerativeSettingsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentGenerativeSettingsName of(String project, String location, String agent) { + return newBuilder().setProject(project).setLocation(location).setAgent(agent).build(); + } + + public static String format(String project, String location, String agent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .build() + .toString(); + } + + public static AgentGenerativeSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT.validatedMatch( + formattedString, + "AgentGenerativeSettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentGenerativeSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT.instantiate( + "project", project, "location", location, "agent", agent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AgentGenerativeSettingsName that = ((AgentGenerativeSettingsName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/generativeSettings. */ + public static class Builder { + private String project; + private String location; + private String agent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + private Builder(AgentGenerativeSettingsName agentGenerativeSettingsName) { + this.project = agentGenerativeSettingsName.project; + this.location = agentGenerativeSettingsName.location; + this.agent = agentGenerativeSettingsName.agent; + } + + public AgentGenerativeSettingsName build() { + return new AgentGenerativeSettingsName(this); + } + } +} 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 8131ec60fccd..1dfa1de91cf8 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=285 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=314 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -541,4 +541,46 @@ public interface AgentOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettingsOrBuilder getTextToSpeechSettingsOrBuilder(); + + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return Whether the genAppBuilderSettings field is set. + */ + boolean hasGenAppBuilderSettings(); + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + * + * @return The genAppBuilderSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings getGenAppBuilderSettings(); + /** + * + * + *
+   * Gen App Builder-related agent-level settings.
+   * 
+ * + * + * optional .google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettingsOrBuilder + getGenAppBuilderSettingsOrBuilder(); } 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 075d3de8dcab..53ca46baa70f 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 @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GitIntegrationSettings_GithubSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GitIntegrationSettings_GithubSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + 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_ListAgentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -99,6 +103,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -117,96 +129,110 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nced_settings.proto\0325google/cloud/dialog" + "flow/cx/v3beta1/audio_config.proto\032-goog" + "le/cloud/dialogflow/cx/v3beta1/flow.prot" - + "o\032#google/longrunning/operations.proto\032\033" - + "google/protobuf/empty.proto\032 google/prot" - + "obuf/field_mask.proto\032\034google/protobuf/s" - + "truct.proto\"8\n\024SpeechToTextSettings\022 \n\030e" - + "nable_speech_adaptation\030\001 \001(\010\"\376\010\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\025default_language_code\030\003 \001(\tB\005\342A\002\002\005\022" - + " \n\030supported_language_codes\030\004 \003(\t\022\027\n\ttim" - + "e_zone\030\005 \001(\tB\004\342A\001\002\022\023\n\013description\030\006 \001(\t\022" - + "\022\n\navatar_uri\030\007 \001(\t\022Y\n\027speech_to_text_se" - + "ttings\030\r \001(\01328.google.cloud.dialogflow.c" - + "x.v3beta1.SpeechToTextSettings\022;\n\nstart_" - + "flow\030\020 \001(\tB\'\342A\001\005\372A \n\036dialogflow.googleap" - + "is.com/Flow\022J\n\021security_settings\030\021 \001(\tB/" - + "\372A,\n*dialogflow.googleapis.com/SecurityS" - + "ettings\022&\n\032enable_stackdriver_logging\030\022 " - + "\001(\010B\002\030\001\022\037\n\027enable_spell_correction\030\024 \001(\010" - + "\022\016\n\006locked\030\033 \001(\010\022O\n\021advanced_settings\030\026 " - + "\001(\01324.google.cloud.dialogflow.cx.v3beta1" - + ".AdvancedSettings\022b\n\030git_integration_set" - + "tings\030\036 \001(\0132@.google.cloud.dialogflow.cx" - + ".v3beta1.Agent.GitIntegrationSettings\022Y\n" - + "\027text_to_speech_settings\030\037 \001(\01328.google." - + "cloud.dialogflow.cx.v3beta1.TextToSpeech" - + "Settings\032\225\002\n\026GitIntegrationSettings\022j\n\017g" - + "ithub_settings\030\001 \001(\0132O.google.cloud.dial" - + "ogflow.cx.v3beta1.Agent.GitIntegrationSe" - + "ttings.GithubSettingsH\000\032\177\n\016GithubSetting" - + "s\022\024\n\014display_name\030\001 \001(\t\022\026\n\016repository_ur" - + "i\030\002 \001(\t\022\027\n\017tracking_branch\030\003 \001(\t\022\024\n\014acce" - + "ss_token\030\004 \001(\t\022\020\n\010branches\030\005 \003(\tB\016\n\014git_" - + "settings:\\\352AY\n\037dialogflow.googleapis.com" - + "/Agent\0226projects/{project}/locations/{lo" - + "cation}/agents/{agent}\"t\n\021ListAgentsRequ" - + "est\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037dialogflow" - + ".googleapis.com/Agent\022\021\n\tpage_size\030\002 \001(\005" - + "\022\022\n\npage_token\030\003 \001(\t\"h\n\022ListAgentsRespon" - + "se\0229\n\006agents\030\001 \003(\0132).google.cloud.dialog" - + "flow.cx.v3beta1.Agent\022\027\n\017next_page_token" - + "\030\002 \001(\t\"I\n\017GetAgentRequest\0226\n\004name\030\001 \001(\tB" + + "o\032\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\"\216\001\n\022CreateAgentRequest\0228\n\006parent\030\001 \001(\t" - + "B(\342A\001\002\372A!\022\037dialogflow.googleapis.com/Age" - + "nt\022>\n\005agent\030\002 \001(\0132).google.cloud.dialogf" - + "low.cx.v3beta1.AgentB\004\342A\001\002\"\205\001\n\022UpdateAge" - + "ntRequest\022>\n\005agent\030\001 \001(\0132).google.cloud." - + "dialogflow.cx.v3beta1.AgentB\004\342A\001\002\022/\n\013upd" - + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa" - + "sk\"L\n\022DeleteAgentRequest\0226\n\004name\030\001 \001(\tB(" - + "\342A\001\002\372A!\n\037dialogflow.googleapis.com/Agent" - + "\"\250\004\n\022ExportAgentRequest\0226\n\004name\030\001 \001(\tB(\342" - + "A\001\002\372A!\n\037dialogflow.googleapis.com/Agent\022" - + "\027\n\tagent_uri\030\002 \001(\tB\004\342A\001\001\022\\\n\013data_format\030" - + "\003 \001(\0162A.google.cloud.dialogflow.cx.v3bet" - + "a1.ExportAgentRequest.DataFormatB\004\342A\001\001\022C" - + "\n\013environment\030\005 \001(\tB.\342A\001\001\372A\'\n%dialogflow" - + ".googleapis.com/Environment\022d\n\017git_desti" - + "nation\030\006 \001(\0132E.google.cloud.dialogflow.c" - + "x.v3beta1.ExportAgentRequest.GitDestinat" - + "ionB\004\342A\001\001\022.\n include_bigquery_export_set" - + "tings\030\007 \001(\010B\004\342A\001\001\032A\n\016GitDestination\022\027\n\017t" - + "racking_branch\030\001 \001(\t\022\026\n\016commit_message\030\002" - + " \001(\t\"E\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPEC" - + "IFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n\023E" - + "xportAgentResponse\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\023RestoreAgentRequest\022" - + "6\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037dialogflow.googl" - + "eapis.com/Agent\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\r" - + "agent_content\030\003 \001(\014H\000\022W\n\ngit_source\030\006 \001(" - + "\0132A.google.cloud.dialogflow.cx.v3beta1.R" - + "estoreAgentRequest.GitSourceH\000\022]\n\016restor" - + "e_option\030\005 \001(\0162E.google.cloud.dialogflow" - + ".cx.v3beta1.RestoreAgentRequest.RestoreO" - + "ption\032$\n\tGitSource\022\027\n\017tracking_branch\030\001 " - + "\001(\t\"G\n\rRestoreOption\022\036\n\032RESTORE_OPTION_U" - + "NSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005" - + "agent\"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\037GetAgen" - + "tValidationResultRequest\022F\n\004name\030\001 \001(\tB8" - + "\342A\001\002\372A1\n/dialogflow.googleapis.com/Agent" - + "ValidationResult\022\025\n\rlanguage_code\030\002 \001(\t\"" - + "\377\001\n\025AgentValidationResult\022\014\n\004name\030\001 \001(\t\022" - + "Y\n\027flow_validation_results\030\002 \003(\01328.googl" - + "e.cloud.dialogflow.cx.v3beta1.FlowValida" - + "tionResult:}\352Az\n/dialogflow.googleapis.c" - + "om/AgentValidationResult\022Gprojects/{proj" - + "ect}/locations/{location}/agents/{agent}" - + "/validationResult2\221\017\n\006Agents\022\275\001\n\nListAge" + + "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" + + "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" @@ -251,16 +277,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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}\032x\312A\031" - + "dialogflow.googleapis.com\322AYhttps://www." - + "googleapis.com/auth/cloud-platform,https" - + "://www.googleapis.com/auth/dialogflowB\304\001" - + "\n&com.google.cloud.dialogflow.cx.v3beta1" - + "B\nAgentProtoP\001Z6cloud.google.com/go/dial" - + "ogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002" - + "\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Go" - + "ogle::Cloud::Dialogflow::CX::V3beta1b\006pr" - + "oto3" + + "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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -273,6 +312,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -308,6 +348,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AdvancedSettings", "GitIntegrationSettings", "TextToSpeechSettings", + "GenAppBuilderSettings", + "GenAppBuilderSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GitIntegrationSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_descriptor.getNestedTypes().get(0); @@ -327,6 +369,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DisplayName", "RepositoryUri", "TrackingBranch", "AccessToken", "Branches", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GenAppBuilderSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GenAppBuilderSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GenAppBuilderSettings_descriptor, + new java.lang.String[] { + "Engine", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListAgentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_dialogflow_cx_v3beta1_ListAgentsRequest_fieldAccessorTable = @@ -448,6 +498,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "FlowValidationResults", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_descriptor, + new java.lang.String[] { + "GenerativeSettings", "UpdateMask", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -467,6 +533,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfo.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfo.java index 95d2c3dcdfc5..13ba5ae26431 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfo.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfo.java @@ -645,7 +645,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -660,7 +660,7 @@ public boolean hasNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -677,7 +677,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -689,6 +689,56 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { : noSpeechTimeout_; } + public static final int ENDPOINTING_TIMEOUT_FIELD_NUMBER = 19; + private com.google.protobuf.Duration endpointingTimeout_; + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + @java.lang.Override + public boolean hasEndpointingTimeout() { + return endpointingTimeout_ != null; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndpointingTimeout() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + public static final int IS_INPUT_TEXT_FIELD_NUMBER = 16; private boolean isInputText_ = false; /** @@ -872,6 +922,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clientHalfCloseStreamingTimeOffset_ != null) { output.writeMessage(18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + output.writeMessage(19, getEndpointingTimeout()); + } getUnknownFields().writeTo(output); } @@ -948,6 +1001,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getClientHalfCloseStreamingTimeOffset()); } + if (endpointingTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEndpointingTimeout()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -995,6 +1051,10 @@ public boolean equals(final java.lang.Object obj) { if (hasNoSpeechTimeout()) { if (!getNoSpeechTimeout().equals(other.getNoSpeechTimeout())) return false; } + if (hasEndpointingTimeout() != other.hasEndpointingTimeout()) return false; + if (hasEndpointingTimeout()) { + if (!getEndpointingTimeout().equals(other.getEndpointingTimeout())) return false; + } if (getIsInputText() != other.getIsInputText()) return false; if (hasClientHalfCloseTimeOffset() != other.hasClientHalfCloseTimeOffset()) return false; if (hasClientHalfCloseTimeOffset()) { @@ -1062,6 +1122,10 @@ public int hashCode() { hash = (37 * hash) + NO_SPEECH_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getNoSpeechTimeout().hashCode(); } + if (hasEndpointingTimeout()) { + hash = (37 * hash) + ENDPOINTING_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getEndpointingTimeout().hashCode(); + } hash = (37 * hash) + IS_INPUT_TEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInputText()); if (hasClientHalfCloseTimeOffset()) { @@ -1271,6 +1335,11 @@ public Builder clear() { noSpeechTimeoutBuilder_.dispose(); noSpeechTimeoutBuilder_ = null; } + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } isInputText_ = false; clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { @@ -1406,15 +1475,21 @@ private void buildPartial0( noSpeechTimeoutBuilder_ == null ? noSpeechTimeout_ : noSpeechTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00004000) != 0)) { - result.isInputText_ = isInputText_; + result.endpointingTimeout_ = + endpointingTimeoutBuilder_ == null + ? endpointingTimeout_ + : endpointingTimeoutBuilder_.build(); } if (((from_bitField0_ & 0x00008000) != 0)) { + result.isInputText_ = isInputText_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { result.clientHalfCloseTimeOffset_ = clientHalfCloseTimeOffsetBuilder_ == null ? clientHalfCloseTimeOffset_ : clientHalfCloseTimeOffsetBuilder_.build(); } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.clientHalfCloseStreamingTimeOffset_ = clientHalfCloseStreamingTimeOffsetBuilder_ == null ? clientHalfCloseStreamingTimeOffset_ @@ -1610,6 +1685,9 @@ public Builder mergeFrom( if (other.hasNoSpeechTimeout()) { mergeNoSpeechTimeout(other.getNoSpeechTimeout()); } + if (other.hasEndpointingTimeout()) { + mergeEndpointingTimeout(other.getEndpointingTimeout()); + } if (other.getIsInputText() != false) { setIsInputText(other.getIsInputText()); } @@ -1759,14 +1837,14 @@ public Builder mergeFrom( case 128: { isInputText_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 128 case 138: { input.readMessage( getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 138 case 146: @@ -1774,9 +1852,16 @@ public Builder mergeFrom( input.readMessage( getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 146 + case 154: + { + input.readMessage( + getEndpointingTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4187,7 +4272,7 @@ public com.google.protobuf.DurationOrBuilder getSingleUtteranceEndTimeOffsetOrBu * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4201,7 +4286,7 @@ public boolean hasNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4221,7 +4306,7 @@ public com.google.protobuf.Duration getNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4243,7 +4328,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4262,7 +4347,7 @@ public Builder setNoSpeechTimeout(com.google.protobuf.Duration.Builder builderFo * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4287,7 +4372,7 @@ public Builder mergeNoSpeechTimeout(com.google.protobuf.Duration value) { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4306,7 +4391,7 @@ public Builder clearNoSpeechTimeout() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4320,7 +4405,7 @@ public com.google.protobuf.Duration.Builder getNoSpeechTimeoutBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4338,7 +4423,7 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { * * *
-     * No speech timeout settings observed at runtime.
+     * No speech timeout settings for the stream.
      * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -4360,6 +4445,189 @@ public com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder() { return noSpeechTimeoutBuilder_; } + private com.google.protobuf.Duration endpointingTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endpointingTimeoutBuilder_; + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + public boolean hasEndpointingTimeout() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + public com.google.protobuf.Duration getEndpointingTimeout() { + if (endpointingTimeoutBuilder_ == null) { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } else { + return endpointingTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointingTimeout_ = value; + } else { + endpointingTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder setEndpointingTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeout_ = builderForValue.build(); + } else { + endpointingTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder mergeEndpointingTimeout(com.google.protobuf.Duration value) { + if (endpointingTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && endpointingTimeout_ != null + && endpointingTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndpointingTimeoutBuilder().mergeFrom(value); + } else { + endpointingTimeout_ = value; + } + } else { + endpointingTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public Builder clearEndpointingTimeout() { + bitField0_ = (bitField0_ & ~0x00004000); + endpointingTimeout_ = null; + if (endpointingTimeoutBuilder_ != null) { + endpointingTimeoutBuilder_.dispose(); + endpointingTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.Duration.Builder getEndpointingTimeoutBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getEndpointingTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder() { + if (endpointingTimeoutBuilder_ != null) { + return endpointingTimeoutBuilder_.getMessageOrBuilder(); + } else { + return endpointingTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeout_; + } + } + /** + * + * + *
+     * Speech endpointing timeout settings for the stream.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndpointingTimeoutFieldBuilder() { + if (endpointingTimeoutBuilder_ == null) { + endpointingTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndpointingTimeout(), getParentForChildren(), isClean()); + endpointingTimeout_ = null; + } + return endpointingTimeoutBuilder_; + } + private boolean isInputText_; /** * @@ -4391,7 +4659,7 @@ public boolean getIsInputText() { public Builder setIsInputText(boolean value) { isInputText_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4407,7 +4675,7 @@ public Builder setIsInputText(boolean value) { * @return This builder for chaining. */ public Builder clearIsInputText() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); isInputText_ = false; onChanged(); return this; @@ -4431,7 +4699,7 @@ public Builder clearIsInputText() { * @return Whether the clientHalfCloseTimeOffset field is set. */ public boolean hasClientHalfCloseTimeOffset() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4471,7 +4739,7 @@ public Builder setClientHalfCloseTimeOffset(com.google.protobuf.Duration value) } else { clientHalfCloseTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4491,7 +4759,7 @@ public Builder setClientHalfCloseTimeOffset( } else { clientHalfCloseTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4506,7 +4774,7 @@ public Builder setClientHalfCloseTimeOffset( */ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && clientHalfCloseTimeOffset_ != null && clientHalfCloseTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { getClientHalfCloseTimeOffsetBuilder().mergeFrom(value); @@ -4516,7 +4784,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value } else { clientHalfCloseTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4530,7 +4798,7 @@ public Builder mergeClientHalfCloseTimeOffset(com.google.protobuf.Duration value * .google.protobuf.Duration client_half_close_time_offset = 17; */ public Builder clearClientHalfCloseTimeOffset() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); clientHalfCloseTimeOffset_ = null; if (clientHalfCloseTimeOffsetBuilder_ != null) { clientHalfCloseTimeOffsetBuilder_.dispose(); @@ -4549,7 +4817,7 @@ public Builder clearClientHalfCloseTimeOffset() { * .google.protobuf.Duration client_half_close_time_offset = 17; */ public com.google.protobuf.Duration.Builder getClientHalfCloseTimeOffsetBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getClientHalfCloseTimeOffsetFieldBuilder().getBuilder(); } @@ -4615,7 +4883,7 @@ public com.google.protobuf.DurationOrBuilder getClientHalfCloseTimeOffsetOrBuild * @return Whether the clientHalfCloseStreamingTimeOffset field is set. */ public boolean hasClientHalfCloseStreamingTimeOffset() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4655,7 +4923,7 @@ public Builder setClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duratio } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4675,7 +4943,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( } else { clientHalfCloseStreamingTimeOffsetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4690,7 +4958,7 @@ public Builder setClientHalfCloseStreamingTimeOffset( */ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Duration value) { if (clientHalfCloseStreamingTimeOffsetBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && clientHalfCloseStreamingTimeOffset_ != null && clientHalfCloseStreamingTimeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { @@ -4701,7 +4969,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat } else { clientHalfCloseStreamingTimeOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4715,7 +4983,7 @@ public Builder mergeClientHalfCloseStreamingTimeOffset(com.google.protobuf.Durat * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public Builder clearClientHalfCloseStreamingTimeOffset() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); clientHalfCloseStreamingTimeOffset_ = null; if (clientHalfCloseStreamingTimeOffsetBuilder_ != null) { clientHalfCloseStreamingTimeOffsetBuilder_.dispose(); @@ -4734,7 +5002,7 @@ public Builder clearClientHalfCloseStreamingTimeOffset() { * .google.protobuf.Duration client_half_close_streaming_time_offset = 18; */ public com.google.protobuf.Duration.Builder getClientHalfCloseStreamingTimeOffsetBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getClientHalfCloseStreamingTimeOffsetFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfoOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfoOrBuilder.java index 620625a229da..03a90f4da3e6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfoOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CloudConversationDebuggingInfoOrBuilder.java @@ -446,7 +446,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -458,7 +458,7 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; @@ -470,13 +470,48 @@ public interface CloudConversationDebuggingInfoOrBuilder * * *
-   * No speech timeout settings observed at runtime.
+   * No speech timeout settings for the stream.
    * 
* * .google.protobuf.Duration no_speech_timeout = 15; */ com.google.protobuf.DurationOrBuilder getNoSpeechTimeoutOrBuilder(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return Whether the endpointingTimeout field is set. + */ + boolean hasEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + * + * @return The endpointingTimeout. + */ + com.google.protobuf.Duration getEndpointingTimeout(); + /** + * + * + *
+   * Speech endpointing timeout settings for the stream.
+   * 
+ * + * .google.protobuf.Duration endpointing_timeout = 19; + */ + com.google.protobuf.DurationOrBuilder getEndpointingTimeoutOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequest.java index 7a2b38141742..5755f20f171e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequest.java @@ -76,7 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -104,7 +106,9 @@ public java.lang.String getParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -678,7 +682,9 @@ public Builder mergeFrom( * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -705,7 +711,9 @@ public java.lang.String getParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -732,7 +740,9 @@ public com.google.protobuf.ByteString getParentBytes() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -758,7 +768,9 @@ public Builder setParent(java.lang.String value) { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -780,7 +792,9 @@ public Builder clearParent() { * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequestOrBuilder.java index 12a87c668a76..301d1e78b927 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface CreateTransitionRouteGroupRequestOrBuilder * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * @@ -47,7 +49,9 @@ public interface CreateTransitionRouteGroupRequestOrBuilder * Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>`. + * ID>/flows/<Flow ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>` + * for agent-level groups. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnection.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnection.java new file mode 100644 index 000000000000..d354fb704c55 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnection.java @@ -0,0 +1,804 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * A data store connection. It represents a data store in Discovery Engine and
+ * the type of the contents it contains.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} + */ +public final class DataStoreConnection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + DataStoreConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataStoreConnection.newBuilder() to construct. + private DataStoreConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataStoreConnection() { + dataStoreType_ = 0; + dataStore_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataStoreConnection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.class, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder.class); + } + + public static final int DATA_STORE_TYPE_FIELD_NUMBER = 1; + private int dataStoreType_ = 0; + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + @java.lang.Override + public int getDataStoreTypeValue() { + return dataStoreType_; + } + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreType getDataStoreType() { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreType result = + com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.forNumber(dataStoreType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.UNRECOGNIZED + : result; + } + + public static final int DATA_STORE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataStore_ = ""; + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + @java.lang.Override + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + 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(); + dataStore_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = 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 (dataStoreType_ + != com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.DATA_STORE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, dataStoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataStore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataStoreType_ + != com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.DATA_STORE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataStoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataStore_); + } + 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.DataStoreConnection)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection other = + (com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) obj; + + if (dataStoreType_ != other.dataStoreType_) return false; + if (!getDataStore().equals(other.getDataStore())) 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) + DATA_STORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataStoreType_; + hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getDataStore().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection 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.DataStoreConnection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection 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.DataStoreConnection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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.DataStoreConnection 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; + } + /** + * + * + *
+   * A data store connection. It represents a data store in Discovery Engine and
+   * the type of the contents it contains.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.class, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStoreType_ = 0; + dataStore_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection build() { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection result = + new com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataStoreType_ = dataStoreType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataStore_ = dataStore_; + } + } + + @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.DataStoreConnection) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance()) + return this; + if (other.dataStoreType_ != 0) { + setDataStoreTypeValue(other.getDataStoreTypeValue()); + } + if (!other.getDataStore().isEmpty()) { + dataStore_ = other.dataStore_; + 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 8: + { + dataStoreType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + dataStore_ = 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 int dataStoreType_ = 0; + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + @java.lang.Override + public int getDataStoreTypeValue() { + return dataStoreType_; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @param value The enum numeric value on the wire for dataStoreType to set. + * @return This builder for chaining. + */ + public Builder setDataStoreTypeValue(int value) { + dataStoreType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreType getDataStoreType() { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreType result = + com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.forNumber(dataStoreType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.DataStoreType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @param value The dataStoreType to set. + * @return This builder for chaining. + */ + public Builder setDataStoreType(com.google.cloud.dialogflow.cx.v3beta1.DataStoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + dataStoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the connected data store.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearDataStoreType() { + bitField0_ = (bitField0_ & ~0x00000001); + dataStoreType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dataStore_ = ""; + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @param value The dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the referenced data store.
+     * Formats:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * `projects/{project}/locations/{location}/dataStores/{data_store}`
+     * 
+ * + * string data_store = 2; + * + * @param value The bytes for dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataStore_ = 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.DataStoreConnection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + private static final com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataStoreConnection 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.DataStoreConnection 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/DataStoreConnectionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnectionOrBuilder.java new file mode 100644 index 000000000000..5af5594d9bee --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnectionOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DataStoreConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The enum numeric value on the wire for dataStoreType. + */ + int getDataStoreTypeValue(); + /** + * + * + *
+   * The type of the connected data store.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.DataStoreType data_store_type = 1; + * + * @return The dataStoreType. + */ + com.google.cloud.dialogflow.cx.v3beta1.DataStoreType getDataStoreType(); + + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The dataStore. + */ + java.lang.String getDataStore(); + /** + * + * + *
+   * The full name of the referenced data store.
+   * Formats:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * `projects/{project}/locations/{location}/dataStores/{data_store}`
+   * 
+ * + * string data_store = 2; + * + * @return The bytes for dataStore. + */ + com.google.protobuf.ByteString getDataStoreBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnectionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnectionProto.java new file mode 100644 index 000000000000..b5d0c8c0a7d5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreConnectionProto.java @@ -0,0 +1,71 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class DataStoreConnectionProto { + private DataStoreConnectionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n>google/cloud/dialogflow/cx/v3beta1/dat" + + "a_store_connection.proto\022\"google.cloud.d" + + "ialogflow.cx.v3beta1\"u\n\023DataStoreConnect" + + "ion\022J\n\017data_store_type\030\001 \001(\01621.google.cl" + + "oud.dialogflow.cx.v3beta1.DataStoreType\022" + + "\022\n\ndata_store\030\002 \001(\t*b\n\rDataStoreType\022\037\n\033" + + "DATA_STORE_TYPE_UNSPECIFIED\020\000\022\016\n\nPUBLIC_" + + "WEB\020\001\022\020\n\014UNSTRUCTURED\020\002\022\016\n\nSTRUCTURED\020\003B" + + "\251\001\n&com.google.cloud.dialogflow.cx.v3bet" + + "a1B\030DataStoreConnectionProtoP\001Z6cloud.go" + + "ogle.com/go/dialogflow/cx/apiv3beta1/cxp" + + "b;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow" + + ".Cx.V3Beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DataStoreConnection_descriptor, + new java.lang.String[] { + "DataStoreType", "DataStore", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreType.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreType.java new file mode 100644 index 000000000000..c62fb1469b9b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DataStoreType.java @@ -0,0 +1,203 @@ +/* + * 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/data_store_connection.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Type of a data store.
+ * Determines how search is performed in the data store.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.DataStoreType} + */ +public enum DataStoreType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. This value indicates that the data store type is not
+   * specified, so it will not be used during search.
+   * 
+ * + * DATA_STORE_TYPE_UNSPECIFIED = 0; + */ + DATA_STORE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * A data store that contains public web content.
+   * 
+ * + * PUBLIC_WEB = 1; + */ + PUBLIC_WEB(1), + /** + * + * + *
+   * A data store that contains unstructured private data.
+   * 
+ * + * UNSTRUCTURED = 2; + */ + UNSTRUCTURED(2), + /** + * + * + *
+   * A data store that contains structured data (for example FAQ).
+   * 
+ * + * STRUCTURED = 3; + */ + STRUCTURED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. This value indicates that the data store type is not
+   * specified, so it will not be used during search.
+   * 
+ * + * DATA_STORE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_STORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * A data store that contains public web content.
+   * 
+ * + * PUBLIC_WEB = 1; + */ + public static final int PUBLIC_WEB_VALUE = 1; + /** + * + * + *
+   * A data store that contains unstructured private data.
+   * 
+ * + * UNSTRUCTURED = 2; + */ + public static final int UNSTRUCTURED_VALUE = 2; + /** + * + * + *
+   * A data store that contains structured data (for example FAQ).
+   * 
+ * + * STRUCTURED = 3; + */ + public static final int STRUCTURED_VALUE = 3; + + 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 DataStoreType 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 DataStoreType forNumber(int value) { + switch (value) { + case 0: + return DATA_STORE_TYPE_UNSPECIFIED; + case 1: + return PUBLIC_WEB; + case 2: + return UNSTRUCTURED; + case 3: + return STRUCTURED; + 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 DataStoreType findValueByNumber(int number) { + return DataStoreType.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.DataStoreConnectionProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataStoreType[] VALUES = values(); + + public static DataStoreType 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 DataStoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.DataStoreType) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequest.java index afaa9d73785e..6bce4453ff7e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequest.java @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -105,7 +106,8 @@ public java.lang.String getName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -538,7 +540,8 @@ public Builder mergeFrom( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -566,7 +569,8 @@ public java.lang.String getName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -594,7 +598,8 @@ public com.google.protobuf.ByteString getNameBytes() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -621,7 +626,8 @@ public Builder setName(java.lang.String value) { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -644,7 +650,8 @@ public Builder clearName() { * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequestOrBuilder.java index 6d1f9768ce16..808877b54db6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteTransitionRouteGroupRequestOrBuilder.java @@ -31,7 +31,8 @@ public interface DeleteTransitionRouteGroupRequestOrBuilder * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -49,7 +50,8 @@ public interface DeleteTransitionRouteGroupRequestOrBuilder * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition - * Route Group ID>`. + * Route Group ID>` or `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java index b804efaa0e3b..5f96de3d7fbe 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java @@ -543,7 +543,10 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHand * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -567,7 +570,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -591,7 +597,10 @@ public int getTransitionRouteGroupsCount() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -616,7 +625,10 @@ public java.lang.String getTransitionRouteGroups(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -679,6 +691,65 @@ public com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSetting : nluSettings_; } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -715,6 +786,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 15, transitionRouteGroups_.getRaw(i)); } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(18, getKnowledgeConnectorSettings()); + } getUnknownFields().writeTo(output); } @@ -750,6 +824,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getKnowledgeConnectorSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -776,6 +855,11 @@ public boolean equals(final java.lang.Object obj) { if (hasNluSettings()) { if (!getNluSettings().equals(other.getNluSettings())) return false; } + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -809,6 +893,10 @@ public int hashCode() { hash = (37 * hash) + NLU_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getNluSettings().hashCode(); } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -984,6 +1072,11 @@ public Builder clear() { nluSettingsBuilder_.dispose(); nluSettingsBuilder_ = null; } + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } return this; } @@ -1059,6 +1152,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Flow result) { result.nluSettings_ = nluSettingsBuilder_ == null ? nluSettings_ : nluSettingsBuilder_.build(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } } @java.lang.Override @@ -1188,6 +1287,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Flow other) { if (other.hasNluSettings()) { mergeNluSettings(other.getNluSettings()); } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1273,6 +1375,13 @@ public Builder mergeFrom( transitionRouteGroups_.add(s); break; } // case 122 + case 146: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2879,7 +2988,10 @@ private void ensureTransitionRouteGroupsIsMutable() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2905,7 +3017,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2930,7 +3045,10 @@ public int getTransitionRouteGroupsCount() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2956,7 +3074,10 @@ public java.lang.String getTransitionRouteGroups(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -2982,7 +3103,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3016,7 +3140,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3049,7 +3176,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3079,7 +3209,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3108,7 +3241,10 @@ public Builder clearTransitionRouteGroups() { * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * @@ -3315,6 +3451,216 @@ public com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSetting return nluSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + .getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + @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/FlowImportStrategy.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowImportStrategy.java new file mode 100644 index 000000000000..56fc123dd63e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowImportStrategy.java @@ -0,0 +1,646 @@ +/* + * 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/flow.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The flow import strategy used for resource conflict resolution associated
+ * with an
+ * [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} + */ +public final class FlowImportStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + FlowImportStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowImportStrategy.newBuilder() to construct. + private FlowImportStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowImportStrategy() { + globalImportStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowImportStrategy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder.class); + } + + public static final int GLOBAL_IMPORT_STRATEGY_FIELD_NUMBER = 1; + private int globalImportStrategy_ = 0; + /** + * + * + *
+   * Optional. Global flow import strategy for resource conflict resolution. The
+   * import Import strategy for resource conflict resolution, applied globally
+   * throughout the flow. It will be applied for all
+   * display name conflicts in the imported content. If not specified,
+   * 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + @java.lang.Override + public int getGlobalImportStrategyValue() { + return globalImportStrategy_; + } + /** + * + * + *
+   * Optional. Global flow import strategy for resource conflict resolution. The
+   * import Import strategy for resource conflict resolution, applied globally
+   * throughout the flow. It will be applied for all
+   * display name conflicts in the imported content. If not specified,
+   * 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy getGlobalImportStrategy() { + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.forNumber(globalImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.UNRECOGNIZED + : result; + } + + 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 (globalImportStrategy_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, globalImportStrategy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (globalImportStrategy_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, globalImportStrategy_); + } + 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.FlowImportStrategy)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy other = + (com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) obj; + + if (globalImportStrategy_ != other.globalImportStrategy_) 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) + GLOBAL_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + globalImportStrategy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy 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.FlowImportStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy 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.FlowImportStrategy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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.FlowImportStrategy 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 flow import strategy used for resource conflict resolution associated
+   * with an
+   * [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + globalImportStrategy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy build() { + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy result = + new com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.globalImportStrategy_ = globalImportStrategy_; + } + } + + @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.FlowImportStrategy) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance()) + return this; + if (other.globalImportStrategy_ != 0) { + setGlobalImportStrategyValue(other.getGlobalImportStrategyValue()); + } + 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: + { + globalImportStrategy_ = input.readEnum(); + 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 int globalImportStrategy_ = 0; + /** + * + * + *
+     * Optional. Global flow import strategy for resource conflict resolution. The
+     * import Import strategy for resource conflict resolution, applied globally
+     * throughout the flow. It will be applied for all
+     * display name conflicts in the imported content. If not specified,
+     * 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + @java.lang.Override + public int getGlobalImportStrategyValue() { + return globalImportStrategy_; + } + /** + * + * + *
+     * Optional. Global flow import strategy for resource conflict resolution. The
+     * import Import strategy for resource conflict resolution, applied globally
+     * throughout the flow. It will be applied for all
+     * display name conflicts in the imported content. If not specified,
+     * 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for globalImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setGlobalImportStrategyValue(int value) { + globalImportStrategy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Global flow import strategy for resource conflict resolution. The
+     * import Import strategy for resource conflict resolution, applied globally
+     * throughout the flow. It will be applied for all
+     * display name conflicts in the imported content. If not specified,
+     * 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy getGlobalImportStrategy() { + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.forNumber(globalImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Global flow import strategy for resource conflict resolution. The
+     * import Import strategy for resource conflict resolution, applied globally
+     * throughout the flow. It will be applied for all
+     * display name conflicts in the imported content. If not specified,
+     * 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The globalImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setGlobalImportStrategy( + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + globalImportStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Global flow import strategy for resource conflict resolution. The
+     * import Import strategy for resource conflict resolution, applied globally
+     * throughout the flow. It will be applied for all
+     * display name conflicts in the imported content. If not specified,
+     * 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGlobalImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000001); + globalImportStrategy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + private static final com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowImportStrategy 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.FlowImportStrategy 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/FlowImportStrategyOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowImportStrategyOrBuilder.java new file mode 100644 index 000000000000..6d8fc739533a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowImportStrategyOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface FlowImportStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Global flow import strategy for resource conflict resolution. The
+   * import Import strategy for resource conflict resolution, applied globally
+   * throughout the flow. It will be applied for all
+   * display name conflicts in the imported content. If not specified,
+   * 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalImportStrategy. + */ + int getGlobalImportStrategyValue(); + /** + * + * + *
+   * Optional. Global flow import strategy for resource conflict resolution. The
+   * import Import strategy for resource conflict resolution, applied globally
+   * throughout the flow. It will be applied for all
+   * display name conflicts in the imported content. If not specified,
+   * 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy getGlobalImportStrategy(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java index 6848afd14e6f..4ed08d8b4a51 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java @@ -362,7 +362,10 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -384,7 +387,10 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -406,7 +412,10 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -429,7 +438,10 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * defined in the page have higher priority than those defined in the flow. * * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... } @@ -474,4 +486,46 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * .google.cloud.dialogflow.cx.v3beta1.NluSettings nlu_settings = 11; */ com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java index 11d5250a8a88..b8fe0c2f2823 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java @@ -79,6 +79,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,146 +108,156 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "w.proto\022\"google.cloud.dialogflow.cx.v3be" + "ta1\032\034google/api/annotations.proto\032\027googl" + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\031google/api/resource.proto\032-" - + "google/cloud/dialogflow/cx/v3beta1/page." - + "proto\032;google/cloud/dialogflow/cx/v3beta" - + "1/validation_message.proto\032#google/longr" - + "unning/operations.proto\032\033google/protobuf" - + "/empty.proto\032 google/protobuf/field_mask" - + ".proto\032\034google/protobuf/struct.proto\032\037go" - + "ogle/protobuf/timestamp.proto\"\266\003\n\013NluSet" - + "tings\022M\n\nmodel_type\030\001 \001(\01629.google.cloud" - + ".dialogflow.cx.v3beta1.NluSettings.Model" - + "Type\022 \n\030classification_threshold\030\003 \001(\002\022^" - + "\n\023model_training_mode\030\004 \001(\0162A.google.clo" - + "ud.dialogflow.cx.v3beta1.NluSettings.Mod" - + "elTrainingMode\"Y\n\tModelType\022\032\n\026MODEL_TYP" - + "E_UNSPECIFIED\020\000\022\027\n\023MODEL_TYPE_STANDARD\020\001" - + "\022\027\n\023MODEL_TYPE_ADVANCED\020\003\"{\n\021ModelTraini" - + "ngMode\022#\n\037MODEL_TRAINING_MODE_UNSPECIFIE" - + "D\020\000\022!\n\035MODEL_TRAINING_MODE_AUTOMATIC\020\001\022\036" - + "\n\032MODEL_TRAINING_MODE_MANUAL\020\002\"\346\003\n\004Flow\022" - + "\014\n\004name\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001" - + "\002\022\023\n\013description\030\003 \001(\t\022N\n\021transition_rou" - + "tes\030\004 \003(\01323.google.cloud.dialogflow.cx.v" - + "3beta1.TransitionRoute\022H\n\016event_handlers" - + "\030\n \003(\01320.google.cloud.dialogflow.cx.v3be" - + "ta1.EventHandler\022T\n\027transition_route_gro" - + "ups\030\017 \003(\tB3\372A0\n.dialogflow.googleapis.co" - + "m/TransitionRouteGroup\022E\n\014nlu_settings\030\013" - + " \001(\0132/.google.cloud.dialogflow.cx.v3beta" - + "1.NluSettings:h\352Ae\n\036dialogflow.googleapi" - + "s.com/Flow\022Cprojects/{project}/locations" - + "/{location}/agents/{agent}/flows/{flow}\"" - + "\241\001\n\021CreateFlowRequest\0227\n\006parent\030\001 \001(\tB\'\342" - + "A\001\002\372A \022\036dialogflow.googleapis.com/Flow\022<" - + "\n\004flow\030\002 \001(\0132(.google.cloud.dialogflow.c" - + "x.v3beta1.FlowB\004\342A\001\002\022\025\n\rlanguage_code\030\003 " - + "\001(\t\"Y\n\021DeleteFlowRequest\0225\n\004name\030\001 \001(\tB\'" - + "\342A\001\002\372A \n\036dialogflow.googleapis.com/Flow\022" - + "\r\n\005force\030\002 \001(\010\"\211\001\n\020ListFlowsRequest\0227\n\006p" - + "arent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googlea" - + "pis.com/Flow\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" - + "token\030\003 \001(\t\022\025\n\rlanguage_code\030\004 \001(\t\"e\n\021Li" - + "stFlowsResponse\0227\n\005flows\030\001 \003(\0132(.google." - + "cloud.dialogflow.cx.v3beta1.Flow\022\027\n\017next" - + "_page_token\030\002 \001(\t\"^\n\016GetFlowRequest\0225\n\004n" - + "ame\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapi" - + "s.com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"\231\001\n\021Up" - + "dateFlowRequest\022<\n\004flow\030\001 \001(\0132(.google.c" - + "loud.dialogflow.cx.v3beta1.FlowB\004\342A\001\002\022/\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.Fie" - + "ldMask\022\025\n\rlanguage_code\030\003 \001(\t\"I\n\020TrainFl" - + "owRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialog" - + "flow.googleapis.com/Flow\"c\n\023ValidateFlow" - + "Request\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogfl" - + "ow.googleapis.com/Flow\022\025\n\rlanguage_code\030" - + "\002 \001(\t\"~\n\036GetFlowValidationResultRequest\022" - + "E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow.googl" - + "eapis.com/FlowValidationResult\022\025\n\rlangua" - + "ge_code\030\002 \001(\t\"\266\002\n\024FlowValidationResult\022\014" - + "\n\004name\030\001 \001(\t\022R\n\023validation_messages\030\002 \003(" - + "\01325.google.cloud.dialogflow.cx.v3beta1.V" - + "alidationMessage\022/\n\013update_time\030\003 \001(\0132\032." - + "google.protobuf.Timestamp:\212\001\352A\206\001\n.dialog" - + "flow.googleapis.com/FlowValidationResult" - + "\022Tprojects/{project}/locations/{location" - + "}/agents/{agent}/flows/{flow}/validation" - + "Result\"\242\002\n\021ImportFlowRequest\0227\n\006parent\030\001" - + " \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.com" - + "/Flow\022\022\n\010flow_uri\030\002 \001(\tH\000\022\026\n\014flow_conten" - + "t\030\003 \001(\014H\000\022Y\n\rimport_option\030\004 \001(\0162B.googl" - + "e.cloud.dialogflow.cx.v3beta1.ImportFlow" - + "Request.ImportOption\"E\n\014ImportOption\022\035\n\031" - + "IMPORT_OPTION_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n" - + "\010FALLBACK\020\002B\006\n\004flow\"G\n\022ImportFlowRespons" - + "e\0221\n\004flow\030\001 \001(\tB#\372A \n\036dialogflow.googlea" - + "pis.com/Flow\"\212\001\n\021ExportFlowRequest\0225\n\004na" - + "me\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis" - + ".com/Flow\022\026\n\010flow_uri\030\002 \001(\tB\004\342A\001\001\022&\n\030inc" - + "lude_referenced_flows\030\004 \001(\010B\004\342A\001\001\"H\n\022Exp" - + "ortFlowResponse\022\022\n\010flow_uri\030\001 \001(\tH\000\022\026\n\014f" - + "low_content\030\002 \001(\014H\000B\006\n\004flow2\233\021\n\005Flows\022\302\001" - + "\n\nCreateFlow\0225.google.cloud.dialogflow.c" - + "x.v3beta1.CreateFlowRequest\032(.google.clo" - + "ud.dialogflow.cx.v3beta1.Flow\"S\332A\013parent" - + ",flow\202\323\344\223\002?\"7/v3beta1/{parent=projects/*" - + "/locations/*/agents/*}/flows:\004flow\022\243\001\n\nD" - + "eleteFlow\0225.google.cloud.dialogflow.cx.v" - + "3beta1.DeleteFlowRequest\032\026.google.protob" - + "uf.Empty\"F\332A\004name\202\323\344\223\0029*7/v3beta1/{name=" - + "projects/*/locations/*/agents/*/flows/*}" - + "\022\302\001\n\tListFlows\0224.google.cloud.dialogflow" - + ".cx.v3beta1.ListFlowsRequest\0325.google.cl" - + "oud.dialogflow.cx.v3beta1.ListFlowsRespo" - + "nse\"H\332A\006parent\202\323\344\223\0029\0227/v3beta1/{parent=p" - + "rojects/*/locations/*/agents/*}/flows\022\257\001" - + "\n\007GetFlow\0222.google.cloud.dialogflow.cx.v" - + "3beta1.GetFlowRequest\032(.google.cloud.dia" - + "logflow.cx.v3beta1.Flow\"F\332A\004name\202\323\344\223\0029\0227" - + "/v3beta1/{name=projects/*/locations/*/ag" - + "ents/*/flows/*}\022\314\001\n\nUpdateFlow\0225.google." - + "cloud.dialogflow.cx.v3beta1.UpdateFlowRe" - + "quest\032(.google.cloud.dialogflow.cx.v3bet" - + "a1.Flow\"]\332A\020flow,update_mask\202\323\344\223\002D2.google.c" + + "loud.dialogflow.cx.v3beta1.KnowledgeConn" + + "ectorSettingsB\004\342A\001\001:h\352Ae\n\036dialogflow.goo" + + "gleapis.com/Flow\022Cprojects/{project}/loc" + + "ations/{location}/agents/{agent}/flows/{" + + "flow}\"\241\001\n\021CreateFlowRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.com/" + + "Flow\022<\n\004flow\030\002 \001(\0132(.google.cloud.dialog" + + "flow.cx.v3beta1.FlowB\004\342A\001\002\022\025\n\rlanguage_c" + + "ode\030\003 \001(\t\"Y\n\021DeleteFlowRequest\0225\n\004name\030\001" + + " \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com" + + "/Flow\022\r\n\005force\030\002 \001(\010\"\211\001\n\020ListFlowsReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.g" + + "oogleapis.com/Flow\022\021\n\tpage_size\030\002 \001(\005\022\022\n" + + "\npage_token\030\003 \001(\t\022\025\n\rlanguage_code\030\004 \001(\t" + + "\"e\n\021ListFlowsResponse\0227\n\005flows\030\001 \003(\0132(.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Flow\022\027" + + "\n\017next_page_token\030\002 \001(\t\"^\n\016GetFlowReques" + + "t\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.goo" + + "gleapis.com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"" + + "\231\001\n\021UpdateFlowRequest\022<\n\004flow\030\001 \001(\0132(.go" + + "ogle.cloud.dialogflow.cx.v3beta1.FlowB\004\342" + + "A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" + + "uf.FieldMask\022\025\n\rlanguage_code\030\003 \001(\t\"I\n\020T" + + "rainFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036" + + "dialogflow.googleapis.com/Flow\"c\n\023Valida" + + "teFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036di" + + "alogflow.googleapis.com/Flow\022\025\n\rlanguage" + + "_code\030\002 \001(\t\"~\n\036GetFlowValidationResultRe" + + "quest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow" + + ".googleapis.com/FlowValidationResult\022\025\n\r" + + "language_code\030\002 \001(\t\"\266\002\n\024FlowValidationRe" + + "sult\022\014\n\004name\030\001 \001(\t\022R\n\023validation_message" + + "s\030\002 \003(\01325.google.cloud.dialogflow.cx.v3b" + + "eta1.ValidationMessage\022/\n\013update_time\030\003 " + + "\001(\0132\032.google.protobuf.Timestamp:\212\001\352A\206\001\n." + + "dialogflow.googleapis.com/FlowValidation" + + "Result\022Tprojects/{project}/locations/{lo" + + "cation}/agents/{agent}/flows/{flow}/vali" + + "dationResult\"\376\002\n\021ImportFlowRequest\0227\n\006pa" + + "rent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleap" + + "is.com/Flow\022\022\n\010flow_uri\030\002 \001(\tH\000\022\026\n\014flow_" + + "content\030\003 \001(\014H\000\022Y\n\rimport_option\030\004 \001(\0162B" + + ".google.cloud.dialogflow.cx.v3beta1.Impo" + + "rtFlowRequest.ImportOption\022Z\n\024flow_impor" + + "t_strategy\030\005 \001(\01326.google.cloud.dialogfl" + + "ow.cx.v3beta1.FlowImportStrategyB\004\342A\001\001\"E" + + "\n\014ImportOption\022\035\n\031IMPORT_OPTION_UNSPECIF" + + "IED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\006\n\004flow\"n\n" + + "\022FlowImportStrategy\022X\n\026global_import_str" + + "ategy\030\001 \001(\01622.google.cloud.dialogflow.cx" + + ".v3beta1.ImportStrategyB\004\342A\001\001\"G\n\022ImportF" + + "lowResponse\0221\n\004flow\030\001 \001(\tB#\372A \n\036dialogfl" + + "ow.googleapis.com/Flow\"\212\001\n\021ExportFlowReq" + + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow." + + "googleapis.com/Flow\022\026\n\010flow_uri\030\002 \001(\tB\004\342" + + "A\001\001\022&\n\030include_referenced_flows\030\004 \001(\010B\004\342" + + "A\001\001\"H\n\022ExportFlowResponse\022\022\n\010flow_uri\030\001 " + + "\001(\tH\000\022\026\n\014flow_content\030\002 \001(\014H\000B\006\n\004flow2\233\021" + + "\n\005Flows\022\302\001\n\nCreateFlow\0225.google.cloud.di" + + "alogflow.cx.v3beta1.CreateFlowRequest\032(." + + "google.cloud.dialogflow.cx.v3beta1.Flow\"" + + "S\332A\013parent,flow\202\323\344\223\002?\"7/v3beta1/{parent=" + + "projects/*/locations/*/agents/*}/flows:\004" + + "flow\022\243\001\n\nDeleteFlow\0225.google.cloud.dialo" + + "gflow.cx.v3beta1.DeleteFlowRequest\032\026.goo" + + "gle.protobuf.Empty\"F\332A\004name\202\323\344\223\0029*7/v3be" + "ta1/{name=projects/*/locations/*/agents/" - + "*/flows/*}:validate:\001*\022\360\001\n\027GetFlowValida" - + "tionResult\022B.google.cloud.dialogflow.cx." - + "v3beta1.GetFlowValidationResultRequest\0328" - + ".google.cloud.dialogflow.cx.v3beta1.Flow" - + "ValidationResult\"W\332A\004name\202\323\344\223\002J\022H/v3beta" - + "1/{name=projects/*/locations/*/agents/*/" - + "flows/*/validationResult}\022\334\001\n\nImportFlow" - + "\0225.google.cloud.dialogflow.cx.v3beta1.Im" - + "portFlowRequest\032\035.google.longrunning.Ope" - + "ration\"x\312A,\n\022ImportFlowResponse\022\026google." - + "protobuf.Struct\202\323\344\223\002C\">/v3beta1/{parent=" - + "projects/*/locations/*/agents/*}/flows:i" - + "mport:\001*\022\334\001\n\nExportFlow\0225.google.cloud.d" - + "ialogflow.cx.v3beta1.ExportFlowRequest\032\035" - + ".google.longrunning.Operation\"x\312A,\n\022Expo" - + "rtFlowResponse\022\026google.protobuf.Struct\202\323" - + "\344\223\002C\">/v3beta1/{name=projects/*/location" - + "s/*/agents/*/flows/*}:export:\001*\032x\312A\031dial" - + "ogflow.googleapis.com\322AYhttps://www.goog" - + "leapis.com/auth/cloud-platform,https://w" - + "ww.googleapis.com/auth/dialogflowB\303\001\n&co" - + "m.google.cloud.dialogflow.cx.v3beta1B\tFl" - + "owProtoP\001Z6cloud.google.com/go/dialogflo" - + "w/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Goog" - + "le.Cloud.Dialogflow.Cx.V3Beta1\352\002&Google:" - + ":Cloud::Dialogflow::CX::V3beta1b\006proto3" + + "*/flows/*}\022\302\001\n\tListFlows\0224.google.cloud." + + "dialogflow.cx.v3beta1.ListFlowsRequest\0325" + + ".google.cloud.dialogflow.cx.v3beta1.List" + + "FlowsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v3beta1" + + "/{parent=projects/*/locations/*/agents/*" + + "}/flows\022\257\001\n\007GetFlow\0222.google.cloud.dialo" + + "gflow.cx.v3beta1.GetFlowRequest\032(.google" + + ".cloud.dialogflow.cx.v3beta1.Flow\"F\332A\004na" + + "me\202\323\344\223\0029\0227/v3beta1/{name=projects/*/loca" + + "tions/*/agents/*/flows/*}\022\314\001\n\nUpdateFlow" + + "\0225.google.cloud.dialogflow.cx.v3beta1.Up" + + "dateFlowRequest\032(.google.cloud.dialogflo" + + "w.cx.v3beta1.Flow\"]\332A\020flow,update_mask\202\323" + + "\344\223\002D2/v3beta" + + "1/{parent=projects/*/locations/*/agents/" + + "*}/flows:import:\001*\022\334\001\n\nExportFlow\0225.goog" + + "le.cloud.dialogflow.cx.v3beta1.ExportFlo" + + "wRequest\032\035.google.longrunning.Operation\"" + + "x\312A,\n\022ExportFlowResponse\022\026google.protobu" + + "f.Struct\202\323\344\223\002C\">/v3beta1/{name=projects/" + + "*/locations/*/agents/*/flows/*}:export:\001" + + "*\032x\312A\031dialogflow.googleapis.com\322AYhttps:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/dialogf" + + "lowB\303\001\n&com.google.cloud.dialogflow.cx.v" + + "3beta1B\tFlowProtoP\001Z6cloud.google.com/go" + + "/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002" + + "\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1" + + "\352\002&Google::Cloud::Dialogflow::CX::V3beta" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -253,6 +267,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategyProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), @@ -282,6 +297,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventHandlers", "TransitionRouteGroups", "NluSettings", + "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateFlowRequest_descriptor = getDescriptor().getMessageTypes().get(2); @@ -369,10 +385,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowRequest_descriptor, new java.lang.String[] { - "Parent", "FlowUri", "FlowContent", "ImportOption", "Flow", + "Parent", "FlowUri", "FlowContent", "ImportOption", "FlowImportStrategy", "Flow", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowResponse_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowImportStrategy_descriptor, + new java.lang.String[] { + "GlobalImportStrategy", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowResponse_descriptor = + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ImportFlowResponse_descriptor, @@ -380,7 +404,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Flow", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowRequest_descriptor, @@ -388,7 +412,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "FlowUri", "IncludeReferencedFlows", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ExportFlowResponse_descriptor, @@ -411,6 +435,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.ImportStrategyProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java new file mode 100644 index 000000000000..d610b70fdf12 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java @@ -0,0 +1,5723 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Settings for Generative AI.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} + */ +public final class GenerativeSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) + GenerativeSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerativeSettings.newBuilder() to construct. + private GenerativeSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerativeSettings() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerativeSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder.class); + } + + public interface FallbackSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + java.lang.String getSelectedPrompt(); + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + com.google.protobuf.ByteString getSelectedPromptBytes(); + + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + getPromptTemplatesList(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + getPromptTemplates(int index); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + int getPromptTemplatesCount(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList(); + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index); + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} + */ + public static final class FallbackSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) + FallbackSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FallbackSettings.newBuilder() to construct. + private FallbackSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FallbackSettings() { + selectedPrompt_ = ""; + promptTemplates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FallbackSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder + .class); + } + + public interface PromptTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + java.lang.String getPromptText(); + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + com.google.protobuf.ByteString getPromptTextBytes(); + + /** + * + * + *
+       * If the flag is true, the prompt is frozen and cannot be modified by
+       * users.
+       * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + boolean getFrozen(); + } + /** + * + * + *
+     * Prompt template.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} + */ + public static final class PromptTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) + PromptTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use PromptTemplate.newBuilder() to construct. + private PromptTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromptTemplate() { + displayName_ = ""; + promptText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromptTemplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+       * Prompt name.
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object promptText_ = ""; + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + @java.lang.Override + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + 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(); + promptText_ = s; + return s; + } + } + /** + * + * + *
+       * Prompt text that is sent to a LLM on no-match default, placeholders are
+       * filled downstream. For example: "Here is a conversation $conversation,
+       * a response is: "
+       * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FROZEN_FIELD_NUMBER = 3; + private boolean frozen_ = false; + /** + * + * + *
+       * If the flag is true, the prompt is frozen and cannot be modified by
+       * users.
+       * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + @java.lang.Override + public boolean getFrozen() { + return frozen_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_); + } + if (frozen_ != false) { + output.writeBool(3, frozen_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_); + } + if (frozen_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, frozen_); + } + 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.GenerativeSettings.FallbackSettings + .PromptTemplate)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + other = + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate) + obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getPromptText().equals(other.getPromptText())) return false; + if (getFrozen() != other.getFrozen()) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getPromptText().hashCode(); + hash = (37 * hash) + FROZEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFrozen()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings + .PromptTemplate + 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.GenerativeSettings.FallbackSettings.PromptTemplate + 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; + } + /** + * + * + *
+       * Prompt template.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + promptText_ = ""; + frozen_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + build() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + result = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.promptText_ = promptText_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frozen_ = frozen_; + } + } + + @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.GenerativeSettings.FallbackSettings + .PromptTemplate) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPromptText().isEmpty()) { + promptText_ = other.promptText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFrozen() != false) { + setFrozen(other.getFrozen()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + promptText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + frozen_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 displayName_ = ""; + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt name.
+         * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object promptText_ = ""; + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promptText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @param value The promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearPromptText() { + promptText_ = getDefaultInstance().getPromptText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Prompt text that is sent to a LLM on no-match default, placeholders are
+         * filled downstream. For example: "Here is a conversation $conversation,
+         * a response is: "
+         * 
+ * + * string prompt_text = 2; + * + * @param value The bytes for promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean frozen_; + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @return The frozen. + */ + @java.lang.Override + public boolean getFrozen() { + return frozen_; + } + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @param value The frozen to set. + * @return This builder for chaining. + */ + public Builder setFrozen(boolean value) { + + frozen_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If the flag is true, the prompt is frozen and cannot be modified by
+         * users.
+         * 
+ * + * bool frozen = 3; + * + * @return This builder for chaining. + */ + public Builder clearFrozen() { + bitField0_ = (bitField0_ & ~0x00000004); + frozen_ = 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.GenerativeSettings.FallbackSettings.PromptTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) + private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .FallbackSettings.PromptTemplate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromptTemplate 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.GenerativeSettings.FallbackSettings + .PromptTemplate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SELECTED_PROMPT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object selectedPrompt_ = ""; + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + @java.lang.Override + public java.lang.String getSelectedPrompt() { + java.lang.Object ref = selectedPrompt_; + 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(); + selectedPrompt_ = s; + return s; + } + } + /** + * + * + *
+     * Display name of the selected prompt.
+     * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectedPromptBytes() { + java.lang.Object ref = selectedPrompt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedPrompt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEMPLATES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + promptTemplates_; + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + getPromptTemplatesList() { + return promptTemplates_; + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList() { + return promptTemplates_; + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public int getPromptTemplatesCount() { + return promptTemplates_.size(); + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + getPromptTemplates(int index) { + return promptTemplates_.get(index); + } + /** + * + * + *
+     * Stored prompts that can be selected, for example default templates like
+     * "conservative" or "chatty", or user defined ones.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index) { + return promptTemplates_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedPrompt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, selectedPrompt_); + } + for (int i = 0; i < promptTemplates_.size(); i++) { + output.writeMessage(4, promptTemplates_.get(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(selectedPrompt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, selectedPrompt_); + } + for (int i = 0; i < promptTemplates_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, promptTemplates_.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.GenerativeSettings.FallbackSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) obj; + + if (!getSelectedPrompt().equals(other.getSelectedPrompt())) return false; + if (!getPromptTemplatesList().equals(other.getPromptTemplatesList())) 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) + SELECTED_PROMPT_FIELD_NUMBER; + hash = (53 * hash) + getSelectedPrompt().hashCode(); + if (getPromptTemplatesCount() > 0) { + hash = (37 * hash) + PROMPT_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getPromptTemplatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings + 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.GenerativeSettings.FallbackSettings 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 Generative Fallback.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selectedPrompt_ = ""; + if (promptTemplatesBuilder_ == null) { + promptTemplates_ = java.util.Collections.emptyList(); + } else { + promptTemplates_ = null; + promptTemplatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result) { + if (promptTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + promptTemplates_ = java.util.Collections.unmodifiableList(promptTemplates_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.promptTemplates_ = promptTemplates_; + } else { + result.promptTemplates_ = promptTemplatesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selectedPrompt_ = selectedPrompt_; + } + } + + @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.GenerativeSettings.FallbackSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance()) return this; + if (!other.getSelectedPrompt().isEmpty()) { + selectedPrompt_ = other.selectedPrompt_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (promptTemplatesBuilder_ == null) { + if (!other.promptTemplates_.isEmpty()) { + if (promptTemplates_.isEmpty()) { + promptTemplates_ = other.promptTemplates_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePromptTemplatesIsMutable(); + promptTemplates_.addAll(other.promptTemplates_); + } + onChanged(); + } + } else { + if (!other.promptTemplates_.isEmpty()) { + if (promptTemplatesBuilder_.isEmpty()) { + promptTemplatesBuilder_.dispose(); + promptTemplatesBuilder_ = null; + promptTemplates_ = other.promptTemplates_; + bitField0_ = (bitField0_ & ~0x00000002); + promptTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPromptTemplatesFieldBuilder() + : null; + } else { + promptTemplatesBuilder_.addAllMessages(other.promptTemplates_); + } + } + } + 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 26: + { + selectedPrompt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .FallbackSettings.PromptTemplate.parser(), + extensionRegistry); + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(m); + } else { + promptTemplatesBuilder_.addMessage(m); + } + 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 selectedPrompt_ = ""; + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return The selectedPrompt. + */ + public java.lang.String getSelectedPrompt() { + java.lang.Object ref = selectedPrompt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selectedPrompt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return The bytes for selectedPrompt. + */ + public com.google.protobuf.ByteString getSelectedPromptBytes() { + java.lang.Object ref = selectedPrompt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedPrompt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @param value The selectedPrompt to set. + * @return This builder for chaining. + */ + public Builder setSelectedPrompt(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selectedPrompt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @return This builder for chaining. + */ + public Builder clearSelectedPrompt() { + selectedPrompt_ = getDefaultInstance().getSelectedPrompt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Display name of the selected prompt.
+       * 
+ * + * string selected_prompt = 3; + * + * @param value The bytes for selectedPrompt to set. + * @return This builder for chaining. + */ + public Builder setSelectedPromptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selectedPrompt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + promptTemplates_ = java.util.Collections.emptyList(); + + private void ensurePromptTemplatesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + promptTemplates_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate>(promptTemplates_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + promptTemplatesBuilder_; + + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + getPromptTemplatesList() { + if (promptTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(promptTemplates_); + } else { + return promptTemplatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public int getPromptTemplatesCount() { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.size(); + } else { + return promptTemplatesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate + getPromptTemplates(int index) { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.get(index); + } else { + return promptTemplatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder setPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.set(index, value); + onChanged(); + } else { + promptTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder setPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(value); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + value) { + if (promptTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(index, value); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addPromptTemplates( + int index, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + .Builder + builderForValue) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + promptTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder addAllPromptTemplates( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate> + values) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTemplates_); + onChanged(); + } else { + promptTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder clearPromptTemplates() { + if (promptTemplatesBuilder_ == null) { + promptTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + promptTemplatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public Builder removePromptTemplates(int index) { + if (promptTemplatesBuilder_ == null) { + ensurePromptTemplatesIsMutable(); + promptTemplates_.remove(index); + onChanged(); + } else { + promptTemplatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder + getPromptTemplatesBuilder(int index) { + return getPromptTemplatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder + getPromptTemplatesOrBuilder(int index) { + if (promptTemplatesBuilder_ == null) { + return promptTemplates_.get(index); + } else { + return promptTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesOrBuilderList() { + if (promptTemplatesBuilder_ != null) { + return promptTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(promptTemplates_); + } + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder + addPromptTemplatesBuilder() { + return getPromptTemplatesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance()); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder + addPromptTemplatesBuilder(int index) { + return getPromptTemplatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.getDefaultInstance()); + } + /** + * + * + *
+       * Stored prompts that can be selected, for example default templates like
+       * "conservative" or "chatty", or user defined ones.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder> + getPromptTemplatesBuilderList() { + return getPromptTemplatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder> + getPromptTemplatesFieldBuilder() { + if (promptTemplatesBuilder_ == null) { + promptTemplatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplate.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .PromptTemplateOrBuilder>( + promptTemplates_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + promptTemplates_ = null; + } + return promptTemplatesBuilder_; + } + + @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.GenerativeSettings.FallbackSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FallbackSettings 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.GenerativeSettings.FallbackSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KnowledgeConnectorSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The business. + */ + java.lang.String getBusiness(); + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + com.google.protobuf.ByteString getBusinessBytes(); + + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + java.lang.String getAgentIdentity(); + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + com.google.protobuf.ByteString getAgentIdentityBytes(); + + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + java.lang.String getBusinessDescription(); + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + com.google.protobuf.ByteString getBusinessDescriptionBytes(); + + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + java.lang.String getAgentScope(); + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + com.google.protobuf.ByteString getAgentScopeBytes(); + } + /** + * + * + *
+   * Settings for knowledge connector. These parameters are used for LLM prompt
+   * like "You are <agent>. You are a helpful and verbose <agent_identity> at
+   * <business>, <business_description>. Your task is to help humans on
+   * <agent_scope>".
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} + */ + public static final class KnowledgeConnectorSettings + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + KnowledgeConnectorSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeConnectorSettings.newBuilder() to construct. + private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeConnectorSettings() { + business_ = ""; + agent_ = ""; + agentIdentity_ = ""; + businessDescription_ = ""; + agentScope_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeConnectorSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder.class); + } + + public static final int BUSINESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object business_ = ""; + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The business. + */ + @java.lang.Override + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + 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(); + business_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the company, organization or other entity that the agent
+     * represents. Used for knowledge connector LLM prompt and for knowledge
+     * search.
+     * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object agent_ = ""; + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+     * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_IDENTITY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentIdentity_ = ""; + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + @java.lang.Override + public java.lang.String getAgentIdentity() { + java.lang.Object ref = agentIdentity_; + 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(); + agentIdentity_ = s; + return s; + } + } + /** + * + * + *
+     * Identity of the agent, e.g. "virtual agent", "AI assistant".
+     * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentIdentityBytes() { + java.lang.Object ref = agentIdentity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUSINESS_DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object businessDescription_ = ""; + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + @java.lang.Override + public java.lang.String getBusinessDescription() { + java.lang.Object ref = businessDescription_; + 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(); + businessDescription_ = s; + return s; + } + } + /** + * + * + *
+     * Company description, used for LLM prompt, e.g. "a family company selling
+     * freshly roasted coffee beans".
+     * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBusinessDescriptionBytes() { + java.lang.Object ref = businessDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + businessDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_SCOPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentScope_ = ""; + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + @java.lang.Override + public java.lang.String getAgentScope() { + java.lang.Object ref = agentScope_; + 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(); + agentScope_ = s; + return s; + } + } + /** + * + * + *
+     * Agent scope, e.g. "Example company website", "internal Example
+     * company website for employees", "manual of car owner".
+     * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentScopeBytes() { + java.lang.Object ref = agentScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentScope_ = 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(business_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, business_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentIdentity_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, businessDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_); + } + 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(business_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, business_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentIdentity_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, businessDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_); + } + 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.GenerativeSettings.KnowledgeConnectorSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + obj; + + if (!getBusiness().equals(other.getBusiness())) return false; + if (!getAgent().equals(other.getAgent())) return false; + if (!getAgentIdentity().equals(other.getAgentIdentity())) return false; + if (!getBusinessDescription().equals(other.getBusinessDescription())) return false; + if (!getAgentScope().equals(other.getAgentScope())) 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) + BUSINESS_FIELD_NUMBER; + hash = (53 * hash) + getBusiness().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + AGENT_IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getAgentIdentity().hashCode(); + hash = (37 * hash) + BUSINESS_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getBusinessDescription().hashCode(); + hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getAgentScope().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings + .KnowledgeConnectorSettings + 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.GenerativeSettings.KnowledgeConnectorSettings + 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 knowledge connector. These parameters are used for LLM prompt
+     * like "You are <agent>. You are a helpful and verbose <agent_identity> at
+     * <business>, <business_description>. Your task is to help humans on
+     * <agent_scope>".
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + business_ = ""; + agent_ = ""; + agentIdentity_ = ""; + businessDescription_ = ""; + agentScope_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + build() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + result = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.business_ = business_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.agent_ = agent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.agentIdentity_ = agentIdentity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.businessDescription_ = businessDescription_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.agentScope_ = agentScope_; + } + } + + @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.GenerativeSettings.KnowledgeConnectorSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance()) return this; + if (!other.getBusiness().isEmpty()) { + business_ = other.business_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAgentIdentity().isEmpty()) { + agentIdentity_ = other.agentIdentity_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBusinessDescription().isEmpty()) { + businessDescription_ = other.businessDescription_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAgentScope().isEmpty()) { + agentScope_ = other.agentScope_; + bitField0_ |= 0x00000010; + 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: + { + business_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + agent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + agentIdentity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + businessDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + agentScope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object business_ = ""; + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return The business. + */ + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + business_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return The bytes for business. + */ + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @param value The business to set. + * @return This builder for chaining. + */ + public Builder setBusiness(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @return This builder for chaining. + */ + public Builder clearBusiness() { + business_ = getDefaultInstance().getBusiness(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the company, organization or other entity that the agent
+       * represents. Used for knowledge connector LLM prompt and for knowledge
+       * search.
+       * 
+ * + * string business = 1; + * + * @param value The bytes for business to set. + * @return This builder for chaining. + */ + public Builder setBusinessBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + agent_ = getDefaultInstance().getAgent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
+       * 
+ * + * string agent = 2; + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object agentIdentity_ = ""; + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return The agentIdentity. + */ + public java.lang.String getAgentIdentity() { + java.lang.Object ref = agentIdentity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentIdentity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return The bytes for agentIdentity. + */ + public com.google.protobuf.ByteString getAgentIdentityBytes() { + java.lang.Object ref = agentIdentity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @param value The agentIdentity to set. + * @return This builder for chaining. + */ + public Builder setAgentIdentity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @return This builder for chaining. + */ + public Builder clearAgentIdentity() { + agentIdentity_ = getDefaultInstance().getAgentIdentity(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Identity of the agent, e.g. "virtual agent", "AI assistant".
+       * 
+ * + * string agent_identity = 3; + * + * @param value The bytes for agentIdentity to set. + * @return This builder for chaining. + */ + public Builder setAgentIdentityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object businessDescription_ = ""; + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return The businessDescription. + */ + public java.lang.String getBusinessDescription() { + java.lang.Object ref = businessDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return The bytes for businessDescription. + */ + public com.google.protobuf.ByteString getBusinessDescriptionBytes() { + java.lang.Object ref = businessDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + businessDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @param value The businessDescription to set. + * @return This builder for chaining. + */ + public Builder setBusinessDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + businessDescription_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @return This builder for chaining. + */ + public Builder clearBusinessDescription() { + businessDescription_ = getDefaultInstance().getBusinessDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Company description, used for LLM prompt, e.g. "a family company selling
+       * freshly roasted coffee beans".
+       * 
+ * + * string business_description = 4; + * + * @param value The bytes for businessDescription to set. + * @return This builder for chaining. + */ + public Builder setBusinessDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + businessDescription_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object agentScope_ = ""; + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return The agentScope. + */ + public java.lang.String getAgentScope() { + java.lang.Object ref = agentScope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentScope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return The bytes for agentScope. + */ + public com.google.protobuf.ByteString getAgentScopeBytes() { + java.lang.Object ref = agentScope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @param value The agentScope to set. + * @return This builder for chaining. + */ + public Builder setAgentScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentScope_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @return This builder for chaining. + */ + public Builder clearAgentScope() { + agentScope_ = getDefaultInstance().getAgentScope(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Agent scope, e.g. "Example company website", "internal Example
+       * company website for employees", "manual of car owner".
+       * 
+ * + * string agent_scope = 5; + * + * @param value The bytes for agentScope to set. + * @return This builder for chaining. + */ + public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentScope_ = value; + bitField0_ |= 0x00000010; + 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.GenerativeSettings.KnowledgeConnectorSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeConnectorSettings 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.GenerativeSettings.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FALLBACK_SETTINGS_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + fallbackSettings_; + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + @java.lang.Override + public boolean hasFallbackSettings() { + return fallbackSettings_ != null; + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + getFallbackSettings() { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder() { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } + + public static final int GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.SafetySettings generativeSafetySettings_; + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * @return Whether the generativeSafetySettings field is set. + */ + @java.lang.Override + public boolean hasGenerativeSafetySettings() { + return generativeSafetySettings_ != null; + } + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * @return The generativeSafetySettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getGenerativeSafetySettings() { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder + getGenerativeSafetySettingsOrBuilder() { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (fallbackSettings_ != null) { + output.writeMessage(1, getFallbackSettings()); + } + if (generativeSafetySettings_ != null) { + output.writeMessage(3, getGenerativeSafetySettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); + } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(7, getKnowledgeConnectorSettings()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fallbackSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFallbackSettings()); + } + if (generativeSafetySettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getGenerativeSafetySettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); + } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getKnowledgeConnectorSettings()); + } + 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.GenerativeSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) obj; + + if (!getName().equals(other.getName())) return false; + if (hasFallbackSettings() != other.hasFallbackSettings()) return false; + if (hasFallbackSettings()) { + if (!getFallbackSettings().equals(other.getFallbackSettings())) return false; + } + if (hasGenerativeSafetySettings() != other.hasGenerativeSafetySettings()) return false; + if (hasGenerativeSafetySettings()) { + if (!getGenerativeSafetySettings().equals(other.getGenerativeSafetySettings())) return false; + } + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasFallbackSettings()) { + hash = (37 * hash) + FALLBACK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getFallbackSettings().hashCode(); + } + if (hasGenerativeSafetySettings()) { + hash = (37 * hash) + GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenerativeSafetySettings().hashCode(); + } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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 Generative AI.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + fallbackSettings_ = null; + if (fallbackSettingsBuilder_ != null) { + fallbackSettingsBuilder_.dispose(); + fallbackSettingsBuilder_ = null; + } + generativeSafetySettings_ = null; + if (generativeSafetySettingsBuilder_ != null) { + generativeSafetySettingsBuilder_.dispose(); + generativeSafetySettingsBuilder_ = null; + } + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fallbackSettings_ = + fallbackSettingsBuilder_ == null ? fallbackSettings_ : fallbackSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.generativeSafetySettings_ = + generativeSafetySettingsBuilder_ == null + ? generativeSafetySettings_ + : generativeSafetySettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.GenerativeSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFallbackSettings()) { + mergeFallbackSettings(other.getFallbackSettings()); + } + if (other.hasGenerativeSafetySettings()) { + mergeGenerativeSafetySettings(other.getGenerativeSafetySettings()); + } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getFallbackSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 26: + { + input.readMessage( + getGenerativeSafetySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 58: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 58 + 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 name_ = ""; + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/generativeSettings`.
+     * 
+ * + * string name = 5; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + fallbackSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder> + fallbackSettingsBuilder_; + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + public boolean hasFallbackSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + getFallbackSettings() { + if (fallbackSettingsBuilder_ == null) { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } else { + return fallbackSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder setFallbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings value) { + if (fallbackSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fallbackSettings_ = value; + } else { + fallbackSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder setFallbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder + builderForValue) { + if (fallbackSettingsBuilder_ == null) { + fallbackSettings_ = builderForValue.build(); + } else { + fallbackSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder mergeFallbackSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings value) { + if (fallbackSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fallbackSettings_ != null + && fallbackSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance()) { + getFallbackSettingsBuilder().mergeFrom(value); + } else { + fallbackSettings_ = value; + } + } else { + fallbackSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public Builder clearFallbackSettings() { + bitField0_ = (bitField0_ & ~0x00000002); + fallbackSettings_ = null; + if (fallbackSettingsBuilder_ != null) { + fallbackSettingsBuilder_.dispose(); + fallbackSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder + getFallbackSettingsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFallbackSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder() { + if (fallbackSettingsBuilder_ != null) { + return fallbackSettingsBuilder_.getMessageOrBuilder(); + } else { + return fallbackSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + .getDefaultInstance() + : fallbackSettings_; + } + } + /** + * + * + *
+     * Settings for Generative Fallback.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder> + getFallbackSettingsFieldBuilder() { + if (fallbackSettingsBuilder_ == null) { + fallbackSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .FallbackSettingsOrBuilder>( + getFallbackSettings(), getParentForChildren(), isClean()); + fallbackSettings_ = null; + } + return fallbackSettingsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.SafetySettings generativeSafetySettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder> + generativeSafetySettingsBuilder_; + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * + * @return Whether the generativeSafetySettings field is set. + */ + public boolean hasGenerativeSafetySettings() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * + * @return The generativeSafetySettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getGenerativeSafetySettings() { + if (generativeSafetySettingsBuilder_ == null) { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } else { + return generativeSafetySettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public Builder setGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings value) { + if (generativeSafetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generativeSafetySettings_ = value; + } else { + generativeSafetySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public Builder setGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder builderForValue) { + if (generativeSafetySettingsBuilder_ == null) { + generativeSafetySettings_ = builderForValue.build(); + } else { + generativeSafetySettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public Builder mergeGenerativeSafetySettings( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings value) { + if (generativeSafetySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && generativeSafetySettings_ != null + && generativeSafetySettings_ + != com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()) { + getGenerativeSafetySettingsBuilder().mergeFrom(value); + } else { + generativeSafetySettings_ = value; + } + } else { + generativeSafetySettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public Builder clearGenerativeSafetySettings() { + bitField0_ = (bitField0_ & ~0x00000004); + generativeSafetySettings_ = null; + if (generativeSafetySettingsBuilder_ != null) { + generativeSafetySettingsBuilder_.dispose(); + generativeSafetySettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder + getGenerativeSafetySettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGenerativeSafetySettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder + getGenerativeSafetySettingsOrBuilder() { + if (generativeSafetySettingsBuilder_ != null) { + return generativeSafetySettingsBuilder_.getMessageOrBuilder(); + } else { + return generativeSafetySettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance() + : generativeSafetySettings_; + } + } + /** + * + * + *
+     * Settings for Generative Safety.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder> + getGenerativeSafetySettingsFieldBuilder() { + if (generativeSafetySettingsBuilder_ == null) { + generativeSafetySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder>( + getGenerativeSafetySettings(), getParentForChildren(), isClean()); + generativeSafetySettings_ = null; + } + return generativeSafetySettingsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.Builder + builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings.getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000008); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Settings for knowledge connector.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + .KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Language for this settings.
+     * 
+ * + * string language_code = 4; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000010; + 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.GenerativeSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerativeSettings 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.GenerativeSettings 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/GenerativeSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java new file mode 100644 index 000000000000..1294dae330b0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java @@ -0,0 +1,198 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GenerativeSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/generativeSettings`.
+   * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return Whether the fallbackSettings field is set. + */ + boolean hasFallbackSettings(); + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + * + * @return The fallbackSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings getFallbackSettings(); + /** + * + * + *
+   * Settings for Generative Fallback.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder + getFallbackSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * @return Whether the generativeSafetySettings field is set. + */ + boolean hasGenerativeSafetySettings(); + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + * + * @return The generativeSafetySettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getGenerativeSafetySettings(); + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder + getGenerativeSafetySettingsOrBuilder(); + + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Settings for knowledge connector.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); + + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Language for this settings.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java new file mode 100644 index 000000000000..a29cf2bc964d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java @@ -0,0 +1,146 @@ +/* + * 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/generative_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class GenerativeSettingsProto { + private GenerativeSettingsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n + * Request for + * [GetGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettings] + * RPC. + * + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} + */ +public final class GetGenerativeSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) + GetGenerativeSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGenerativeSettingsRequest.newBuilder() to construct. + private GetGenerativeSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGenerativeSettingsRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGenerativeSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_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_GetGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + 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.GetGenerativeSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest + 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.GetGenerativeSettingsRequest + 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest 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; + } + /** + * + * + *
+   * Request for
+   * [GetGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettings]
+   * RPC.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetGenerativeSettingsRequest_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_GetGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + languageCode_ = ""; + 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_GetGenerativeSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.GetGenerativeSettingsRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + languageCode_ = 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/generativeSettings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Language code of the generative settings.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = 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.GetGenerativeSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGenerativeSettingsRequest 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.GetGenerativeSettingsRequest + 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/GetGenerativeSettingsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetGenerativeSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..2e3a9bfadf30 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetGenerativeSettingsRequestOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetGenerativeSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/generativeSettings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Required. Language code of the generative settings.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequest.java index 1ffa4b83a62d..e3066fa37aae 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequest.java @@ -76,7 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -104,7 +106,9 @@ public java.lang.String getName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -583,7 +587,9 @@ public Builder mergeFrom( * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -610,7 +616,9 @@ public java.lang.String getName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -637,7 +645,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -663,7 +673,9 @@ public Builder setName(java.lang.String value) { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -685,7 +697,9 @@ public Builder clearName() { * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequestOrBuilder.java index 0835416eef64..f0c402cc6996 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequestOrBuilder.java @@ -30,7 +30,9 @@ public interface GetTransitionRouteGroupRequestOrBuilder * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * @@ -47,7 +49,9 @@ public interface GetTransitionRouteGroupRequestOrBuilder * Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>` + * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<Transition Route Group ID>`. * * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequest.java index e3d5640f9748..fe45e8e4e0ca 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequest.java @@ -506,6 +506,66 @@ public com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption get : result; } + public static final int FLOW_IMPORT_STRATEGY_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flowImportStrategy_; + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + @java.lang.Override + public boolean hasFlowImportStrategy() { + return flowImportStrategy_ != null; + } + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy getFlowImportStrategy() { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder + getFlowImportStrategyOrBuilder() { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -535,6 +595,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, importOption_); } + if (flowImportStrategy_ != null) { + output.writeMessage(5, getFlowImportStrategy()); + } getUnknownFields().writeTo(output); } @@ -561,6 +624,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, importOption_); } + if (flowImportStrategy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFlowImportStrategy()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -579,6 +645,10 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (importOption_ != other.importOption_) return false; + if (hasFlowImportStrategy() != other.hasFlowImportStrategy()) return false; + if (hasFlowImportStrategy()) { + if (!getFlowImportStrategy().equals(other.getFlowImportStrategy())) return false; + } if (!getFlowCase().equals(other.getFlowCase())) return false; switch (flowCase_) { case 2: @@ -605,6 +675,10 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + IMPORT_OPTION_FIELD_NUMBER; hash = (53 * hash) + importOption_; + if (hasFlowImportStrategy()) { + hash = (37 * hash) + FLOW_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getFlowImportStrategy().hashCode(); + } switch (flowCase_) { case 2: hash = (37 * hash) + FLOW_URI_FIELD_NUMBER; @@ -760,6 +834,11 @@ public Builder clear() { bitField0_ = 0; parent_ = ""; importOption_ = 0; + flowImportStrategy_ = null; + if (flowImportStrategyBuilder_ != null) { + flowImportStrategyBuilder_.dispose(); + flowImportStrategyBuilder_ = null; + } flowCase_ = 0; flow_ = null; return this; @@ -805,6 +884,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequ if (((from_bitField0_ & 0x00000008) != 0)) { result.importOption_ = importOption_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.flowImportStrategy_ = + flowImportStrategyBuilder_ == null + ? flowImportStrategy_ + : flowImportStrategyBuilder_.build(); + } } private void buildPartialOneofs( @@ -867,6 +952,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportFlowReques if (other.importOption_ != 0) { setImportOptionValue(other.getImportOptionValue()); } + if (other.hasFlowImportStrategy()) { + mergeFlowImportStrategy(other.getFlowImportStrategy()); + } switch (other.getFlowCase()) { case FLOW_URI: { @@ -936,6 +1024,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 42: + { + input.readMessage( + getFlowImportStrategyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1443,6 +1538,222 @@ public Builder clearImportOption() { return this; } + private com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flowImportStrategy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder> + flowImportStrategyBuilder_; + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + public boolean hasFlowImportStrategy() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy getFlowImportStrategy() { + if (flowImportStrategyBuilder_ == null) { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } else { + return flowImportStrategyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy value) { + if (flowImportStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + flowImportStrategy_ = value; + } else { + flowImportStrategyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder builderForValue) { + if (flowImportStrategyBuilder_ == null) { + flowImportStrategy_ = builderForValue.build(); + } else { + flowImportStrategyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFlowImportStrategy( + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy value) { + if (flowImportStrategyBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && flowImportStrategy_ != null + && flowImportStrategy_ + != com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance()) { + getFlowImportStrategyBuilder().mergeFrom(value); + } else { + flowImportStrategy_ = value; + } + } else { + flowImportStrategyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFlowImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000010); + flowImportStrategy_ = null; + if (flowImportStrategyBuilder_ != null) { + flowImportStrategyBuilder_.dispose(); + flowImportStrategyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder + getFlowImportStrategyBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getFlowImportStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder + getFlowImportStrategyOrBuilder() { + if (flowImportStrategyBuilder_ != null) { + return flowImportStrategyBuilder_.getMessageOrBuilder(); + } else { + return flowImportStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.getDefaultInstance() + : flowImportStrategy_; + } + } + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder> + getFlowImportStrategyFieldBuilder() { + if (flowImportStrategyBuilder_ == null) { + flowImportStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder>( + getFlowImportStrategy(), getParentForChildren(), isClean()); + flowImportStrategy_ = null; + } + return flowImportStrategyBuilder_; + } + @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/ImportFlowRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequestOrBuilder.java index 54d7138a1ba7..8ff8fb1c2347 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportFlowRequestOrBuilder.java @@ -167,5 +167,50 @@ public interface ImportFlowRequestOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption getImportOption(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowImportStrategy field is set. + */ + boolean hasFlowImportStrategy(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy getFlowImportStrategy(); + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategyOrBuilder + getFlowImportStrategyOrBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.FlowCase getFlowCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategy.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategy.java new file mode 100644 index 000000000000..0dddbcd6648e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategy.java @@ -0,0 +1,252 @@ +/* + * 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/import_strategy.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Import strategies for the conflict resolution of resources (i.e. intents,
+ * entities, and webhooks) with identical display names during import
+ * operations.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ImportStrategy} + */ +public enum ImportStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified. Treated as 'CREATE_NEW'.
+   * 
+ * + * IMPORT_STRATEGY_UNSPECIFIED = 0; + */ + IMPORT_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+   * Create a new resource with a numeric suffix appended to the end of the
+   * existing display name.
+   * 
+ * + * IMPORT_STRATEGY_CREATE_NEW = 1; + */ + IMPORT_STRATEGY_CREATE_NEW(1), + /** + * + * + *
+   * Replace existing resource with incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_REPLACE = 2; + */ + IMPORT_STRATEGY_REPLACE(2), + /** + * + * + *
+   * Keep existing resource and discard incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_KEEP = 3; + */ + IMPORT_STRATEGY_KEEP(3), + /** + * + * + *
+   * Combine existing and incoming resources when a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_MERGE = 4; + */ + IMPORT_STRATEGY_MERGE(4), + /** + * + * + *
+   * Throw error if a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_THROW_ERROR = 5; + */ + IMPORT_STRATEGY_THROW_ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified. Treated as 'CREATE_NEW'.
+   * 
+ * + * IMPORT_STRATEGY_UNSPECIFIED = 0; + */ + public static final int IMPORT_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Create a new resource with a numeric suffix appended to the end of the
+   * existing display name.
+   * 
+ * + * IMPORT_STRATEGY_CREATE_NEW = 1; + */ + public static final int IMPORT_STRATEGY_CREATE_NEW_VALUE = 1; + /** + * + * + *
+   * Replace existing resource with incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_REPLACE = 2; + */ + public static final int IMPORT_STRATEGY_REPLACE_VALUE = 2; + /** + * + * + *
+   * Keep existing resource and discard incoming resource in the content to be
+   * imported.
+   * 
+ * + * IMPORT_STRATEGY_KEEP = 3; + */ + public static final int IMPORT_STRATEGY_KEEP_VALUE = 3; + /** + * + * + *
+   * Combine existing and incoming resources when a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_MERGE = 4; + */ + public static final int IMPORT_STRATEGY_MERGE_VALUE = 4; + /** + * + * + *
+   * Throw error if a conflict is encountered.
+   * 
+ * + * IMPORT_STRATEGY_THROW_ERROR = 5; + */ + public static final int IMPORT_STRATEGY_THROW_ERROR_VALUE = 5; + + 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 ImportStrategy 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 ImportStrategy forNumber(int value) { + switch (value) { + case 0: + return IMPORT_STRATEGY_UNSPECIFIED; + case 1: + return IMPORT_STRATEGY_CREATE_NEW; + case 2: + return IMPORT_STRATEGY_REPLACE; + case 3: + return IMPORT_STRATEGY_KEEP; + case 4: + return IMPORT_STRATEGY_MERGE; + case 5: + return IMPORT_STRATEGY_THROW_ERROR; + 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 ImportStrategy findValueByNumber(int number) { + return ImportStrategy.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.ImportStrategyProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ImportStrategy[] VALUES = values(); + + public static ImportStrategy 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 ImportStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ImportStrategy) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategyProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategyProto.java new file mode 100644 index 000000000000..e4be3de9d856 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportStrategyProto.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/import_strategy.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ImportStrategyProto { + private ImportStrategyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/dialogflow/cx/v3beta1/imp" + + "ort_strategy.proto\022\"google.cloud.dialogf" + + "low.cx.v3beta1*\304\001\n\016ImportStrategy\022\037\n\033IMP" + + "ORT_STRATEGY_UNSPECIFIED\020\000\022\036\n\032IMPORT_STR" + + "ATEGY_CREATE_NEW\020\001\022\033\n\027IMPORT_STRATEGY_RE" + + "PLACE\020\002\022\030\n\024IMPORT_STRATEGY_KEEP\020\003\022\031\n\025IMP" + + "ORT_STRATEGY_MERGE\020\004\022\037\n\033IMPORT_STRATEGY_" + + "THROW_ERROR\020\005B\244\001\n&com.google.cloud.dialo" + + "gflow.cx.v3beta1B\023ImportStrategyProtoP\001Z" + + "6cloud.google.com/go/dialogflow/cx/apiv3" + + "beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.D" + + "ialogflow.Cx.V3Beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/KnowledgeConnectorSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/KnowledgeConnectorSettings.java new file mode 100644 index 000000000000..c7cad034aefa --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/KnowledgeConnectorSettings.java @@ -0,0 +1,2048 @@ +/* + * 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/page.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The Knowledge Connector settings for this page or flow.
+ * This includes information such as the attached Knowledge Bases, and the way
+ * to execute fulfillment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} + */ +public final class KnowledgeConnectorSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) + KnowledgeConnectorSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeConnectorSettings.newBuilder() to construct. + private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeConnectorSettings() { + dataStoreConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeConnectorSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder.class); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TARGET_PAGE(4), + TARGET_FLOW(5), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 4: + return TARGET_PAGE; + case 5: + return TARGET_FLOW; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * + * + *
+   * Whether Knowledge Connector is enabled or not.
+   * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int TRIGGER_FULFILLMENT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.Fulfillment triggerFulfillment_; + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + @java.lang.Override + public boolean hasTriggerFulfillment() { + return triggerFulfillment_ != null; + } + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment() { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder + getTriggerFulfillmentOrBuilder() { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + + public static final int TARGET_PAGE_FIELD_NUMBER = 4; + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + public boolean hasTargetPage() { + return targetCase_ == 4; + } + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + public java.lang.String getTargetPage() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 4) { + target_ = s; + } + return s; + } + } + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + public com.google.protobuf.ByteString getTargetPageBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 4) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FLOW_FIELD_NUMBER = 5; + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + public boolean hasTargetFlow() { + return targetCase_ == 5; + } + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + public java.lang.String getTargetFlow() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 5) { + target_ = s; + } + return s; + } + } + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + public com.google.protobuf.ByteString getTargetFlowBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 5) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_STORE_CONNECTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + dataStoreConnections_; + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsList() { + return dataStoreConnections_; + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsOrBuilderList() { + return dataStoreConnections_; + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDataStoreConnectionsCount() { + return dataStoreConnections_.size(); + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections( + int index) { + return dataStoreConnections_.get(index); + } + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + return dataStoreConnections_.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 { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (triggerFulfillment_ != null) { + output.writeMessage(3, getTriggerFulfillment()); + } + if (targetCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, target_); + } + if (targetCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + for (int i = 0; i < dataStoreConnections_.size(); i++) { + output.writeMessage(6, dataStoreConnections_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + if (triggerFulfillment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTriggerFulfillment()); + } + if (targetCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, target_); + } + if (targetCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + for (int i = 0; i < dataStoreConnections_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, dataStoreConnections_.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.KnowledgeConnectorSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (hasTriggerFulfillment() != other.hasTriggerFulfillment()) return false; + if (hasTriggerFulfillment()) { + if (!getTriggerFulfillment().equals(other.getTriggerFulfillment())) return false; + } + if (!getDataStoreConnectionsList().equals(other.getDataStoreConnectionsList())) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 4: + if (!getTargetPage().equals(other.getTargetPage())) return false; + break; + case 5: + if (!getTargetFlow().equals(other.getTargetFlow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + if (hasTriggerFulfillment()) { + hash = (37 * hash) + TRIGGER_FULFILLMENT_FIELD_NUMBER; + hash = (53 * hash) + getTriggerFulfillment().hashCode(); + } + if (getDataStoreConnectionsCount() > 0) { + hash = (37 * hash) + DATA_STORE_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreConnectionsList().hashCode(); + } + switch (targetCase_) { + case 4: + hash = (37 * hash) + TARGET_PAGE_FIELD_NUMBER; + hash = (53 * hash) + getTargetPage().hashCode(); + break; + case 5: + hash = (37 * hash) + TARGET_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getTargetFlow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings + 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.KnowledgeConnectorSettings + 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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.KnowledgeConnectorSettings 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 Knowledge Connector settings for this page or flow.
+   * This includes information such as the attached Knowledge Bases, and the way
+   * to execute fulfillment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + triggerFulfillment_ = null; + if (triggerFulfillmentBuilder_ != null) { + triggerFulfillmentBuilder_.dispose(); + triggerFulfillmentBuilder_ = null; + } + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + } else { + dataStoreConnections_ = null; + dataStoreConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings result) { + if (dataStoreConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + dataStoreConnections_ = java.util.Collections.unmodifiableList(dataStoreConnections_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.dataStoreConnections_ = dataStoreConnections_; + } else { + result.dataStoreConnections_ = dataStoreConnectionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.triggerFulfillment_ = + triggerFulfillmentBuilder_ == null + ? triggerFulfillment_ + : triggerFulfillmentBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @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.KnowledgeConnectorSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance()) + return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.hasTriggerFulfillment()) { + mergeTriggerFulfillment(other.getTriggerFulfillment()); + } + if (dataStoreConnectionsBuilder_ == null) { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnections_.isEmpty()) { + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.addAll(other.dataStoreConnections_); + } + onChanged(); + } + } else { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnectionsBuilder_.isEmpty()) { + dataStoreConnectionsBuilder_.dispose(); + dataStoreConnectionsBuilder_ = null; + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000010); + dataStoreConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataStoreConnectionsFieldBuilder() + : null; + } else { + dataStoreConnectionsBuilder_.addAllMessages(other.dataStoreConnections_); + } + } + } + switch (other.getTargetCase()) { + case TARGET_PAGE: + { + targetCase_ = 4; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_FLOW: + { + targetCase_ = 5; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + input.readMessage( + getTriggerFulfillmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 4; + target_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 5; + target_ = s; + break; + } // case 42 + case 50: + { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.parser(), + extensionRegistry); + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(m); + } else { + dataStoreConnectionsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private boolean enabled_; + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Knowledge Connector is enabled or not.
+     * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Fulfillment triggerFulfillment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment, + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder> + triggerFulfillmentBuilder_; + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + public boolean hasTriggerFulfillment() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment() { + if (triggerFulfillmentBuilder_ == null) { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } else { + return triggerFulfillmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public Builder setTriggerFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) { + if (triggerFulfillmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + triggerFulfillment_ = value; + } else { + triggerFulfillmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public Builder setTriggerFulfillment( + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder builderForValue) { + if (triggerFulfillmentBuilder_ == null) { + triggerFulfillment_ = builderForValue.build(); + } else { + triggerFulfillmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public Builder mergeTriggerFulfillment( + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) { + if (triggerFulfillmentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && triggerFulfillment_ != null + && triggerFulfillment_ + != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) { + getTriggerFulfillmentBuilder().mergeFrom(value); + } else { + triggerFulfillment_ = value; + } + } else { + triggerFulfillmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public Builder clearTriggerFulfillment() { + bitField0_ = (bitField0_ & ~0x00000002); + triggerFulfillment_ = null; + if (triggerFulfillmentBuilder_ != null) { + triggerFulfillmentBuilder_.dispose(); + triggerFulfillmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder + getTriggerFulfillmentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTriggerFulfillmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder + getTriggerFulfillmentOrBuilder() { + if (triggerFulfillmentBuilder_ != null) { + return triggerFulfillmentBuilder_.getMessageOrBuilder(); + } else { + return triggerFulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance() + : triggerFulfillment_; + } + } + /** + * + * + *
+     * The fulfillment to be triggered.
+     *
+     * When the answers from the Knowledge Connector are selected by Dialogflow,
+     * you can utitlize the request scoped parameter `$request.knowledge.answers`
+     * (contains up to the 5 highest confidence answers) and
+     * `$request.knowledge.questions` (contains the corresponding questions) to
+     * construct the fulfillment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment, + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder> + getTriggerFulfillmentFieldBuilder() { + if (triggerFulfillmentBuilder_ == null) { + triggerFulfillmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment, + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>( + getTriggerFulfillment(), getParentForChildren(), isClean()); + triggerFulfillment_ = null; + } + return triggerFulfillmentBuilder_; + } + + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + @java.lang.Override + public boolean hasTargetPage() { + return targetCase_ == 4; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + @java.lang.Override + public java.lang.String getTargetPage() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 4) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetPageBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 4) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 4) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The targetPage to set. + * @return This builder for chaining. + */ + public Builder setTargetPage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 4; + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetPage() { + if (targetCase_ == 4) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The target page to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/pages/<Page ID>`.
+     * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetPage to set. + * @return This builder for chaining. + */ + public Builder setTargetPageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 4; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + @java.lang.Override + public boolean hasTargetFlow() { + return targetCase_ == 5; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + @java.lang.Override + public java.lang.String getTargetFlow() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 5) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetFlowBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 5) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 5) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The targetFlow to set. + * @return This builder for chaining. + */ + public Builder setTargetFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 5; + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetFlow() { + if (targetCase_ == 5) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The target flow to transition to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetFlow to set. + * @return This builder for chaining. + */ + public Builder setTargetFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 5; + target_ = value; + onChanged(); + return this; + } + + private java.util.List + dataStoreConnections_ = java.util.Collections.emptyList(); + + private void ensureDataStoreConnectionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + dataStoreConnections_ = + new java.util.ArrayList( + dataStoreConnections_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + dataStoreConnectionsBuilder_; + + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreConnectionsList() { + if (dataStoreConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } else { + return dataStoreConnectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDataStoreConnectionsCount() { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.size(); + } else { + return dataStoreConnectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections( + int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDataStoreConnections( + java.lang.Iterable + values) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreConnections_); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataStoreConnections() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + dataStoreConnectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDataStoreConnections(int index) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.remove(index); + onChanged(); + } else { + dataStoreConnectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + getDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsOrBuilderList() { + if (dataStoreConnectionsBuilder_ != null) { + return dataStoreConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + addDataStoreConnectionsBuilder() { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + addDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of related data store connections.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreConnectionsBuilderList() { + return getDataStoreConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsFieldBuilder() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>( + dataStoreConnections_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + dataStoreConnections_ = null; + } + return dataStoreConnectionsBuilder_; + } + + @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.KnowledgeConnectorSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeConnectorSettings 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.KnowledgeConnectorSettings + 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/KnowledgeConnectorSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/KnowledgeConnectorSettingsOrBuilder.java new file mode 100644 index 000000000000..a76a885bb7f7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/KnowledgeConnectorSettingsOrBuilder.java @@ -0,0 +1,243 @@ +/* + * 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/page.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface KnowledgeConnectorSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether Knowledge Connector is enabled or not.
+   * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return Whether the triggerFulfillment field is set. + */ + boolean hasTriggerFulfillment(); + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + * + * @return The triggerFulfillment. + */ + com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment(); + /** + * + * + *
+   * The fulfillment to be triggered.
+   *
+   * When the answers from the Knowledge Connector are selected by Dialogflow,
+   * you can utitlize the request scoped parameter `$request.knowledge.answers`
+   * (contains up to the 5 highest confidence answers) and
+   * `$request.knowledge.questions` (contains the corresponding questions) to
+   * construct the fulfillment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder(); + + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPage field is set. + */ + boolean hasTargetPage(); + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The targetPage. + */ + java.lang.String getTargetPage(); + /** + * + * + *
+   * The target page to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/pages/<Page ID>`.
+   * 
+ * + * string target_page = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPage. + */ + com.google.protobuf.ByteString getTargetPageBytes(); + + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetFlow field is set. + */ + boolean hasTargetFlow(); + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The targetFlow. + */ + java.lang.String getTargetFlow(); + /** + * + * + *
+   * The target flow to transition to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string target_flow = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetFlow. + */ + com.google.protobuf.ByteString getTargetFlowBytes(); + + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDataStoreConnectionsList(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections(int index); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDataStoreConnectionsCount(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDataStoreConnectionsOrBuilderList(); + /** + * + * + *
+   * Optional. List of related data store connections.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index); + + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.TargetCase getTargetCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequest.java index 7db3c8a6e6a0..b2d575c3a3d7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequest.java @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -103,7 +104,8 @@ public java.lang.String getParent() { *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -700,7 +702,8 @@ public Builder mergeFrom( *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -726,7 +729,8 @@ public java.lang.String getParent() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -752,7 +756,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -777,7 +782,8 @@ public Builder setParent(java.lang.String value) { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * @@ -798,7 +804,8 @@ public Builder clearParent() { *
      * Required. The flow to list all transition route groups for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>`.
+     * ID>/flows/<Flow ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
      * 
* * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequestOrBuilder.java index 358150f49f21..a88597b75eb2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequestOrBuilder.java @@ -29,7 +29,8 @@ public interface ListTransitionRouteGroupsRequestOrBuilder *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * @@ -45,7 +46,8 @@ public interface ListTransitionRouteGroupsRequestOrBuilder *
    * Required. The flow to list all transition route groups for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>`.
+   * ID>/flows/<Flow ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
    * 
* * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java index c4694709b012..4ec6f2c24d19 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java @@ -308,8 +308,10 @@ public com.google.cloud.dialogflow.cx.v3beta1.FormOrBuilder getFormOrBuilder() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -319,7 +321,10 @@ public com.google.cloud.dialogflow.cx.v3beta1.FormOrBuilder getFormOrBuilder() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -336,8 +341,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -347,7 +354,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -364,8 +374,10 @@ public int getTransitionRouteGroupsCount() { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -375,7 +387,10 @@ public int getTransitionRouteGroupsCount() {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -393,8 +408,10 @@ public java.lang.String getTransitionRouteGroups(int index) { *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -404,7 +421,10 @@ public java.lang.String getTransitionRouteGroups(int index) {
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -678,6 +698,65 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHand return eventHandlers_.get(index); } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + @java.lang.Override + public boolean hasKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ != null; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -714,6 +793,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 11, transitionRouteGroups_.getRaw(i)); } + if (knowledgeConnectorSettings_ != null) { + output.writeMessage(18, getKnowledgeConnectorSettings()); + } getUnknownFields().writeTo(output); } @@ -749,6 +831,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } + if (knowledgeConnectorSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getKnowledgeConnectorSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -778,6 +865,11 @@ public boolean equals(final java.lang.Object obj) { if (!getTransitionRouteGroupsList().equals(other.getTransitionRouteGroupsList())) return false; if (!getTransitionRoutesList().equals(other.getTransitionRoutesList())) return false; if (!getEventHandlersList().equals(other.getEventHandlersList())) return false; + if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; + if (hasKnowledgeConnectorSettings()) { + if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -813,6 +905,10 @@ public int hashCode() { hash = (37 * hash) + EVENT_HANDLERS_FIELD_NUMBER; hash = (53 * hash) + getEventHandlersList().hashCode(); } + if (hasKnowledgeConnectorSettings()) { + hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -994,6 +1090,11 @@ public Builder clear() { eventHandlersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } return this; } @@ -1069,6 +1170,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Page result) { transitionRouteGroups_.makeImmutable(); result.transitionRouteGroups_ = transitionRouteGroups_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.knowledgeConnectorSettings_ = + knowledgeConnectorSettingsBuilder_ == null + ? knowledgeConnectorSettings_ + : knowledgeConnectorSettingsBuilder_.build(); + } } @java.lang.Override @@ -1196,6 +1303,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { } } } + if (other.hasKnowledgeConnectorSettings()) { + mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1282,6 +1392,13 @@ public Builder mergeFrom( transitionRouteGroups_.add(s); break; } // case 90 + case 146: + { + input.readMessage( + getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1942,8 +2059,10 @@ private void ensureTransitionRouteGroupsIsMutable() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -1953,7 +2072,10 @@ private void ensureTransitionRouteGroupsIsMutable() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -1972,8 +2094,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -1983,7 +2107,10 @@ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2001,8 +2128,10 @@ public int getTransitionRouteGroupsCount() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2012,7 +2141,10 @@ public int getTransitionRouteGroupsCount() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2031,8 +2163,10 @@ public java.lang.String getTransitionRouteGroups(int index) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2042,7 +2176,10 @@ public java.lang.String getTransitionRouteGroups(int index) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2061,8 +2198,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2072,7 +2211,10 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2099,8 +2241,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2110,7 +2254,10 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2136,8 +2283,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2147,7 +2296,10 @@ public Builder addTransitionRouteGroups(java.lang.String value) {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2170,8 +2322,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2181,7 +2335,10 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -2203,8 +2360,10 @@ public Builder clearTransitionRouteGroups() { *
      * Ordered list of
      * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-     * associated with the page. Transition route groups must be unique within a
-     * page.
+     * added to the page. Transition route groups must be unique within a page. If
+     * the page links both flow-level transition route groups and agent-level
+     * transition route groups, the flow-level ones will have higher priority and
+     * will be put before the agent-level ones.
      *
      * *   If multiple transition routes within a page scope refer to the same
      *     intent, then the precedence order is: page's transition route -> page's
@@ -2214,7 +2373,10 @@ public Builder clearTransitionRouteGroups() {
      *     intent, then the first group in the ordered list takes precedence.
      *
      * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+     * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+     * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+     * groups.
      * 
* * @@ -3377,6 +3539,216 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder addEventHandl return eventHandlersBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + knowledgeConnectorSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder> + knowledgeConnectorSettingsBuilder_; + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + public boolean hasKnowledgeConnectorSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + getKnowledgeConnectorSettings() { + if (knowledgeConnectorSettingsBuilder_ == null) { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } else { + return knowledgeConnectorSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + knowledgeConnectorSettings_ = value; + } else { + knowledgeConnectorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder builderForValue) { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettings_ = builderForValue.build(); + } else { + knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKnowledgeConnectorSettings( + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { + if (knowledgeConnectorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && knowledgeConnectorSettings_ != null + && knowledgeConnectorSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + .getDefaultInstance()) { + getKnowledgeConnectorSettingsBuilder().mergeFrom(value); + } else { + knowledgeConnectorSettings_ = value; + } + } else { + knowledgeConnectorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKnowledgeConnectorSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + knowledgeConnectorSettings_ = null; + if (knowledgeConnectorSettingsBuilder_ != null) { + knowledgeConnectorSettingsBuilder_.dispose(); + knowledgeConnectorSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder + getKnowledgeConnectorSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder() { + if (knowledgeConnectorSettingsBuilder_ != null) { + return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder(); + } else { + return knowledgeConnectorSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.getDefaultInstance() + : knowledgeConnectorSettings_; + } + } + /** + * + * + *
+     * Optional. Knowledge connector configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder> + getKnowledgeConnectorSettingsFieldBuilder() { + if (knowledgeConnectorSettingsBuilder_ == null) { + knowledgeConnectorSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder>( + getKnowledgeConnectorSettings(), getParentForChildren(), isClean()); + knowledgeConnectorSettings_ = null; + } + return knowledgeConnectorSettingsBuilder_; + } + @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/PageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java index 6d104b638494..c0a1a0a290b9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java @@ -166,8 +166,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -177,7 +179,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -192,8 +197,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -203,7 +210,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -218,8 +228,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -229,7 +241,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -245,8 +260,10 @@ public interface PageOrBuilder *
    * Ordered list of
    * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
-   * associated with the page. Transition route groups must be unique within a
-   * page.
+   * added to the page. Transition route groups must be unique within a page. If
+   * the page links both flow-level transition route groups and agent-level
+   * transition route groups, the flow-level ones will have higher priority and
+   * will be put before the agent-level ones.
    *
    * *   If multiple transition routes within a page scope refer to the same
    *     intent, then the precedence order is: page's transition route -> page's
@@ -256,7 +273,10 @@ public interface PageOrBuilder
    *     intent, then the first group in the ordered list takes precedence.
    *
    * Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
+   * ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
+   * or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
+   * groups.
    * 
* * repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { ... } @@ -486,4 +506,46 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou * repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10; */ com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHandlersOrBuilder(int index); + + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeConnectorSettings field is set. + */ + boolean hasKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeConnectorSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings getKnowledgeConnectorSettings(); + /** + * + * + *
+   * Optional. Knowledge connector configuration.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettingsOrBuilder + getKnowledgeConnectorSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java index 44e5c64209e6..bc2ceae7f8c1 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java @@ -75,6 +75,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePageRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -88,106 +92,119 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.proto\022\"google.cloud.dialogflow.cx.v3be" + "ta1\032\034google/api/annotations.proto\032\027googl" + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\031google/api/resource.proto\0324" - + "google/cloud/dialogflow/cx/v3beta1/fulfi" - + "llment.proto\032\033google/protobuf/empty.prot" - + "o\032 google/protobuf/field_mask.proto\032\034goo" - + "gle/protobuf/struct.proto\"\233\004\n\004Page\022\014\n\004na" - + "me\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022J\n\021" - + "entry_fulfillment\030\007 \001(\0132/.google.cloud.d" - + "ialogflow.cx.v3beta1.Fulfillment\0226\n\004form" - + "\030\004 \001(\0132(.google.cloud.dialogflow.cx.v3be" - + "ta1.Form\022T\n\027transition_route_groups\030\013 \003(" - + "\tB3\372A0\n.dialogflow.googleapis.com/Transi" - + "tionRouteGroup\022N\n\021transition_routes\030\t \003(" - + "\01323.google.cloud.dialogflow.cx.v3beta1.T" - + "ransitionRoute\022H\n\016event_handlers\030\n \003(\01320" - + ".google.cloud.dialogflow.cx.v3beta1.Even" - + "tHandler:u\352Ar\n\036dialogflow.googleapis.com" - + "/Page\022Pprojects/{project}/locations/{loc" - + "ation}/agents/{agent}/flows/{flow}/pages" - + "/{page}\"\273\004\n\004Form\022F\n\nparameters\030\001 \003(\01322.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Form.P" - + "arameter\032\352\003\n\tParameter\022\032\n\014display_name\030\001" - + " \001(\tB\004\342A\001\002\022\020\n\010required\030\002 \001(\010\022B\n\013entity_t" - + "ype\030\003 \001(\tB-\342A\001\002\372A&\n$dialogflow.googleapi" - + "s.com/EntityType\022\017\n\007is_list\030\004 \001(\010\022\\\n\rfil" - + "l_behavior\030\007 \001(\0132?.google.cloud.dialogfl" - + "ow.cx.v3beta1.Form.Parameter.FillBehavio" - + "rB\004\342A\001\002\022-\n\rdefault_value\030\t \001(\0132\026.google." - + "protobuf.Value\022\016\n\006redact\030\013 \001(\010\032\274\001\n\014FillB" - + "ehavior\022Y\n\032initial_prompt_fulfillment\030\003 " - + "\001(\0132/.google.cloud.dialogflow.cx.v3beta1" - + ".FulfillmentB\004\342A\001\002\022Q\n\027reprompt_event_han" - + "dlers\030\005 \003(\01320.google.cloud.dialogflow.cx" - + ".v3beta1.EventHandler\"\207\002\n\014EventHandler\022\022" - + "\n\004name\030\006 \001(\tB\004\342A\001\003\022\023\n\005event\030\004 \001(\tB\004\342A\001\002\022" - + "L\n\023trigger_fulfillment\030\005 \001(\0132/.google.cl" - + "oud.dialogflow.cx.v3beta1.Fulfillment\022:\n" - + "\013target_page\030\002 \001(\tB#\372A \n\036dialogflow.goog" - + "leapis.com/PageH\000\022:\n\013target_flow\030\003 \001(\tB#" - + "\372A \n\036dialogflow.googleapis.com/FlowH\000B\010\n" - + "\006target\"\277\002\n\017TransitionRoute\022\022\n\004name\030\006 \001(" - + "\tB\004\342A\001\003\0225\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow" - + ".googleapis.com/Intent\022\021\n\tcondition\030\002 \001(" - + "\t\022L\n\023trigger_fulfillment\030\003 \001(\0132/.google." - + "cloud.dialogflow.cx.v3beta1.Fulfillment\022" - + ":\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflow.go" - + "ogleapis.com/PageH\000\022:\n\013target_flow\030\005 \001(\t" - + "B#\372A \n\036dialogflow.googleapis.com/FlowH\000B" - + "\010\n\006target\"\211\001\n\020ListPagesRequest\0227\n\006parent" - + "\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.c" - + "om/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_s" - + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"e\n\021ListPag" - + "esResponse\0227\n\005pages\030\001 \003(\0132(.google.cloud" - + ".dialogflow.cx.v3beta1.Page\022\027\n\017next_page" - + "_token\030\002 \001(\t\"^\n\016GetPageRequest\0225\n\004name\030\001" - + " \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com" - + "/Page\022\025\n\rlanguage_code\030\002 \001(\t\"\241\001\n\021CreateP" - + "ageRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dia" - + "logflow.googleapis.com/Page\022<\n\004page\030\002 \001(" - + "\0132(.google.cloud.dialogflow.cx.v3beta1.P" - + "ageB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\231\001\n\021Upd" - + "atePageRequest\022<\n\004page\030\001 \001(\0132(.google.cl" - + "oud.dialogflow.cx.v3beta1.PageB\004\342A\001\002\022\025\n\r" - + "language_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\013" - + "2\032.google.protobuf.FieldMask\"Y\n\021DeletePa" - + "geRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialog" - + "flow.googleapis.com/Page\022\r\n\005force\030\002 \001(\0102" - + "\332\010\n\005Pages\022\312\001\n\tListPages\0224.google.cloud.d" - + "ialogflow.cx.v3beta1.ListPagesRequest\0325." - + "google.cloud.dialogflow.cx.v3beta1.ListP" - + "agesResponse\"P\332A\006parent\202\323\344\223\002A\022?/v3beta1/" - + "{parent=projects/*/locations/*/agents/*/" - + "flows/*}/pages\022\267\001\n\007GetPage\0222.google.clou" - + "d.dialogflow.cx.v3beta1.GetPageRequest\032(" - + ".google.cloud.dialogflow.cx.v3beta1.Page" - + "\"N\332A\004name\202\323\344\223\002A\022?/v3beta1/{name=projects" - + "/*/locations/*/agents/*/flows/*/pages/*}" - + "\022\312\001\n\nCreatePage\0225.google.cloud.dialogflo" - + "w.cx.v3beta1.CreatePageRequest\032(.google." - + "cloud.dialogflow.cx.v3beta1.Page\"[\332A\013par" - + "ent,page\202\323\344\223\002G\"?/v3beta1/{parent=project" - + "s/*/locations/*/agents/*/flows/*}/pages:" - + "\004page\022\324\001\n\nUpdatePage\0225.google.cloud.dial" - + "ogflow.cx.v3beta1.UpdatePageRequest\032(.go" - + "ogle.cloud.dialogflow.cx.v3beta1.Page\"e\332" - + "A\020page,update_mask\202\323\344\223\002L2D/v3beta1/{page" - + ".name=projects/*/locations/*/agents/*/fl" - + "ows/*/pages/*}:\004page\022\253\001\n\nDeletePage\0225.go" - + "ogle.cloud.dialogflow.cx.v3beta1.DeleteP" - + "ageRequest\032\026.google.protobuf.Empty\"N\332A\004n" - + "ame\202\323\344\223\002A*?/v3beta1/{name=projects/*/loc" - + "ations/*/agents/*/flows/*/pages/*}\032x\312A\031d" - + "ialogflow.googleapis.com\322AYhttps://www.g" - + "oogleapis.com/auth/cloud-platform,https:" - + "//www.googleapis.com/auth/dialogflowB\303\001\n" - + "&com.google.cloud.dialogflow.cx.v3beta1B" - + "\tPageProtoP\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::V3beta1b\006prot" - + "o3" + + "avior.proto\032\031google/api/resource.proto\032>" + + "google/cloud/dialogflow/cx/v3beta1/data_" + + "store_connection.proto\0324google/cloud/dia" + + "logflow/cx/v3beta1/fulfillment.proto\032\033go" + + "ogle/protobuf/empty.proto\032 google/protob" + + "uf/field_mask.proto\032\034google/protobuf/str" + + "uct.proto\"\207\005\n\004Page\022\014\n\004name\030\001 \001(\t\022\032\n\014disp" + + "lay_name\030\002 \001(\tB\004\342A\001\002\022J\n\021entry_fulfillmen" + + "t\030\007 \001(\0132/.google.cloud.dialogflow.cx.v3b" + + "eta1.Fulfillment\0226\n\004form\030\004 \001(\0132(.google." + + "cloud.dialogflow.cx.v3beta1.Form\022T\n\027tran" + + "sition_route_groups\030\013 \003(\tB3\372A0\n.dialogfl" + + "ow.googleapis.com/TransitionRouteGroup\022N" + + "\n\021transition_routes\030\t \003(\01323.google.cloud" + + ".dialogflow.cx.v3beta1.TransitionRoute\022H" + + "\n\016event_handlers\030\n \003(\01320.google.cloud.di" + + "alogflow.cx.v3beta1.EventHandler\022j\n\034know" + + "ledge_connector_settings\030\022 \001(\0132>.google." + + "cloud.dialogflow.cx.v3beta1.KnowledgeCon" + + "nectorSettingsB\004\342A\001\001:u\352Ar\n\036dialogflow.go" + + "ogleapis.com/Page\022Pprojects/{project}/lo" + + "cations/{location}/agents/{agent}/flows/" + + "{flow}/pages/{page}\"\273\004\n\004Form\022F\n\nparamete" + + "rs\030\001 \003(\01322.google.cloud.dialogflow.cx.v3" + + "beta1.Form.Parameter\032\352\003\n\tParameter\022\032\n\014di" + + "splay_name\030\001 \001(\tB\004\342A\001\002\022\020\n\010required\030\002 \001(\010" + + "\022B\n\013entity_type\030\003 \001(\tB-\342A\001\002\372A&\n$dialogfl" + + "ow.googleapis.com/EntityType\022\017\n\007is_list\030" + + "\004 \001(\010\022\\\n\rfill_behavior\030\007 \001(\0132?.google.cl" + + "oud.dialogflow.cx.v3beta1.Form.Parameter" + + ".FillBehaviorB\004\342A\001\002\022-\n\rdefault_value\030\t \001" + + "(\0132\026.google.protobuf.Value\022\016\n\006redact\030\013 \001" + + "(\010\032\274\001\n\014FillBehavior\022Y\n\032initial_prompt_fu" + + "lfillment\030\003 \001(\0132/.google.cloud.dialogflo" + + "w.cx.v3beta1.FulfillmentB\004\342A\001\002\022Q\n\027reprom" + + "pt_event_handlers\030\005 \003(\01320.google.cloud.d" + + "ialogflow.cx.v3beta1.EventHandler\"\207\002\n\014Ev" + + "entHandler\022\022\n\004name\030\006 \001(\tB\004\342A\001\003\022\023\n\005event\030" + + "\004 \001(\tB\004\342A\001\002\022L\n\023trigger_fulfillment\030\005 \001(\013" + + "2/.google.cloud.dialogflow.cx.v3beta1.Fu" + + "lfillment\022:\n\013target_page\030\002 \001(\tB#\372A \n\036dia" + + "logflow.googleapis.com/PageH\000\022:\n\013target_" + + "flow\030\003 \001(\tB#\372A \n\036dialogflow.googleapis.c" + + "om/FlowH\000B\010\n\006target\"\332\002\n\017TransitionRoute\022" + + "\022\n\004name\030\006 \001(\tB\004\342A\001\003\022\031\n\013description\030\010 \001(\t" + + "B\004\342A\001\001\0225\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow." + + "googleapis.com/Intent\022\021\n\tcondition\030\002 \001(\t" + + "\022L\n\023trigger_fulfillment\030\003 \001(\0132/.google.c" + + "loud.dialogflow.cx.v3beta1.Fulfillment\022:" + + "\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflow.goo" + + "gleapis.com/PageH\000\022:\n\013target_flow\030\005 \001(\tB" + + "#\372A \n\036dialogflow.googleapis.com/FlowH\000B\010" + + "\n\006target\"\211\001\n\020ListPagesRequest\0227\n\006parent\030" + + "\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.co" + + "m/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"e\n\021ListPage" + + "sResponse\0227\n\005pages\030\001 \003(\0132(.google.cloud." + + "dialogflow.cx.v3beta1.Page\022\027\n\017next_page_" + + "token\030\002 \001(\t\"^\n\016GetPageRequest\0225\n\004name\030\001 " + + "\001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com/" + + "Page\022\025\n\rlanguage_code\030\002 \001(\t\"\241\001\n\021CreatePa" + + "geRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dial" + + "ogflow.googleapis.com/Page\022<\n\004page\030\002 \001(\013" + + "2(.google.cloud.dialogflow.cx.v3beta1.Pa" + + "geB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\231\001\n\021Upda" + + "tePageRequest\022<\n\004page\030\001 \001(\0132(.google.clo" + + "ud.dialogflow.cx.v3beta1.PageB\004\342A\001\002\022\025\n\rl" + + "anguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132" + + "\032.google.protobuf.FieldMask\"Y\n\021DeletePag" + + "eRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogf" + + "low.googleapis.com/Page\022\r\n\005force\030\002 \001(\010\"\334" + + "\002\n\032KnowledgeConnectorSettings\022\017\n\007enabled" + + "\030\001 \001(\010\022L\n\023trigger_fulfillment\030\003 \001(\0132/.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Fulfill" + + "ment\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialogfl" + + "ow.googleapis.com/PageH\000\022:\n\013target_flow\030" + + "\005 \001(\tB#\372A \n\036dialogflow.googleapis.com/Fl" + + "owH\000\022]\n\026data_store_connections\030\006 \003(\01327.g" + + "oogle.cloud.dialogflow.cx.v3beta1.DataSt" + + "oreConnectionB\004\342A\001\001B\010\n\006target2\332\010\n\005Pages\022" + + "\312\001\n\tListPages\0224.google.cloud.dialogflow." + + "cx.v3beta1.ListPagesRequest\0325.google.clo" + + "ud.dialogflow.cx.v3beta1.ListPagesRespon" + + "se\"P\332A\006parent\202\323\344\223\002A\022?/v3beta1/{parent=pr" + + "ojects/*/locations/*/agents/*/flows/*}/p" + + "ages\022\267\001\n\007GetPage\0222.google.cloud.dialogfl" + + "ow.cx.v3beta1.GetPageRequest\032(.google.cl" + + "oud.dialogflow.cx.v3beta1.Page\"N\332A\004name\202" + + "\323\344\223\002A\022?/v3beta1/{name=projects/*/locatio" + + "ns/*/agents/*/flows/*/pages/*}\022\312\001\n\nCreat" + + "ePage\0225.google.cloud.dialogflow.cx.v3bet" + + "a1.CreatePageRequest\032(.google.cloud.dial" + + "ogflow.cx.v3beta1.Page\"[\332A\013parent,page\202\323" + + "\344\223\002G\"?/v3beta1/{parent=projects/*/locati" + + "ons/*/agents/*/flows/*}/pages:\004page\022\324\001\n\n" + + "UpdatePage\0225.google.cloud.dialogflow.cx." + + "v3beta1.UpdatePageRequest\032(.google.cloud" + + ".dialogflow.cx.v3beta1.Page\"e\332A\020page,upd" + + "ate_mask\202\323\344\223\002L2D/v3beta1/{page.name=proj" + + "ects/*/locations/*/agents/*/flows/*/page" + + "s/*}:\004page\022\253\001\n\nDeletePage\0225.google.cloud" + + ".dialogflow.cx.v3beta1.DeletePageRequest" + + "\032\026.google.protobuf.Empty\"N\332A\004name\202\323\344\223\002A*" + + "?/v3beta1/{name=projects/*/locations/*/a" + + "gents/*/flows/*/pages/*}\032x\312A\031dialogflow." + + "googleapis.com\322AYhttps://www.googleapis." + + "com/auth/cloud-platform,https://www.goog" + + "leapis.com/auth/dialogflowB\303\001\n&com.googl" + + "e.cloud.dialogflow.cx.v3beta1B\tPageProto" + + "P\001Z6cloud.google.com/go/dialogflow/cx/ap" + + "iv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Clou" + + "d.Dialogflow.Cx.V3Beta1\352\002&Google::Cloud:" + + ":Dialogflow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -197,6 +214,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.FulfillmentProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -215,6 +233,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TransitionRouteGroups", "TransitionRoutes", "EventHandlers", + "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Form_descriptor = getDescriptor().getMessageTypes().get(1); @@ -263,6 +282,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRoute_descriptor, new java.lang.String[] { "Name", + "Description", "Intent", "Condition", "TriggerFulfillment", @@ -318,6 +338,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Force", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_KnowledgeConnectorSettings_descriptor, + new java.lang.String[] { + "Enabled", + "TriggerFulfillment", + "TargetPage", + "TargetFlow", + "DataStoreConnections", + "Target", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -333,6 +366,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.FulfillmentProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java index df510a0673fe..b943379294b0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java @@ -24,15 +24,15 @@ *
  * Represents the query input. It can contain one of:
  *
- * 1.  A conversational query in the form of text.
+ * 1. A conversational query in the form of text.
  *
- * 2.  An intent query that specifies which intent to trigger.
+ * 2. An intent query that specifies which intent to trigger.
  *
- * 3.  Natural language speech audio to be processed.
+ * 3. Natural language speech audio to be processed.
  *
- * 4.  An event to be triggered.
+ * 4. An event to be triggered.
  *
- * 5.  DTMF digits to invoke an intent and fill in parameter value.
+ * 5. DTMF digits to invoke an intent and fill in parameter value.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.QueryInput} @@ -691,15 +691,15 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Represents the query input. It can contain one of:
    *
-   * 1.  A conversational query in the form of text.
+   * 1. A conversational query in the form of text.
    *
-   * 2.  An intent query that specifies which intent to trigger.
+   * 2. An intent query that specifies which intent to trigger.
    *
-   * 3.  Natural language speech audio to be processed.
+   * 3. Natural language speech audio to be processed.
    *
-   * 4.  An event to be triggered.
+   * 4. An event to be triggered.
    *
-   * 5.  DTMF digits to invoke an intent and fill in parameter value.
+   * 5. DTMF digits to invoke an intent and fill in parameter value.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.QueryInput} 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 cbbe36e55c05..e985bf7270fc 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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @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=736 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -4807,7 +4807,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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -4829,7 +4829,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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @return The intent. */ @java.lang.Deprecated @@ -5046,7 +5046,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=736 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5072,7 +5072,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=736 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5102,7 +5102,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=736 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 * @return This builder for chaining. */ @java.lang.Deprecated 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 fd944c1aac0a..b3accb288a73 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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @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=725 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 * @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=736 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 * @return The intentDetectionConfidence. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java index 3b43d291481c..5c6e957c872b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java @@ -8023,6 +8023,459 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface KnowledgeInfoCardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Represents info card response. If the response contains generative
+   * knowledge prediction, Dialogflow will return a payload with Infobot
+   * Messenger compatible info card.
+   *
+   * Otherwise, the info card response is skipped.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} + */ + public static final class KnowledgeInfoCard extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + KnowledgeInfoCardOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeInfoCard.newBuilder() to construct. + private KnowledgeInfoCard(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KnowledgeInfoCard() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KnowledgeInfoCard(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder + .class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ResponseMessage.KnowledgeInfoCard)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard other = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard + 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.ResponseMessage.KnowledgeInfoCard prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents info card response. If the response contains generative
+     * knowledge prediction, Dialogflow will return a payload with Infobot
+     * Messenger compatible info card.
+     *
+     * Otherwise, the info card response is skipped.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard build() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard result = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance()) return this; + 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; + 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; + } + + @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.ResponseMessage.KnowledgeInfoCard) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeInfoCard 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.ResponseMessage.KnowledgeInfoCard + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int messageCase_ = 0; @SuppressWarnings("serial") @@ -8041,6 +8494,7 @@ public enum MessageCase PLAY_AUDIO(12), MIXED_AUDIO(13), TELEPHONY_TRANSFER_CALL(18), + KNOWLEDGE_INFO_CARD(20), MESSAGE_NOT_SET(0); private final int value; @@ -8077,6 +8531,8 @@ public static MessageCase forNumber(int value) { return MIXED_AUDIO; case 18: return TELEPHONY_TRANSFER_CALL; + case 20: + return KNOWLEDGE_INFO_CARD; case 0: return MESSAGE_NOT_SET; default: @@ -8656,6 +9112,70 @@ public boolean hasTelephonyTransferCall() { .getDefaultInstance(); } + public static final int KNOWLEDGE_INFO_CARD_FIELD_NUMBER = 20; + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + @java.lang.Override + public boolean hasKnowledgeInfoCard() { + return messageCase_ == 20; + } + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + getKnowledgeInfoCard() { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder() { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + public static final int CHANNEL_FIELD_NUMBER = 19; @SuppressWarnings("serial") @@ -8766,6 +9286,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, channel_); } + if (messageCase_ == 20) { + output.writeMessage( + 20, (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_); + } getUnknownFields().writeTo(output); } @@ -8828,6 +9352,12 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, channel_); } + if (messageCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8874,6 +9404,9 @@ public boolean equals(final java.lang.Object obj) { case 18: if (!getTelephonyTransferCall().equals(other.getTelephonyTransferCall())) return false; break; + case 20: + if (!getKnowledgeInfoCard().equals(other.getKnowledgeInfoCard())) return false; + break; case 0: default: } @@ -8927,6 +9460,10 @@ public int hashCode() { hash = (37 * hash) + TELEPHONY_TRANSFER_CALL_FIELD_NUMBER; hash = (53 * hash) + getTelephonyTransferCall().hashCode(); break; + case 20: + hash = (37 * hash) + KNOWLEDGE_INFO_CARD_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeInfoCard().hashCode(); + break; case 0: default: } @@ -9113,6 +9650,9 @@ public Builder clear() { if (telephonyTransferCallBuilder_ != null) { telephonyTransferCallBuilder_.clear(); } + if (knowledgeInfoCardBuilder_ != null) { + knowledgeInfoCardBuilder_.clear(); + } channel_ = ""; messageCase_ = 0; message_ = null; @@ -9153,7 +9693,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.channel_ = channel_; } } @@ -9188,6 +9728,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.ResponseM if (messageCase_ == 18 && telephonyTransferCallBuilder_ != null) { result.message_ = telephonyTransferCallBuilder_.build(); } + if (messageCase_ == 20 && knowledgeInfoCardBuilder_ != null) { + result.message_ = knowledgeInfoCardBuilder_.build(); + } } @java.lang.Override @@ -9238,7 +9781,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage return this; if (!other.getChannel().isEmpty()) { channel_ = other.channel_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } switch (other.getMessageCase()) { @@ -9287,6 +9830,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage mergeTelephonyTransferCall(other.getTelephonyTransferCall()); break; } + case KNOWLEDGE_INFO_CARD: + { + mergeKnowledgeInfoCard(other.getKnowledgeInfoCard()); + break; + } case MESSAGE_NOT_SET: { break; @@ -9378,9 +9926,16 @@ public Builder mergeFrom( case 154: { channel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 154 + case 162: + { + input.readMessage( + getKnowledgeInfoCardFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 20; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11637,6 +12192,258 @@ public Builder clearTelephonyTransferCall() { return telephonyTransferCallBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder> + knowledgeInfoCardBuilder_; + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + @java.lang.Override + public boolean hasKnowledgeInfoCard() { + return messageCase_ == 20; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + getKnowledgeInfoCard() { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } else { + if (messageCase_ == 20) { + return knowledgeInfoCardBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder setKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard value) { + if (knowledgeInfoCardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + knowledgeInfoCardBuilder_.setMessage(value); + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder setKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder + builderForValue) { + if (knowledgeInfoCardBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + knowledgeInfoCardBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder mergeKnowledgeInfoCard( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard value) { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20 + && message_ + != com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance()) { + message_ = + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 20) { + knowledgeInfoCardBuilder_.mergeFrom(value); + } else { + knowledgeInfoCardBuilder_.setMessage(value); + } + } + messageCase_ = 20; + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public Builder clearKnowledgeInfoCard() { + if (knowledgeInfoCardBuilder_ == null) { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + } + knowledgeInfoCardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder + getKnowledgeInfoCardBuilder() { + return getKnowledgeInfoCardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder() { + if ((messageCase_ == 20) && (knowledgeInfoCardBuilder_ != null)) { + return knowledgeInfoCardBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 20) { + return (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents info card for knowledge answers, to be better rendered in
+     * Dialogflow Messenger.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder> + getKnowledgeInfoCardFieldBuilder() { + if (knowledgeInfoCardBuilder_ == null) { + if (!(messageCase_ == 20)) { + message_ = + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + .getDefaultInstance(); + } + knowledgeInfoCardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 20; + onChanged(); + return knowledgeInfoCardBuilder_; + } + private java.lang.Object channel_ = ""; /** * @@ -11708,7 +12515,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11728,7 +12535,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -11753,7 +12560,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java index 7b4990140f9c..ab4dec4c8635 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java @@ -427,6 +427,51 @@ public interface ResponseMessageOrBuilder com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCallOrBuilder getTelephonyTransferCallOrBuilder(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return Whether the knowledgeInfoCard field is set. + */ + boolean hasKnowledgeInfoCard(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + * + * @return The knowledgeInfoCard. + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard getKnowledgeInfoCard(); + /** + * + * + *
+   * Represents info card for knowledge answers, to be better rendered in
+   * Dialogflow Messenger.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder + getKnowledgeInfoCardOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java index 9e999967a5d7..76967b3c4092 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java @@ -67,6 +67,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_TelephonyTransferCall_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_TelephonyTransferCall_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -79,8 +83,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n9google/cloud/dialogflow/cx/v3beta1/res" + "ponse_message.proto\022\"google.cloud.dialog" + "flow.cx.v3beta1\032\037google/api/field_behavi" - + "or.proto\032\034google/protobuf/struct.proto\"\361" - + "\013\n\017ResponseMessage\022H\n\004text\030\001 \001(\01328.googl" + + "or.proto\032\034google/protobuf/struct.proto\"\354" + + "\014\n\017ResponseMessage\022H\n\004text\030\001 \001(\01328.googl" + "e.cloud.dialogflow.cx.v3beta1.ResponseMe" + "ssage.TextH\000\022*\n\007payload\030\002 \001(\0132\027.google.p" + "rotobuf.StructH\000\022g\n\024conversation_success" @@ -100,30 +104,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ta1.ResponseMessage.MixedAudioB\004\342A\001\003H\000\022l" + "\n\027telephony_transfer_call\030\022 \001(\0132I.google" + ".cloud.dialogflow.cx.v3beta1.ResponseMes" - + "sage.TelephonyTransferCallH\000\022\017\n\007channel\030" - + "\023 \001(\t\032E\n\004Text\022\022\n\004text\030\001 \003(\tB\004\342A\001\002\022)\n\033all" - + "ow_playback_interruption\030\002 \001(\010B\004\342A\001\003\032=\n\020" - + "LiveAgentHandoff\022)\n\010metadata\030\001 \001(\0132\027.goo" - + "gle.protobuf.Struct\032@\n\023ConversationSucce" - + "ss\022)\n\010metadata\030\001 \001(\0132\027.google.protobuf.S" - + "truct\032f\n\017OutputAudioText\022\016\n\004text\030\001 \001(\tH\000" - + "\022\016\n\004ssml\030\002 \001(\tH\000\022)\n\033allow_playback_inter" - + "ruption\030\003 \001(\010B\004\342A\001\003B\010\n\006source\032\020\n\016EndInte" - + "raction\032O\n\tPlayAudio\022\027\n\taudio_uri\030\001 \001(\tB" - + "\004\342A\001\002\022)\n\033allow_playback_interruption\030\002 \001" - + "(\010B\004\342A\001\003\032\307\001\n\nMixedAudio\022X\n\010segments\030\001 \003(" - + "\0132F.google.cloud.dialogflow.cx.v3beta1.R" - + "esponseMessage.MixedAudio.Segment\032_\n\007Seg" - + "ment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022)\n\033" - + "allow_playback_interruption\030\003 \001(\010B\004\342A\001\003B" - + "\t\n\007content\032;\n\025TelephonyTransferCall\022\026\n\014p" - + "hone_number\030\001 \001(\tH\000B\n\n\010endpointB\t\n\007messa" - + "geB\316\001\n&com.google.cloud.dialogflow.cx.v3" - + "beta1B\024ResponseMessageProtoP\001Z6cloud.goo" - + "gle.com/go/dialogflow/cx/apiv3beta1/cxpb" - + ";cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow." - + "Cx.V3Beta1\352\002&Google::Cloud::Dialogflow::" - + "CX::V3beta1b\006proto3" + + "sage.TelephonyTransferCallH\000\022d\n\023knowledg" + + "e_info_card\030\024 \001(\0132E.google.cloud.dialogf" + + "low.cx.v3beta1.ResponseMessage.Knowledge" + + "InfoCardH\000\022\017\n\007channel\030\023 \001(\t\032E\n\004Text\022\022\n\004t" + + "ext\030\001 \003(\tB\004\342A\001\002\022)\n\033allow_playback_interr" + + "uption\030\002 \001(\010B\004\342A\001\003\032=\n\020LiveAgentHandoff\022)" + + "\n\010metadata\030\001 \001(\0132\027.google.protobuf.Struc" + + "t\032@\n\023ConversationSuccess\022)\n\010metadata\030\001 \001" + + "(\0132\027.google.protobuf.Struct\032f\n\017OutputAud" + + "ioText\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022)" + + "\n\033allow_playback_interruption\030\003 \001(\010B\004\342A\001" + + "\003B\010\n\006source\032\020\n\016EndInteraction\032O\n\tPlayAud" + + "io\022\027\n\taudio_uri\030\001 \001(\tB\004\342A\001\002\022)\n\033allow_pla" + + "yback_interruption\030\002 \001(\010B\004\342A\001\003\032\307\001\n\nMixed" + + "Audio\022X\n\010segments\030\001 \003(\0132F.google.cloud.d" + + "ialogflow.cx.v3beta1.ResponseMessage.Mix" + + "edAudio.Segment\032_\n\007Segment\022\017\n\005audio\030\001 \001(" + + "\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022)\n\033allow_playback_int" + + "erruption\030\003 \001(\010B\004\342A\001\003B\t\n\007content\032;\n\025Tele" + + "phonyTransferCall\022\026\n\014phone_number\030\001 \001(\tH" + + "\000B\n\n\010endpoint\032\023\n\021KnowledgeInfoCardB\t\n\007me" + + "ssageB\316\001\n&com.google.cloud.dialogflow.cx" + + ".v3beta1B\024ResponseMessageProtoP\001Z6cloud." + + "google.com/go/dialogflow/cx/apiv3beta1/c" + + "xpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogfl" + + "ow.Cx.V3Beta1\352\002&Google::Cloud::Dialogflo" + + "w::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -147,6 +154,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PlayAudio", "MixedAudio", "TelephonyTransferCall", + "KnowledgeInfoCard", "Channel", "Message", }); @@ -238,6 +246,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PhoneNumber", "Endpoint", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor + .getNestedTypes() + .get(8); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_KnowledgeInfoCard_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettings.java new file mode 100644 index 000000000000..d950cb527895 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettings.java @@ -0,0 +1,1841 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Settings for Generative Safety.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SafetySettings} + */ +public final class SafetySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.SafetySettings) + SafetySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SafetySettings.newBuilder() to construct. + private SafetySettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SafetySettings() { + bannedPhrases_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SafetySettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.class, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder.class); + } + + public interface PhraseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + } + /** + * + * + *
+   * Text input which can be used for prompt or banned phrases.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} + */ + public static final class Phrase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + PhraseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Phrase.newBuilder() to construct. + private Phrase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Phrase() { + text_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Phrase(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.class, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Text input which can be used for prompt or banned phrases.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Language code of the phrase.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + 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.SafetySettings.Phrase)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase other = + (com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) obj; + + if (!getText().equals(other.getText())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase 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.SafetySettings.Phrase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase 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.SafetySettings.Phrase parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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.SafetySettings.Phrase 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; + } + /** + * + * + *
+     * Text input which can be used for prompt or banned phrases.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.class, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase build() { + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase result = + new com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.SafetySettings.Phrase) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + 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: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + languageCode_ = 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 java.lang.Object text_ = ""; + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Text input which can be used for prompt or banned phrases.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Language code of the phrase.
+       * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = 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.SafetySettings.Phrase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + private static final com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Phrase 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.SafetySettings.Phrase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + bannedPhrases_; + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + @java.lang.Override + public java.util.List + getBannedPhrasesList() { + return bannedPhrases_; + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + return bannedPhrases_; + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + @java.lang.Override + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { + return bannedPhrases_.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 < bannedPhrases_.size(); i++) { + output.writeMessage(1, bannedPhrases_.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 < bannedPhrases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bannedPhrases_.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.SafetySettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings other = + (com.google.cloud.dialogflow.cx.v3beta1.SafetySettings) obj; + + if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) 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 (getBannedPhrasesCount() > 0) { + hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhrasesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings 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.SafetySettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings 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.SafetySettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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.SafetySettings 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 Generative Safety.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.SafetySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.SafetySettings) + com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.class, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + } else { + bannedPhrases_ = null; + bannedPhrasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings build() { + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings result = + new com.google.cloud.dialogflow.cx.v3beta1.SafetySettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings result) { + if (bannedPhrasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = java.util.Collections.unmodifiableList(bannedPhrases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bannedPhrases_ = bannedPhrases_; + } else { + result.bannedPhrases_ = bannedPhrasesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.SafetySettings 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.SafetySettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.SafetySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.SafetySettings other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()) + return this; + if (bannedPhrasesBuilder_ == null) { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrases_.isEmpty()) { + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.addAll(other.bannedPhrases_); + } + onChanged(); + } + } else { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrasesBuilder_.isEmpty()) { + bannedPhrasesBuilder_.dispose(); + bannedPhrasesBuilder_ = null; + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + bannedPhrasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBannedPhrasesFieldBuilder() + : null; + } else { + bannedPhrasesBuilder_.addAllMessages(other.bannedPhrases_); + } + } + } + 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.SafetySettings.Phrase m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.parser(), + extensionRegistry); + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(m); + } else { + bannedPhrasesBuilder_.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 + bannedPhrases_ = java.util.Collections.emptyList(); + + private void ensureBannedPhrasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = + new java.util.ArrayList( + bannedPhrases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder> + bannedPhrasesBuilder_; + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesList() { + if (bannedPhrasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } else { + return bannedPhrasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public int getBannedPhrasesCount() { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.size(); + } else { + return bannedPhrasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase getBannedPhrases( + int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addAllBannedPhrases( + java.lang.Iterable + values) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); + onChanged(); + } else { + bannedPhrasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder clearBannedPhrases() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bannedPhrasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder removeBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.remove(index); + onChanged(); + } else { + bannedPhrasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder + getBannedPhrasesBuilder(int index) { + return getBannedPhrasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + if (bannedPhrasesBuilder_ != null) { + return bannedPhrasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder + addBannedPhrasesBuilder() { + return getBannedPhrasesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder + addBannedPhrasesBuilder(int index) { + return getBannedPhrasesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesBuilderList() { + return getBannedPhrasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder> + getBannedPhrasesFieldBuilder() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder>( + bannedPhrases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bannedPhrases_ = null; + } + return bannedPhrasesBuilder_; + } + + @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.SafetySettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.SafetySettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.SafetySettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.SafetySettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetySettings 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.SafetySettings 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/SafetySettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettingsOrBuilder.java new file mode 100644 index 000000000000..d6f733b2e51b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettingsOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface SafetySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.SafetySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + java.util.List + getBannedPhrasesList(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase getBannedPhrases(int index); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + int getBannedPhrasesCount(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + java.util.List + getBannedPhrasesOrBuilderList(); + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( + int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettingsProto.java new file mode 100644 index 000000000000..c31c9c72e09f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SafetySettingsProto.java @@ -0,0 +1,93 @@ +/* + * 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/safety_settings.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class SafetySettingsProto { + private SafetySettingsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/dialogflow/cx/v3beta1/saf" + + "ety_settings.proto\022\"google.cloud.dialogf" + + "low.cx.v3beta1\032\037google/api/field_behavio" + + "r.proto\"\236\001\n\016SafetySettings\022Q\n\016banned_phr" + + "ases\030\001 \003(\01329.google.cloud.dialogflow.cx." + + "v3beta1.SafetySettings.Phrase\0329\n\006Phrase\022" + + "\022\n\004text\030\001 \001(\tB\004\342A\001\002\022\033\n\rlanguage_code\030\002 \001" + + "(\tB\004\342A\001\002B\244\001\n&com.google.cloud.dialogflow" + + ".cx.v3beta1B\023SafetySettingsProtoP\001Z6clou" + + "d.google.com/go/dialogflow/cx/apiv3beta1" + + "/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialog" + + "flow.Cx.V3Beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor, + new java.lang.String[] { + "BannedPhrases", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_SafetySettings_Phrase_descriptor, + new java.lang.String[] { + "Text", "LanguageCode", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java index 71eb17200341..393fee86392b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java @@ -351,6 +351,150 @@ private RedactionScope(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope) } + /** + * + * + *
+   * Defines how long we retain persisted data that contains sensitive info.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy} + */ + public enum RetentionStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Retains the persisted data with Dialogflow's internal default 365d TTLs.
+     * 
+ * + * RETENTION_STRATEGY_UNSPECIFIED = 0; + */ + RETENTION_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+     * Removes data when the conversation ends. If there is no [Conversation][]
+     * explicitly established, a default conversation ends when the
+     * corresponding Dialogflow session ends.
+     * 
+ * + * REMOVE_AFTER_CONVERSATION = 1; + */ + REMOVE_AFTER_CONVERSATION(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Retains the persisted data with Dialogflow's internal default 365d TTLs.
+     * 
+ * + * RETENTION_STRATEGY_UNSPECIFIED = 0; + */ + public static final int RETENTION_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Removes data when the conversation ends. If there is no [Conversation][]
+     * explicitly established, a default conversation ends when the
+     * corresponding Dialogflow session ends.
+     * 
+ * + * REMOVE_AFTER_CONVERSATION = 1; + */ + public static final int REMOVE_AFTER_CONVERSATION_VALUE = 1; + + 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 RetentionStrategy 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 RetentionStrategy forNumber(int value) { + switch (value) { + case 0: + return RETENTION_STRATEGY_UNSPECIFIED; + case 1: + return REMOVE_AFTER_CONVERSATION; + 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 RetentionStrategy findValueByNumber(int number) { + return RetentionStrategy.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.SecuritySettings.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final RetentionStrategy[] VALUES = values(); + + public static RetentionStrategy 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 RetentionStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy) + } + /** * * @@ -466,7 +610,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.getDescriptor() .getEnumTypes() - .get(2); + .get(3); } private static final PurgeDataType[] VALUES = values(); @@ -2499,6 +2643,7 @@ public enum DataRetentionCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RETENTION_WINDOW_DAYS(6), + RETENTION_STRATEGY(7), DATARETENTION_NOT_SET(0); private final int value; @@ -2519,6 +2664,8 @@ public static DataRetentionCase forNumber(int value) { switch (value) { case 6: return RETENTION_WINDOW_DAYS; + case 7: + return RETENTION_STRATEGY; case 0: return DATARETENTION_NOT_SET; default: @@ -2952,6 +3099,72 @@ public int getRetentionWindowDays() { return 0; } + public static final int RETENTION_STRATEGY_FIELD_NUMBER = 7; + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + public boolean hasRetentionStrategy() { + return dataRetentionCase_ == 7; + } + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + public int getRetentionStrategyValue() { + if (dataRetentionCase_ == 7) { + return (java.lang.Integer) dataRetention_; + } + return 0; + } + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + public com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy + getRetentionStrategy() { + if (dataRetentionCase_ == 7) { + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy result = + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy.forNumber( + (java.lang.Integer) dataRetention_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy.UNRECOGNIZED + : result; + } + return com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy + .RETENTION_STRATEGY_UNSPECIFIED; + } + public static final int PURGE_DATA_TYPES_FIELD_NUMBER = 8; @SuppressWarnings("serial") @@ -3292,6 +3505,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataRetentionCase_ == 6) { output.writeInt32(6, (int) ((java.lang.Integer) dataRetention_)); } + if (dataRetentionCase_ == 7) { + output.writeEnum(7, ((java.lang.Integer) dataRetention_)); + } if (getPurgeDataTypesList().size() > 0) { output.writeUInt32NoTag(66); output.writeUInt32NoTag(purgeDataTypesMemoizedSerializedSize); @@ -3343,6 +3559,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 6, (int) ((java.lang.Integer) dataRetention_)); } + if (dataRetentionCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 7, ((java.lang.Integer) dataRetention_)); + } { int dataSize = 0; for (int i = 0; i < purgeDataTypes_.size(); i++) { @@ -3406,6 +3627,9 @@ public boolean equals(final java.lang.Object obj) { case 6: if (getRetentionWindowDays() != other.getRetentionWindowDays()) return false; break; + case 7: + if (getRetentionStrategyValue() != other.getRetentionStrategyValue()) return false; + break; case 0: default: } @@ -3449,6 +3673,10 @@ public int hashCode() { hash = (37 * hash) + RETENTION_WINDOW_DAYS_FIELD_NUMBER; hash = (53 * hash) + getRetentionWindowDays(); break; + case 7: + hash = (37 * hash) + RETENTION_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getRetentionStrategyValue(); + break; case 0: default: } @@ -3601,7 +3829,7 @@ public Builder clear() { inspectTemplate_ = ""; deidentifyTemplate_ = ""; purgeDataTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); audioExportSettings_ = null; if (audioExportSettingsBuilder_ != null) { audioExportSettingsBuilder_.dispose(); @@ -3652,9 +3880,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings buildPartial() { private void buildPartialRepeatedFields( com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings result) { - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { purgeDataTypes_ = java.util.Collections.unmodifiableList(purgeDataTypes_); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } result.purgeDataTypes_ = purgeDataTypes_; } @@ -3679,13 +3907,13 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.SecuritySettin if (((from_bitField0_ & 0x00000020) != 0)) { result.deidentifyTemplate_ = deidentifyTemplate_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.audioExportSettings_ = audioExportSettingsBuilder_ == null ? audioExportSettings_ : audioExportSettingsBuilder_.build(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.insightsExportSettings_ = insightsExportSettingsBuilder_ == null ? insightsExportSettings_ @@ -3774,7 +4002,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings if (!other.purgeDataTypes_.isEmpty()) { if (purgeDataTypes_.isEmpty()) { purgeDataTypes_ = other.purgeDataTypes_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensurePurgeDataTypesIsMutable(); purgeDataTypes_.addAll(other.purgeDataTypes_); @@ -3793,6 +4021,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings setRetentionWindowDays(other.getRetentionWindowDays()); break; } + case RETENTION_STRATEGY: + { + setRetentionStrategyValue(other.getRetentionStrategyValue()); + break; + } case DATARETENTION_NOT_SET: { break; @@ -3854,6 +4087,13 @@ public Builder mergeFrom( dataRetentionCase_ = 6; break; } // case 48 + case 56: + { + int rawValue = input.readEnum(); + dataRetentionCase_ = 7; + dataRetention_ = rawValue; + break; + } // case 56 case 64: { int tmpRaw = input.readEnum(); @@ -3883,14 +4123,14 @@ public Builder mergeFrom( { input.readMessage( getAudioExportSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 98 case 106: { input.readMessage( getInsightsExportSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 106 case 138: @@ -4865,12 +5105,148 @@ public Builder clearRetentionWindowDays() { return this; } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + @java.lang.Override + public boolean hasRetentionStrategy() { + return dataRetentionCase_ == 7; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + @java.lang.Override + public int getRetentionStrategyValue() { + if (dataRetentionCase_ == 7) { + return ((java.lang.Integer) dataRetention_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @param value The enum numeric value on the wire for retentionStrategy to set. + * @return This builder for chaining. + */ + public Builder setRetentionStrategyValue(int value) { + dataRetentionCase_ = 7; + dataRetention_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy + getRetentionStrategy() { + if (dataRetentionCase_ == 7) { + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy result = + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy.forNumber( + (java.lang.Integer) dataRetention_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy.UNRECOGNIZED + : result; + } + return com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy + .RETENTION_STRATEGY_UNSPECIFIED; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @param value The retentionStrategy to set. + * @return This builder for chaining. + */ + public Builder setRetentionStrategy( + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + dataRetentionCase_ = 7; + dataRetention_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the retention behavior defined by
+     * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearRetentionStrategy() { + if (dataRetentionCase_ == 7) { + dataRetentionCase_ = 0; + dataRetention_ = null; + onChanged(); + } + return this; + } + private java.util.List purgeDataTypes_ = java.util.Collections.emptyList(); private void ensurePurgeDataTypesIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { + if (!((bitField0_ & 0x00000100) != 0)) { purgeDataTypes_ = new java.util.ArrayList(purgeDataTypes_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; } } /** @@ -5015,7 +5391,7 @@ public Builder addAllPurgeDataTypes( */ public Builder clearPurgeDataTypes() { purgeDataTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -5153,7 +5529,7 @@ public Builder addAllPurgeDataTypesValue(java.lang.Iterable v * @return Whether the audioExportSettings field is set. */ public boolean hasAudioExportSettings() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -5232,7 +5608,7 @@ public Builder setAudioExportSettings( } else { audioExportSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5271,7 +5647,7 @@ public Builder setAudioExportSettings( } else { audioExportSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5305,7 +5681,7 @@ public Builder setAudioExportSettings( public Builder mergeAudioExportSettings( com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings value) { if (audioExportSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && audioExportSettings_ != null && audioExportSettings_ != com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings @@ -5317,7 +5693,7 @@ public Builder mergeAudioExportSettings( } else { audioExportSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5349,7 +5725,7 @@ public Builder mergeAudioExportSettings( *
*/ public Builder clearAudioExportSettings() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); audioExportSettings_ = null; if (audioExportSettingsBuilder_ != null) { audioExportSettingsBuilder_.dispose(); @@ -5387,7 +5763,7 @@ public Builder clearAudioExportSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings.Builder getAudioExportSettingsBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getAudioExportSettingsFieldBuilder().getBuilder(); } @@ -5501,7 +5877,7 @@ public Builder clearAudioExportSettings() { * @return Whether the insightsExportSettings field is set. */ public boolean hasInsightsExportSettings() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -5560,7 +5936,7 @@ public Builder setInsightsExportSettings( } else { insightsExportSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5589,7 +5965,7 @@ public Builder setInsightsExportSettings( } else { insightsExportSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5613,7 +5989,7 @@ public Builder setInsightsExportSettings( public Builder mergeInsightsExportSettings( com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.InsightsExportSettings value) { if (insightsExportSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000400) != 0) && insightsExportSettings_ != null && insightsExportSettings_ != com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.InsightsExportSettings @@ -5625,7 +6001,7 @@ public Builder mergeInsightsExportSettings( } else { insightsExportSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5647,7 +6023,7 @@ public Builder mergeInsightsExportSettings( *
*/ public Builder clearInsightsExportSettings() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); insightsExportSettings_ = null; if (insightsExportSettingsBuilder_ != null) { insightsExportSettingsBuilder_.dispose(); @@ -5675,7 +6051,7 @@ public Builder clearInsightsExportSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.InsightsExportSettings.Builder getInsightsExportSettingsBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return getInsightsExportSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java index b7938f58c99b..b1ede32bda52 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java @@ -298,6 +298,52 @@ public interface SecuritySettingsOrBuilder */ int getRetentionWindowDays(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return Whether the retentionStrategy field is set. + */ + boolean hasRetentionStrategy(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The enum numeric value on the wire for retentionStrategy. + */ + int getRetentionStrategyValue(); + /** + * + * + *
+   * Specifies the retention behavior defined by
+   * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy].
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy retention_strategy = 7; + * + * + * @return The retentionStrategy. + */ + com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy getRetentionStrategy(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java index 5850b5a45b51..a09604a3c9c0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java @@ -99,7 +99,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle.cloud.dialogflow.cx.v3beta1.Securi" + "tySettingsB\004\342A\001\002\"b\n\035DeleteSecuritySettin" + "gsRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*dialog" - + "flow.googleapis.com/SecuritySettings\"\264\013\n" + + "flow.googleapis.com/SecuritySettings\"\362\014\n" + "\020SecuritySettings\022\014\n\004name\030\001 \001(\t\022\032\n\014displ" + "ay_name\030\002 \001(\tB\004\342A\001\002\022b\n\022redaction_strateg" + "y\030\003 \001(\0162F.google.cloud.dialogflow.cx.v3b" @@ -110,82 +110,87 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\'\372A$\n\"dlp.googleapis.com/InspectTemplate" + "\022G\n\023deidentify_template\030\021 \001(\tB*\372A\'\n%dlp." + "googleapis.com/DeidentifyTemplate\022\037\n\025ret" - + "ention_window_days\030\006 \001(\005H\000\022\\\n\020purge_data" - + "_types\030\010 \003(\0162B.google.cloud.dialogflow.c" - + "x.v3beta1.SecuritySettings.PurgeDataType" - + "\022g\n\025audio_export_settings\030\014 \001(\0132H.google" - + ".cloud.dialogflow.cx.v3beta1.SecuritySet" - + "tings.AudioExportSettings\022m\n\030insights_ex" - + "port_settings\030\r \001(\0132K.google.cloud.dialo" - + "gflow.cx.v3beta1.SecuritySettings.Insigh" - + "tsExportSettings\032\235\002\n\023AudioExportSettings" - + "\022\022\n\ngcs_bucket\030\001 \001(\t\022\034\n\024audio_export_pat" - + "tern\030\002 \001(\t\022\036\n\026enable_audio_redaction\030\003 \001" - + "(\010\022j\n\014audio_format\030\004 \001(\0162T.google.cloud." - + "dialogflow.cx.v3beta1.SecuritySettings.A" - + "udioExportSettings.AudioFormat\"H\n\013AudioF" - + "ormat\022\034\n\030AUDIO_FORMAT_UNSPECIFIED\020\000\022\t\n\005M" - + "ULAW\020\001\022\007\n\003MP3\020\002\022\007\n\003OGG\020\003\0328\n\026InsightsExpo" - + "rtSettings\022\036\n\026enable_insights_export\030\001 \001" - + "(\010\"P\n\021RedactionStrategy\022\"\n\036REDACTION_STR" - + "ATEGY_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERVI" - + "CE\020\001\"J\n\016RedactionScope\022\037\n\033REDACTION_SCOP" - + "E_UNSPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002" - + "\"H\n\rPurgeDataType\022\037\n\033PURGE_DATA_TYPE_UNS" - + "PECIFIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n" - + "*dialogflow.googleapis.com/SecuritySetti" - + "ngs\022Lprojects/{project}/locations/{locat" - + "ion}/securitySettings/{security_settings" - + "}B\020\n\016data_retention2\265\n\n\027SecuritySettings" - + "Service\022\202\002\n\026CreateSecuritySettings\022A.goo" - + "gle.cloud.dialogflow.cx.v3beta1.CreateSe" - + "curitySettingsRequest\0324.google.cloud.dia" - + "logflow.cx.v3beta1.SecuritySettings\"o\332A\030" - + "parent,security_settings\202\323\344\223\002N\"9/v3beta1" - + "/{parent=projects/*/locations/*}/securit" - + "ySettings:\021security_settings\022\325\001\n\023GetSecu" - + "ritySettings\022>.google.cloud.dialogflow.c" - + "x.v3beta1.GetSecuritySettingsRequest\0324.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Securi" - + "tySettings\"H\332A\004name\202\323\344\223\002;\0229/v3beta1/{nam" - + "e=projects/*/locations/*/securitySetting" - + "s/*}\022\232\002\n\026UpdateSecuritySettings\022A.google" - + ".cloud.dialogflow.cx.v3beta1.UpdateSecur" - + "itySettingsRequest\0324.google.cloud.dialog" - + "flow.cx.v3beta1.SecuritySettings\"\206\001\332A\035se" - + "curity_settings,update_mask\202\323\344\223\002`2K/v3be" - + "ta1/{security_settings.name=projects/*/l" - + "ocations/*/securitySettings/*}:\021security" - + "_settings\022\345\001\n\024ListSecuritySettings\022?.goo" - + "gle.cloud.dialogflow.cx.v3beta1.ListSecu" - + "ritySettingsRequest\032@.google.cloud.dialo" - + "gflow.cx.v3beta1.ListSecuritySettingsRes" - + "ponse\"J\332A\006parent\202\323\344\223\002;\0229/v3beta1/{parent" - + "=projects/*/locations/*}/securitySetting" - + "s\022\275\001\n\026DeleteSecuritySettings\022A.google.cl" - + "oud.dialogflow.cx.v3beta1.DeleteSecurity" - + "SettingsRequest\032\026.google.protobuf.Empty\"" - + "H\332A\004name\202\323\344\223\002;*9/v3beta1/{name=projects/" - + "*/locations/*/securitySettings/*}\032x\312A\031di" - + "alogflow.googleapis.com\322AYhttps://www.go" - + "ogleapis.com/auth/cloud-platform,https:/" - + "/www.googleapis.com/auth/dialogflowB\366\004\n&" - + "com.google.cloud.dialogflow.cx.v3beta1B\025" - + "SecuritySettingsProtoP\001Z6cloud.google.co" - + "m/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370" - + "\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3B" - + "eta1\352\002&Google::Cloud::Dialogflow::CX::V3" - + "beta1\352A\310\001\n\"dlp.googleapis.com/InspectTem" - + "plate\022Uorganizations/{organization}/loca" - + "tions/{location}/inspectTemplates/{inspe" - + "ct_template}\022Kprojects/{project}/locatio" - + "ns/{location}/inspectTemplates/{inspect_" - + "template}\352A\327\001\n%dlp.googleapis.com/Deiden" - + "tifyTemplate\022[organizations/{organizatio" - + "n}/locations/{location}/deidentifyTempla" - + "tes/{deidentify_template}\022Qprojects/{pro" - + "ject}/locations/{location}/deidentifyTem" - + "plates/{deidentify_template}b\006proto3" + + "ention_window_days\030\006 \001(\005H\000\022d\n\022retention_" + + "strategy\030\007 \001(\0162F.google.cloud.dialogflow" + + ".cx.v3beta1.SecuritySettings.RetentionSt" + + "rategyH\000\022\\\n\020purge_data_types\030\010 \003(\0162B.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Security" + + "Settings.PurgeDataType\022g\n\025audio_export_s" + + "ettings\030\014 \001(\0132H.google.cloud.dialogflow." + + "cx.v3beta1.SecuritySettings.AudioExportS" + + "ettings\022m\n\030insights_export_settings\030\r \001(" + + "\0132K.google.cloud.dialogflow.cx.v3beta1.S" + + "ecuritySettings.InsightsExportSettings\032\235" + + "\002\n\023AudioExportSettings\022\022\n\ngcs_bucket\030\001 \001" + + "(\t\022\034\n\024audio_export_pattern\030\002 \001(\t\022\036\n\026enab" + + "le_audio_redaction\030\003 \001(\010\022j\n\014audio_format" + + "\030\004 \001(\0162T.google.cloud.dialogflow.cx.v3be" + + "ta1.SecuritySettings.AudioExportSettings" + + ".AudioFormat\"H\n\013AudioFormat\022\034\n\030AUDIO_FOR" + + "MAT_UNSPECIFIED\020\000\022\t\n\005MULAW\020\001\022\007\n\003MP3\020\002\022\007\n" + + "\003OGG\020\003\0328\n\026InsightsExportSettings\022\036\n\026enab" + + "le_insights_export\030\001 \001(\010\"P\n\021RedactionStr" + + "ategy\022\"\n\036REDACTION_STRATEGY_UNSPECIFIED\020" + + "\000\022\027\n\023REDACT_WITH_SERVICE\020\001\"J\n\016RedactionS" + + "cope\022\037\n\033REDACTION_SCOPE_UNSPECIFIED\020\000\022\027\n" + + "\023REDACT_DISK_STORAGE\020\002\"V\n\021RetentionStrat" + + "egy\022\"\n\036RETENTION_STRATEGY_UNSPECIFIED\020\000\022" + + "\035\n\031REMOVE_AFTER_CONVERSATION\020\001\"H\n\rPurgeD" + + "ataType\022\037\n\033PURGE_DATA_TYPE_UNSPECIFIED\020\000" + + "\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n*dialogflo" + + "w.googleapis.com/SecuritySettings\022Lproje" + + "cts/{project}/locations/{location}/secur" + + "itySettings/{security_settings}B\020\n\016data_" + + "retention2\265\n\n\027SecuritySettingsService\022\202\002" + + "\n\026CreateSecuritySettings\022A.google.cloud." + + "dialogflow.cx.v3beta1.CreateSecuritySett" + + "ingsRequest\0324.google.cloud.dialogflow.cx" + + ".v3beta1.SecuritySettings\"o\332A\030parent,sec" + + "urity_settings\202\323\344\223\002N\"9/v3beta1/{parent=p" + + "rojects/*/locations/*}/securitySettings:" + + "\021security_settings\022\325\001\n\023GetSecuritySettin" + + "gs\022>.google.cloud.dialogflow.cx.v3beta1." + + "GetSecuritySettingsRequest\0324.google.clou" + + "d.dialogflow.cx.v3beta1.SecuritySettings" + + "\"H\332A\004name\202\323\344\223\002;\0229/v3beta1/{name=projects" + + "/*/locations/*/securitySettings/*}\022\232\002\n\026U" + + "pdateSecuritySettings\022A.google.cloud.dia" + + "logflow.cx.v3beta1.UpdateSecuritySetting" + + "sRequest\0324.google.cloud.dialogflow.cx.v3" + + "beta1.SecuritySettings\"\206\001\332A\035security_set" + + "tings,update_mask\202\323\344\223\002`2K/v3beta1/{secur" + + "ity_settings.name=projects/*/locations/*" + + "/securitySettings/*}:\021security_settings\022" + + "\345\001\n\024ListSecuritySettings\022?.google.cloud." + + "dialogflow.cx.v3beta1.ListSecuritySettin" + + "gsRequest\032@.google.cloud.dialogflow.cx.v" + + "3beta1.ListSecuritySettingsResponse\"J\332A\006" + + "parent\202\323\344\223\002;\0229/v3beta1/{parent=projects/" + + "*/locations/*}/securitySettings\022\275\001\n\026Dele" + + "teSecuritySettings\022A.google.cloud.dialog" + + "flow.cx.v3beta1.DeleteSecuritySettingsRe" + + "quest\032\026.google.protobuf.Empty\"H\332A\004name\202\323" + + "\344\223\002;*9/v3beta1/{name=projects/*/location" + + "s/*/securitySettings/*}\032x\312A\031dialogflow.g" + + "oogleapis.com\322AYhttps://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googl" + + "eapis.com/auth/dialogflowB\366\004\n&com.google" + + ".cloud.dialogflow.cx.v3beta1B\025SecuritySe" + + "ttingsProtoP\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\352A\310\001\n" + + "\"dlp.googleapis.com/InspectTemplate\022Uorg" + + "anizations/{organization}/locations/{loc" + + "ation}/inspectTemplates/{inspect_templat" + + "e}\022Kprojects/{project}/locations/{locati" + + "on}/inspectTemplates/{inspect_template}\352" + + "A\327\001\n%dlp.googleapis.com/DeidentifyTempla" + + "te\022[organizations/{organization}/locatio" + + "ns/{location}/deidentifyTemplates/{deide" + + "ntify_template}\022Qprojects/{project}/loca" + + "tions/{location}/deidentifyTemplates/{de" + + "identify_template}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -259,6 +264,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InspectTemplate", "DeidentifyTemplate", "RetentionWindowDays", + "RetentionStrategy", "PurgeDataTypes", "AudioExportSettings", "InsightsExportSettings", 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 0b6dda8462f0..85e729d01b4b 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 @@ -162,7 +162,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022R\n\023output_audio_config\030\004 \001(\01325.google." + "cloud.dialogflow.cx.v3beta1.OutputAudioC" + "onfig\022\037\n\027enable_partial_response\030\005 \001(\010\022\035" - + "\n\025enable_debugging_info\030\010 \001(\010\"\370\006\n\036CloudC" + + "\n\025enable_debugging_info\030\010 \001(\010\"\260\007\n\036CloudC" + "onversationDebuggingInfo\022\031\n\021audio_data_c" + "hunks\030\001 \001(\005\0229\n\026result_end_time_offset\030\002 " + "\001(\0132\031.google.protobuf.Duration\0227\n\024first_" @@ -180,165 +180,166 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\r \003(\0132\031.google.protobuf.Duration\022C\n sing" + "le_utterance_end_time_offset\030\016 \001(\0132\031.goo" + "gle.protobuf.Duration\0224\n\021no_speech_timeo" - + "ut\030\017 \001(\0132\031.google.protobuf.Duration\022\025\n\ri" - + "s_input_text\030\020 \001(\010\022@\n\035client_half_close_" - + "time_offset\030\021 \001(\0132\031.google.protobuf.Dura" - + "tion\022J\n\'client_half_close_streaming_time" - + "_offset\030\022 \001(\0132\031.google.protobuf.Duration" - + "\"\301\002\n\035StreamingDetectIntentResponse\022\\\n\022re" - + "cognition_result\030\001 \001(\0132>.google.cloud.di" - + "alogflow.cx.v3beta1.StreamingRecognition" - + "ResultH\000\022Z\n\026detect_intent_response\030\002 \001(\013" - + "28.google.cloud.dialogflow.cx.v3beta1.De" - + "tectIntentResponseH\000\022Z\n\016debugging_info\030\004" - + " \001(\0132B.google.cloud.dialogflow.cx.v3beta" - + "1.CloudConversationDebuggingInfoB\n\n\010resp" - + "onse\"\300\003\n\032StreamingRecognitionResult\022`\n\014m" - + "essage_type\030\001 \001(\0162J.google.cloud.dialogf" - + "low.cx.v3beta1.StreamingRecognitionResul" - + "t.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\tstabi" - + "lity\030\006 \001(\002\022L\n\020speech_word_info\030\007 \003(\01322.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Speech" - + "WordInfo\0224\n\021speech_end_offset\030\010 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\025\n\rlanguage_code\030" - + "\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UNS" - + "PECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SIN" - + "GLE_UTTERANCE\020\002\"\224\005\n\017QueryParameters\022\021\n\tt" - + "ime_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.g" - + "oogle.type.LatLng\022S\n\024session_entity_type" - + "s\030\003 \003(\01325.google.cloud.dialogflow.cx.v3b" - + "eta1.SessionEntityType\022(\n\007payload\030\004 \001(\0132" - + "\027.google.protobuf.Struct\022+\n\nparameters\030\005" - + " \001(\0132\027.google.protobuf.Struct\0229\n\014current" - + "_page\030\006 \001(\tB#\372A \n\036dialogflow.googleapis." - + "com/Page\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034ana" - + "lyze_query_text_sentiment\030\010 \001(\010\022`\n\017webho" - + "ok_headers\030\n \003(\0132G.google.cloud.dialogfl" - + "ow.cx.v3beta1.QueryParameters.WebhookHea" - + "dersEntry\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!d" - + "ialogflow.googleapis.com/Version\022\017\n\007chan" - + "nel\030\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.google." - + "protobuf.DurationB\004\342A\001\001\0325\n\023WebhookHeader" - + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\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\"\277\006\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.SentimentAnalysisResultB" - + "\007\n\005query\"\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\nA" - + "udioInput\022J\n\006config\030\001 \001(\01324.google.cloud" - + ".dialogflow.cx.v3beta1.InputAudioConfigB" - + "\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005ev" - + "ent\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.v3be" - + "ta1.Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030" - + "\002 \001(\0132\027.google.protobuf.Struct\022\026\n\016resolv" - + "ed_input\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623.goo" - + "gle.cloud.dialogflow.cx.v3beta1.Match.Ma" - + "tchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchTyp" - + "e\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_FILLIN" - + "G\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/S" - + "ession\022I\n\014query_params\030\002 \001(\01323.google.cl" - + "oud.dialogflow.cx.v3beta1.QueryParameter" - + "s\022I\n\013query_input\030\003 \001(\0132..google.cloud.di" - + "alogflow.cx.v3beta1.QueryInputB\004\342A\001\002\022!\n\031" - + "persist_parameter_changes\030\005 \001(\010\"\232\002\n\023Matc" - + "hIntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigg" - + "er_intent\030\002 \001(\tB%\372A\"\n dialogflow.googlea" - + "pis.com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027" - + "\n\rtrigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\013" - + "2).google.cloud.dialogflow.cx.v3beta1.Ma" - + "tch\022>\n\014current_page\030\005 \001(\0132(.google.cloud" - + ".dialogflow.cx.v3beta1.PageB\007\n\005query\"\372\001\n" - + "\024FulfillIntentRequest\022T\n\024match_intent_re" - + "quest\030\001 \001(\01326.google.cloud.dialogflow.cx" - + ".v3beta1.MatchIntentRequest\0228\n\005match\030\002 \001" - + "(\0132).google.cloud.dialogflow.cx.v3beta1." - + "Match\022R\n\023output_audio_config\030\003 \001(\01325.goo" - + "gle.cloud.dialogflow.cx.v3beta1.OutputAu" - + "dioConfig\"\335\001\n\025FulfillIntentResponse\022\023\n\013r" - + "esponse_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/" + + "ut\030\017 \001(\0132\031.google.protobuf.Duration\0226\n\023e" + + "ndpointing_timeout\030\023 \001(\0132\031.google.protob" + + "uf.Duration\022\025\n\ris_input_text\030\020 \001(\010\022@\n\035cl" + + "ient_half_close_time_offset\030\021 \001(\0132\031.goog" + + "le.protobuf.Duration\022J\n\'client_half_clos" + + "e_streaming_time_offset\030\022 \001(\0132\031.google.p" + + "rotobuf.Duration\"\301\002\n\035StreamingDetectInte" + + "ntResponse\022\\\n\022recognition_result\030\001 \001(\0132>" + + ".google.cloud.dialogflow.cx.v3beta1.Stre" + + "amingRecognitionResultH\000\022Z\n\026detect_inten" + + "t_response\030\002 \001(\01328.google.cloud.dialogfl" + + "ow.cx.v3beta1.DetectIntentResponseH\000\022Z\n\016" + + "debugging_info\030\004 \001(\0132B.google.cloud.dial" + + "ogflow.cx.v3beta1.CloudConversationDebug" + + "gingInfoB\n\n\010response\"\300\003\n\032StreamingRecogn" + + "itionResult\022`\n\014message_type\030\001 \001(\0162J.goog" + + "le.cloud.dialogflow.cx.v3beta1.Streaming" + + "RecognitionResult.MessageType\022\022\n\ntranscr" + + "ipt\030\002 \001(\t\022\020\n\010is_final\030\003 \001(\010\022\022\n\nconfidenc" + + "e\030\004 \001(\002\022\021\n\tstability\030\006 \001(\002\022L\n\020speech_wor" + + "d_info\030\007 \003(\01322.google.cloud.dialogflow.c" + + "x.v3beta1.SpeechWordInfo\0224\n\021speech_end_o" + + "ffset\030\010 \001(\0132\031.google.protobuf.Duration\022\025" + + "\n\rlanguage_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030" + + "MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT" + + "\020\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"\224\005\n\017Quer" + + "yParameters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_lo" + + "cation\030\002 \001(\0132\023.google.type.LatLng\022S\n\024ses" + + "sion_entity_types\030\003 \003(\01325.google.cloud.d" + + "ialogflow.cx.v3beta1.SessionEntityType\022(" + + "\n\007payload\030\004 \001(\0132\027.google.protobuf.Struct" + + "\022+\n\nparameters\030\005 \001(\0132\027.google.protobuf.S" + + "truct\0229\n\014current_page\030\006 \001(\tB#\372A \n\036dialog" + + "flow.googleapis.com/Page\022\027\n\017disable_webh" + + "ook\030\007 \001(\010\022$\n\034analyze_query_text_sentimen" + + "t\030\010 \001(\010\022`\n\017webhook_headers\030\n \003(\0132G.googl" + + "e.cloud.dialogflow.cx.v3beta1.QueryParam" + + "eters.WebhookHeadersEntry\022=\n\rflow_versio" + + "ns\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\032" + + "5\n\023WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"\365\002\n\nQueryInput\022=\n\004text\030\002 " + + "\001(\0132-.google.cloud.dialogflow.cx.v3beta1" + + ".TextInputH\000\022A\n\006intent\030\003 \001(\0132/.google.cl" + + "oud.dialogflow.cx.v3beta1.IntentInputH\000\022" + + "?\n\005audio\030\005 \001(\0132..google.cloud.dialogflow" + + ".cx.v3beta1.AudioInputH\000\022?\n\005event\030\006 \001(\0132" + + "..google.cloud.dialogflow.cx.v3beta1.Eve" + + "ntInputH\000\022=\n\004dtmf\030\007 \001(\0132-.google.cloud.d" + + "ialogflow.cx.v3beta1.DtmfInputH\000\022\033\n\rlang" + + "uage_code\030\004 \001(\tB\004\342A\001\002B\007\n\005input\"\277\006\n\013Query" + + "Result\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent" + + "\030\013 \001(\tB%\372A\"\n dialogflow.googleapis.com/I" + + "ntentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger" + + "_event\030\016 \001(\tH\000\022=\n\004dtmf\030\027 \001(\0132-.google.cl" + + "oud.dialogflow.cx.v3beta1.DtmfInputH\000\022\025\n" + + "\rlanguage_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\013" + + "2\027.google.protobuf.Struct\022N\n\021response_me" + + "ssages\030\004 \003(\01323.google.cloud.dialogflow.c" + + "x.v3beta1.ResponseMessage\022,\n\020webhook_sta" + + "tuses\030\r \003(\0132\022.google.rpc.Status\0221\n\020webho" + + "ok_payloads\030\006 \003(\0132\027.google.protobuf.Stru" + + "ct\022>\n\014current_page\030\007 \001(\0132(.google.cloud." + + "dialogflow.cx.v3beta1.Page\022>\n\006intent\030\010 \001" + + "(\0132*.google.cloud.dialogflow.cx.v3beta1." + + "IntentB\002\030\001\022\'\n\033intent_detection_confidenc" + + "e\030\t \001(\002B\002\030\001\0228\n\005match\030\017 \001(\0132).google.clou" + + "d.dialogflow.cx.v3beta1.Match\0220\n\017diagnos" + + "tic_info\030\n \001(\0132\027.google.protobuf.Struct\022" + + "^\n\031sentiment_analysis_result\030\021 \001(\0132;.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Sentimen" + + "tAnalysisResultB\007\n\005query\"\037\n\tTextInput\022\022\n" + + "\004text\030\001 \001(\tB\004\342A\001\002\"H\n\013IntentInput\0229\n\006inte" + + "nt\030\001 \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapis" + + ".com/Intent\"g\n\nAudioInput\022J\n\006config\030\001 \001(" + + "\01324.google.cloud.dialogflow.cx.v3beta1.I" + + "nputAudioConfigB\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\n" + + "EventInput\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.di" + + "alogflow.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.MatchType\022\022\n\nconfidence\030\005 " + + "\001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYPE_UNSPECIF" + + "IED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021" + + "PARAMETER_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\022MatchIntentReques" + + "t\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.dialogflow.cx.v3beta" + + "1.QueryParameters\022I\n\013query_input\030\003 \001(\0132." + ".google.cloud.dialogflow.cx.v3beta1.Quer" - + "yResult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023output_" - + "audio_config\030\004 \001(\01325.google.cloud.dialog" - + "flow.cx.v3beta1.OutputAudioConfig\";\n\027Sen" - + "timentAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tm" - + "agnitude\030\002 \001(\0022\212\n\n\010Sessions\022\272\002\n\014DetectIn" - + "tent\0227.google.cloud.dialogflow.cx.v3beta" - + "1.DetectIntentRequest\0328.google.cloud.dia" - + "logflow.cx.v3beta1.DetectIntentResponse\"" - + "\266\001\202\323\344\223\002\257\001\"J/v3beta1/{session=projects/*/" - + "locations/*/agents/*/sessions/*}:detectI" - + "ntent:\001*Z^\"Y/v3beta1/{session=projects/*" - + "/locations/*/agents/*/environments/*/ses" - + "sions/*}:detectIntent:\001*\022\242\001\n\025StreamingDe" - + "tectIntent\022@.google.cloud.dialogflow.cx." - + "v3beta1.StreamingDetectIntentRequest\032A.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Stream" - + "ingDetectIntentResponse\"\000(\0010\001\022\265\002\n\013MatchI" - + "ntent\0226.google.cloud.dialogflow.cx.v3bet" - + "a1.MatchIntentRequest\0327.google.cloud.dia" - + "logflow.cx.v3beta1.MatchIntentResponse\"\264" - + "\001\202\323\344\223\002\255\001\"I/v3beta1/{session=projects/*/l" - + "ocations/*/agents/*/sessions/*}:matchInt" - + "ent:\001*Z]\"X/v3beta1/{session=projects/*/l" - + "ocations/*/agents/*/environments/*/sessi" - + "ons/*}:matchIntent:\001*\022\351\002\n\rFulfillIntent\022" - + "8.google.cloud.dialogflow.cx.v3beta1.Ful" - + "fillIntentRequest\0329.google.cloud.dialogf" - + "low.cx.v3beta1.FulfillIntentResponse\"\342\001\202" - + "\323\344\223\002\333\001\"`/v3beta1/{match_intent_request.s" - + "ession=projects/*/locations/*/agents/*/s" - + "essions/*}:fulfillIntent:\001*Zt\"o/v3beta1/" - + "{match_intent_request.session=projects/*" - + "/locations/*/agents/*/environments/*/ses" - + "sions/*}:fulfillIntent:\001*\032x\312A\031dialogflow" - + ".googleapis.com\322AYhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.goo" - + "gleapis.com/auth/dialogflowB\236\003\n&com.goog" - + "le.cloud.dialogflow.cx.v3beta1B\014SessionP" - + "rotoP\001Z6cloud.google.com/go/dialogflow/c" - + "x/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google." - + "Cloud.Dialogflow.Cx.V3Beta1\352\002&Google::Cl" - + "oud::Dialogflow::CX::V3beta1\352A\324\001\n!dialog" - + "flow.googleapis.com/Session\022Iprojects/{p" - + "roject}/locations/{location}/agents/{age" - + "nt}/sessions/{session}\022dprojects/{projec" - + "t}/locations/{location}/agents/{agent}/e" - + "nvironments/{environment}/sessions/{sess" - + "ion}b\006proto3" + + "yInputB\004\342A\001\002\022!\n\031persist_parameter_change" + + "s\030\005 \001(\010\"\232\002\n\023MatchIntentResponse\022\016\n\004text\030" + + "\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(\tB%\372A\"\n di" + + "alogflow.googleapis.com/IntentH\000\022\024\n\ntran" + + "script\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006 \001(\tH\000\022" + + ":\n\007matches\030\004 \003(\0132).google.cloud.dialogfl" + + "ow.cx.v3beta1.Match\022>\n\014current_page\030\005 \001(" + + "\0132(.google.cloud.dialogflow.cx.v3beta1.P" + + "ageB\007\n\005query\"\372\001\n\024FulfillIntentRequest\022T\n" + + "\024match_intent_request\030\001 \001(\01326.google.clo" + + "ud.dialogflow.cx.v3beta1.MatchIntentRequ" + + "est\0228\n\005match\030\002 \001(\0132).google.cloud.dialog" + + "flow.cx.v3beta1.Match\022R\n\023output_audio_co" + + "nfig\030\003 \001(\01325.google.cloud.dialogflow.cx." + + "v3beta1.OutputAudioConfig\"\335\001\n\025FulfillInt" + + "entResponse\022\023\n\013response_id\030\001 \001(\t\022E\n\014quer" + + "y_result\030\002 \001(\0132/.google.cloud.dialogflow" + + ".cx.v3beta1.QueryResult\022\024\n\014output_audio\030" + + "\003 \001(\014\022R\n\023output_audio_config\030\004 \001(\01325.goo" + + "gle.cloud.dialogflow.cx.v3beta1.OutputAu" + + "dioConfig\";\n\027SentimentAnalysisResult\022\r\n\005" + + "score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\212\n\n\010Sessi" + + "ons\022\272\002\n\014DetectIntent\0227.google.cloud.dial" + + "ogflow.cx.v3beta1.DetectIntentRequest\0328." + + "google.cloud.dialogflow.cx.v3beta1.Detec" + + "tIntentResponse\"\266\001\202\323\344\223\002\257\001\"J/v3beta1/{ses" + + "sion=projects/*/locations/*/agents/*/ses" + + "sions/*}:detectIntent:\001*Z^\"Y/v3beta1/{se" + + "ssion=projects/*/locations/*/agents/*/en" + + "vironments/*/sessions/*}:detectIntent:\001*" + + "\022\242\001\n\025StreamingDetectIntent\022@.google.clou" + + "d.dialogflow.cx.v3beta1.StreamingDetectI" + + "ntentRequest\032A.google.cloud.dialogflow.c" + + "x.v3beta1.StreamingDetectIntentResponse\"" + + "\000(\0010\001\022\265\002\n\013MatchIntent\0226.google.cloud.dia" + + "logflow.cx.v3beta1.MatchIntentRequest\0327." + + "google.cloud.dialogflow.cx.v3beta1.Match" + + "IntentResponse\"\264\001\202\323\344\223\002\255\001\"I/v3beta1/{sess" + + "ion=projects/*/locations/*/agents/*/sess" + + "ions/*}:matchIntent:\001*Z]\"X/v3beta1/{sess" + + "ion=projects/*/locations/*/agents/*/envi" + + "ronments/*/sessions/*}:matchIntent:\001*\022\351\002" + + "\n\rFulfillIntent\0228.google.cloud.dialogflo" + + "w.cx.v3beta1.FulfillIntentRequest\0329.goog" + + "le.cloud.dialogflow.cx.v3beta1.FulfillIn" + + "tentResponse\"\342\001\202\323\344\223\002\333\001\"`/v3beta1/{match_" + + "intent_request.session=projects/*/locati" + + "ons/*/agents/*/sessions/*}:fulfillIntent" + + ":\001*Zt\"o/v3beta1/{match_intent_request.se" + + "ssion=projects/*/locations/*/agents/*/en" + + "vironments/*/sessions/*}:fulfillIntent:\001" + + "*\032x\312A\031dialogflow.googleapis.com\322AYhttps:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/dialogf" + + "lowB\236\003\n&com.google.cloud.dialogflow.cx.v" + + "3beta1B\014SessionProtoP\001Z6cloud.google.com" + + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" + + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" + + "ta1\352\002&Google::Cloud::Dialogflow::CX::V3b" + + "eta1\352A\324\001\n!dialogflow.googleapis.com/Sess" + + "ion\022Iprojects/{project}/locations/{locat" + + "ion}/agents/{agent}/sessions/{session}\022d" + + "projects/{project}/locations/{location}/" + + "agents/{agent}/environments/{environment" + + "}/sessions/{session}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -412,6 +413,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DtmfFinalResultsTimes", "SingleUtteranceEndTimeOffset", "NoSpeechTimeout", + "EndpointingTimeout", "IsInputText", "ClientHalfCloseTimeOffset", "ClientHalfCloseStreamingTimeOffset", diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java index 0d18f06c61d8..7f54224e586a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java @@ -54,6 +54,7 @@ private TransitionRoute(com.google.protobuf.GeneratedMessageV3.Builder builde private TransitionRoute() { name_ = ""; + description_ = ""; intent_ = ""; condition_ = ""; } @@ -179,6 +180,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int INTENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -554,6 +608,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } getUnknownFields().writeTo(output); } @@ -581,6 +638,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -598,6 +658,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) obj; if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (!getIntent().equals(other.getIntent())) return false; if (!getCondition().equals(other.getCondition())) return false; if (hasTriggerFulfillment() != other.hasTriggerFulfillment()) return false; @@ -628,6 +689,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + INTENT_FIELD_NUMBER; hash = (53 * hash) + getIntent().hashCode(); hash = (37 * hash) + CONDITION_FIELD_NUMBER; @@ -804,6 +867,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; + description_ = ""; intent_ = ""; condition_ = ""; triggerFulfillment_ = null; @@ -854,12 +918,15 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.TransitionRout result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.intent_ = intent_; + result.description_ = description_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.condition_ = condition_; + result.intent_ = intent_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.triggerFulfillment_ = triggerFulfillmentBuilder_ == null ? triggerFulfillment_ @@ -923,14 +990,19 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute bitField0_ |= 0x00000001; onChanged(); } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } if (!other.getIntent().isEmpty()) { intent_ = other.intent_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getCondition().isEmpty()) { condition_ = other.condition_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.hasTriggerFulfillment()) { @@ -985,20 +1057,20 @@ public Builder mergeFrom( case 10: { intent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 10 case 18: { condition_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 18 case 26: { input.readMessage( getTriggerFulfillmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 26 case 34: @@ -1021,6 +1093,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 50 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1160,6 +1238,117 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the transition route. The maximum length is
+     * 500 characters.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private java.lang.Object intent_ = ""; /** * @@ -1246,7 +1435,7 @@ public Builder setIntent(java.lang.String value) { throw new NullPointerException(); } intent_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1271,7 +1460,7 @@ public Builder setIntent(java.lang.String value) { */ public Builder clearIntent() { intent_ = getDefaultInstance().getIntent(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1301,7 +1490,7 @@ public Builder setIntentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); intent_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1392,7 +1581,7 @@ public Builder setCondition(java.lang.String value) { throw new NullPointerException(); } condition_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1417,7 +1606,7 @@ public Builder setCondition(java.lang.String value) { */ public Builder clearCondition() { condition_ = getDefaultInstance().getCondition(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1447,7 +1636,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); condition_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1472,7 +1661,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { * @return Whether the triggerFulfillment field is set. */ public boolean hasTriggerFulfillment() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1516,7 +1705,7 @@ public Builder setTriggerFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulf } else { triggerFulfillmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1538,7 +1727,7 @@ public Builder setTriggerFulfillment( } else { triggerFulfillmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1556,7 +1745,7 @@ public Builder setTriggerFulfillment( public Builder mergeTriggerFulfillment( com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) { if (triggerFulfillmentBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && triggerFulfillment_ != null && triggerFulfillment_ != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) { @@ -1567,7 +1756,7 @@ public Builder mergeTriggerFulfillment( } else { triggerFulfillmentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1583,7 +1772,7 @@ public Builder mergeTriggerFulfillment( * .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; */ public Builder clearTriggerFulfillment() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); triggerFulfillment_ = null; if (triggerFulfillmentBuilder_ != null) { triggerFulfillmentBuilder_.dispose(); @@ -1605,7 +1794,7 @@ public Builder clearTriggerFulfillment() { */ public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder getTriggerFulfillmentBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getTriggerFulfillmentFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java index ff3bd0a5064d..dedb92c943ef 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java @@ -22,7 +22,7 @@ * * *
- * An TransitionRouteGroup represents a group of
+ * A TransitionRouteGroup represents a group of
  * [`TransitionRoutes`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute] to
  * be used by a [Page][google.cloud.dialogflow.cx.v3beta1.Page].
  * 
@@ -78,7 +78,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -105,7 +108,10 @@ public java.lang.String getName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -445,7 +451,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An TransitionRouteGroup represents a group of
+   * A TransitionRouteGroup represents a group of
    * [`TransitionRoutes`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute] to
    * be used by a [Page][google.cloud.dialogflow.cx.v3beta1.Page].
    * 
@@ -712,7 +718,10 @@ public Builder mergeFrom( * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -738,7 +747,10 @@ public java.lang.String getName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -764,7 +776,10 @@ public com.google.protobuf.ByteString getNameBytes() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -789,7 +804,10 @@ public Builder setName(java.lang.String value) { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -810,7 +828,10 @@ public Builder clearName() { * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java index aa6666c87d94..819d7aced42c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java @@ -16,7 +16,9 @@ package com.google.cloud.dialogflow.cx.v3beta1; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -32,7 +34,12 @@ public class TransitionRouteGroupName implements ResourceName { private static final PathTemplate PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"); + private static final PathTemplate PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; private final String project; private final String location; private final String agent; @@ -54,6 +61,16 @@ private TransitionRouteGroupName(Builder builder) { agent = Preconditions.checkNotNull(builder.getAgent()); flow = Preconditions.checkNotNull(builder.getFlow()); transitionRouteGroup = Preconditions.checkNotNull(builder.getTransitionRouteGroup()); + pathTemplate = PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP; + } + + private TransitionRouteGroupName(ProjectLocationAgentTransitionRouteGroupBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + transitionRouteGroup = Preconditions.checkNotNull(builder.getTransitionRouteGroup()); + flow = null; + pathTemplate = PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP; } public String getProject() { @@ -80,6 +97,17 @@ public static Builder newBuilder() { return new Builder(); } + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationAgentFlowTransitionRouteGroupBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationAgentTransitionRouteGroupBuilder + newProjectLocationAgentTransitionRouteGroupBuilder() { + return new ProjectLocationAgentTransitionRouteGroupBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -95,6 +123,29 @@ public static TransitionRouteGroupName of( .build(); } + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TransitionRouteGroupName ofProjectLocationAgentFlowTransitionRouteGroupName( + String project, String location, String agent, String flow, String transitionRouteGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TransitionRouteGroupName ofProjectLocationAgentTransitionRouteGroupName( + String project, String location, String agent, String transitionRouteGroup) { + return newProjectLocationAgentTransitionRouteGroupBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTransitionRouteGroup(transitionRouteGroup) + .build(); + } + public static String format( String project, String location, String agent, String flow, String transitionRouteGroup) { return newBuilder() @@ -107,19 +158,55 @@ public static String format( .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationAgentFlowTransitionRouteGroupName( + String project, String location, String agent, String flow, String transitionRouteGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .setTransitionRouteGroup(transitionRouteGroup) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationAgentTransitionRouteGroupName( + String project, String location, String agent, String transitionRouteGroup) { + return newProjectLocationAgentTransitionRouteGroupBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTransitionRouteGroup(transitionRouteGroup) + .build() + .toString(); + } + public static TransitionRouteGroupName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.validatedMatch( - formattedString, "TransitionRouteGroupName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("agent"), - matchMap.get("flow"), - matchMap.get("transition_route_group")); + if (PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.match(formattedString); + return ofProjectLocationAgentFlowTransitionRouteGroupName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("flow"), + matchMap.get("transition_route_group")); + } else if (PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.match(formattedString); + return ofProjectLocationAgentTransitionRouteGroupName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("transition_route_group")); + } + throw new ValidationException( + "TransitionRouteGroupName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -143,7 +230,8 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString); + return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.matches(formattedString) + || PROJECT_LOCATION_AGENT_TRANSITION_ROUTE_GROUP.matches(formattedString); } @Override @@ -180,17 +268,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP.instantiate( - "project", - project, - "location", - location, - "agent", - agent, - "flow", - flow, - "transition_route_group", - transitionRouteGroup); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } @Override @@ -213,6 +291,8 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; h ^= Objects.hashCode(project); h *= 1000003; h ^= Objects.hashCode(location); @@ -284,6 +364,11 @@ public Builder setTransitionRouteGroup(String transitionRouteGroup) { } private Builder(TransitionRouteGroupName transitionRouteGroupName) { + Preconditions.checkArgument( + Objects.equals( + transitionRouteGroupName.pathTemplate, + PROJECT_LOCATION_AGENT_FLOW_TRANSITION_ROUTE_GROUP), + "toBuilder is only supported when TransitionRouteGroupName has the pattern of projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"); this.project = transitionRouteGroupName.project; this.location = transitionRouteGroupName.location; this.agent = transitionRouteGroupName.agent; @@ -295,4 +380,59 @@ public TransitionRouteGroupName build() { return new TransitionRouteGroupName(this); } } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationAgentTransitionRouteGroupBuilder { + private String project; + private String location; + private String agent; + private String transitionRouteGroup; + + protected ProjectLocationAgentTransitionRouteGroupBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTransitionRouteGroup() { + return transitionRouteGroup; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setAgent(String agent) { + this.agent = agent; + return this; + } + + public ProjectLocationAgentTransitionRouteGroupBuilder setTransitionRouteGroup( + String transitionRouteGroup) { + this.transitionRouteGroup = transitionRouteGroup; + return this; + } + + public TransitionRouteGroupName build() { + return new TransitionRouteGroupName(this); + } + } } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java index 215844343e65..5a49eb866dd5 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java @@ -31,7 +31,10 @@ public interface TransitionRouteGroupOrBuilder * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; @@ -47,7 +50,10 @@ public interface TransitionRouteGroupOrBuilder * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] * populates the name automatically. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow - * ID>/transitionRouteGroups/<Transition Route Group ID>`. + * ID>/transitionRouteGroups/<Transition Route Group ID>` or + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level + * groups. * * * string name = 1; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupProto.java index 5dd20b4b80a8..37268d90c6a7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupProto.java @@ -72,84 +72,99 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "i/resource.proto\032-google/cloud/dialogflo" + "w/cx/v3beta1/page.proto\032\033google/protobuf" + "/empty.proto\032 google/protobuf/field_mask" - + ".proto\"\273\002\n\024TransitionRouteGroup\022\014\n\004name\030" + + ".proto\"\317\003\n\024TransitionRouteGroup\022\014\n\004name\030" + "\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022N\n\021tra" + "nsition_routes\030\005 \003(\01323.google.cloud.dial" - + "ogflow.cx.v3beta1.TransitionRoute:\250\001\352A\244\001" + + "ogflow.cx.v3beta1.TransitionRoute:\274\002\352A\270\002" + "\n.dialogflow.googleapis.com/TransitionRo" + "uteGroup\022rprojects/{project}/locations/{" + "location}/agents/{agent}/flows/{flow}/tr" + "ansitionRouteGroups/{transition_route_gr" - + "oup}\"\251\001\n ListTransitionRouteGroupsReques" - + "t\022G\n\006parent\030\001 \001(\tB7\342A\001\002\372A0\022.dialogflow.g" - + "oogleapis.com/TransitionRouteGroup\022\021\n\tpa" - + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\025\n\rlan" - + "guage_code\030\004 \001(\t\"\227\001\n!ListTransitionRoute" - + "GroupsResponse\022Y\n\027transition_route_group" - + "s\030\001 \003(\01328.google.cloud.dialogflow.cx.v3b" - + "eta1.TransitionRouteGroup\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"~\n\036GetTransitionRouteGroupReq" - + "uest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow." - + "googleapis.com/TransitionRouteGroup\022\025\n\rl" - + "anguage_code\030\002 \001(\t\"\343\001\n!CreateTransitionR" - + "outeGroupRequest\022G\n\006parent\030\001 \001(\tB7\342A\001\002\372A" - + "0\022.dialogflow.googleapis.com/TransitionR" - + "outeGroup\022^\n\026transition_route_group\030\002 \001(" - + "\01328.google.cloud.dialogflow.cx.v3beta1.T" - + "ransitionRouteGroupB\004\342A\001\002\022\025\n\rlanguage_co" - + "de\030\003 \001(\t\"\313\001\n!UpdateTransitionRouteGroupR" - + "equest\022^\n\026transition_route_group\030\001 \001(\01328" - + ".google.cloud.dialogflow.cx.v3beta1.Tran" - + "sitionRouteGroupB\004\342A\001\002\022/\n\013update_mask\030\002 " - + "\001(\0132\032.google.protobuf.FieldMask\022\025\n\rlangu" - + "age_code\030\003 \001(\t\"y\n!DeleteTransitionRouteG" - + "roupRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dial" - + "ogflow.googleapis.com/TransitionRouteGro" - + "up\022\r\n\005force\030\002 \001(\0102\367\013\n\025TransitionRouteGro" - + "ups\022\212\002\n\031ListTransitionRouteGroups\022D.goog" - + "le.cloud.dialogflow.cx.v3beta1.ListTrans" - + "itionRouteGroupsRequest\032E.google.cloud.d" - + "ialogflow.cx.v3beta1.ListTransitionRoute" - + "GroupsResponse\"`\332A\006parent\202\323\344\223\002Q\022O/v3beta" - + "1/{parent=projects/*/locations/*/agents/" - + "*/flows/*}/transitionRouteGroups\022\367\001\n\027Get" - + "TransitionRouteGroup\022B.google.cloud.dial" - + "ogflow.cx.v3beta1.GetTransitionRouteGrou" - + "pRequest\0328.google.cloud.dialogflow.cx.v3" - + "beta1.TransitionRouteGroup\"^\332A\004name\202\323\344\223\002" - + "Q\022O/v3beta1/{name=projects/*/locations/*" - + "/agents/*/flows/*/transitionRouteGroups/" - + "*}\022\257\002\n\032CreateTransitionRouteGroup\022E.goog" - + "le.cloud.dialogflow.cx.v3beta1.CreateTra" - + "nsitionRouteGroupRequest\0328.google.cloud." - + "dialogflow.cx.v3beta1.TransitionRouteGro" - + "up\"\217\001\332A\035parent,transition_route_group\202\323\344" - + "\223\002i\"O/v3beta1/{parent=projects/*/locatio" - + "ns/*/agents/*/flows/*}/transitionRouteGr" - + "oups:\026transition_route_group\022\314\002\n\032UpdateT" - + "ransitionRouteGroup\022E.google.cloud.dialo" - + "gflow.cx.v3beta1.UpdateTransitionRouteGr" - + "oupRequest\0328.google.cloud.dialogflow.cx." - + "v3beta1.TransitionRouteGroup\"\254\001\332A\"transi" - + "tion_route_group,update_mask\202\323\344\223\002\200\0012f/v3" - + "beta1/{transition_route_group.name=proje" - + "cts/*/locations/*/agents/*/flows/*/trans" - + "itionRouteGroups/*}:\026transition_route_gr" - + "oup\022\333\001\n\032DeleteTransitionRouteGroup\022E.goo" - + "gle.cloud.dialogflow.cx.v3beta1.DeleteTr" - + "ansitionRouteGroupRequest\032\026.google.proto" - + "buf.Empty\"^\332A\004name\202\323\344\223\002Q*O/v3beta1/{name" - + "=projects/*/locations/*/agents/*/flows/*" - + "/transitionRouteGroups/*}\032x\312A\031dialogflow" - + ".googleapis.com\322AYhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.goo" - + "gleapis.com/auth/dialogflowB\323\001\n&com.goog" - + "le.cloud.dialogflow.cx.v3beta1B\031Transiti" - + "onRouteGroupProtoP\001Z6cloud.google.com/go" - + "/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002" - + "\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1" - + "\352\002&Google::Cloud::Dialogflow::CX::V3beta" - + "1b\006proto3" + + "oup}\022eprojects/{project}/locations/{loca" + + "tion}/agents/{agent}/transitionRouteGrou" + + "ps/{transition_route_group}*\025transitionR" + + "outeGroups2\024transitionRouteGroup\"\251\001\n Lis" + + "tTransitionRouteGroupsRequest\022G\n\006parent\030" + + "\001 \001(\tB7\342A\001\002\372A0\022.dialogflow.googleapis.co" + + "m/TransitionRouteGroup\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\022\025\n\rlanguage_code\030\004" + + " \001(\t\"\227\001\n!ListTransitionRouteGroupsRespon" + + "se\022Y\n\027transition_route_groups\030\001 \003(\01328.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Transit" + + "ionRouteGroup\022\027\n\017next_page_token\030\002 \001(\t\"~" + + "\n\036GetTransitionRouteGroupRequest\022E\n\004name" + + "\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow.googleapis.c" + + "om/TransitionRouteGroup\022\025\n\rlanguage_code" + + "\030\002 \001(\t\"\343\001\n!CreateTransitionRouteGroupReq" + + "uest\022G\n\006parent\030\001 \001(\tB7\342A\001\002\372A0\022.dialogflo" + + "w.googleapis.com/TransitionRouteGroup\022^\n" + + "\026transition_route_group\030\002 \001(\01328.google.c" + + "loud.dialogflow.cx.v3beta1.TransitionRou" + + "teGroupB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\313\001\n" + + "!UpdateTransitionRouteGroupRequest\022^\n\026tr" + + "ansition_route_group\030\001 \001(\01328.google.clou" + + "d.dialogflow.cx.v3beta1.TransitionRouteG" + + "roupB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMask\022\025\n\rlanguage_code\030\003 \001" + + "(\t\"y\n!DeleteTransitionRouteGroupRequest\022" + + "E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow.googl" + + "eapis.com/TransitionRouteGroup\022\r\n\005force\030" + + "\002 \001(\0102\274\017\n\025TransitionRouteGroups\022\327\002\n\031List" + + "TransitionRouteGroups\022D.google.cloud.dia" + + "logflow.cx.v3beta1.ListTransitionRouteGr" + + "oupsRequest\032E.google.cloud.dialogflow.cx" + + ".v3beta1.ListTransitionRouteGroupsRespon" + + "se\"\254\001\332A\006parent\202\323\344\223\002\234\001\022O/v3beta1/{parent=" + + "projects/*/locations/*/agents/*/flows/*}" + + "/transitionRouteGroupsZI\022G/v3beta1/{pare" + + "nt=projects/*/locations/*/agents/*}/tran" + + "sitionRouteGroups\022\304\002\n\027GetTransitionRoute" + + "Group\022B.google.cloud.dialogflow.cx.v3bet" + + "a1.GetTransitionRouteGroupRequest\0328.goog" + + "le.cloud.dialogflow.cx.v3beta1.Transitio" + + "nRouteGroup\"\252\001\332A\004name\202\323\344\223\002\234\001\022O/v3beta1/{" + + "name=projects/*/locations/*/agents/*/flo" + + "ws/*/transitionRouteGroups/*}ZI\022G/v3beta" + + "1/{name=projects/*/locations/*/agents/*/" + + "transitionRouteGroups/*}\022\223\003\n\032CreateTrans" + + "itionRouteGroup\022E.google.cloud.dialogflo" + + "w.cx.v3beta1.CreateTransitionRouteGroupR" + + "equest\0328.google.cloud.dialogflow.cx.v3be" + + "ta1.TransitionRouteGroup\"\363\001\332A\035parent,tra" + + "nsition_route_group\202\323\344\223\002\314\001\"O/v3beta1/{pa" + + "rent=projects/*/locations/*/agents/*/flo" + + "ws/*}/transitionRouteGroups:\026transition_" + + "route_groupZa\"G/v3beta1/{parent=projects" + + "/*/locations/*/agents/*}/transitionRoute" + + "Groups:\026transition_route_group\022\306\003\n\032Updat" + + "eTransitionRouteGroup\022E.google.cloud.dia" + + "logflow.cx.v3beta1.UpdateTransitionRoute" + + "GroupRequest\0328.google.cloud.dialogflow.c" + + "x.v3beta1.TransitionRouteGroup\"\246\002\332A\"tran" + + "sition_route_group,update_mask\202\323\344\223\002\372\0012f/" + + "v3beta1/{transition_route_group.name=pro" + + "jects/*/locations/*/agents/*/flows/*/tra" + + "nsitionRouteGroups/*}:\026transition_route_" + + "groupZx2^/v3beta1/{transition_route_grou" + + "p.name=projects/*/locations/*/agents/*/t" + + "ransitionRouteGroups/*}:\026transition_rout" + + "e_group\022\250\002\n\032DeleteTransitionRouteGroup\022E" + + ".google.cloud.dialogflow.cx.v3beta1.Dele" + + "teTransitionRouteGroupRequest\032\026.google.p" + + "rotobuf.Empty\"\252\001\332A\004name\202\323\344\223\002\234\001*O/v3beta1" + + "/{name=projects/*/locations/*/agents/*/f" + + "lows/*/transitionRouteGroups/*}ZI*G/v3be" + + "ta1/{name=projects/*/locations/*/agents/" + + "*/transitionRouteGroups/*}\032x\312A\031dialogflo" + + "w.googleapis.com\322AYhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/dialogflowB\323\001\n&com.goo" + + "gle.cloud.dialogflow.cx.v3beta1B\031Transit" + + "ionRouteGroupProtoP\001Z6cloud.google.com/g" + + "o/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242" + + "\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta" + + "1\352\002&Google::Cloud::Dialogflow::CX::V3bet" + + "a1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteOrBuilder.java index f442a7ff9727..e8ed358a3c18 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteOrBuilder.java @@ -48,6 +48,33 @@ public interface TransitionRouteOrBuilder */ com.google.protobuf.ByteString getNameBytes(); + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the transition route. The maximum length is
+   * 500 characters.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateGenerativeSettingsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateGenerativeSettingsRequest.java new file mode 100644 index 000000000000..78e93f8b38af --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateGenerativeSettingsRequest.java @@ -0,0 +1,1042 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Request for
+ * [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettings]
+ * RPC.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} + */ +public final class UpdateGenerativeSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + UpdateGenerativeSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateGenerativeSettingsRequest.newBuilder() to construct. + private UpdateGenerativeSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateGenerativeSettingsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateGenerativeSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_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_UpdateGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.Builder.class); + } + + public static final int GENERATIVE_SETTINGS_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generativeSettings_; + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + @java.lang.Override + public boolean hasGenerativeSettings() { + return generativeSettings_ != null; + } + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getGenerativeSettings() { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder + getGenerativeSettingsOrBuilder() { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 (generativeSettings_ != null) { + output.writeMessage(1, getGenerativeSettings()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (generativeSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenerativeSettings()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.UpdateGenerativeSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) obj; + + if (hasGenerativeSettings() != other.hasGenerativeSettings()) return false; + if (hasGenerativeSettings()) { + if (!getGenerativeSettings().equals(other.getGenerativeSettings())) 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(); + if (hasGenerativeSettings()) { + hash = (37 * hash) + GENERATIVE_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGenerativeSettings().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.UpdateGenerativeSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest + 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.UpdateGenerativeSettingsRequest + 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest 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; + } + /** + * + * + *
+   * Request for
+   * [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettings]
+   * RPC.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_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_UpdateGenerativeSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + generativeSettings_ = null; + if (generativeSettingsBuilder_ != null) { + generativeSettingsBuilder_.dispose(); + generativeSettingsBuilder_ = 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.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateGenerativeSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.generativeSettings_ = + generativeSettingsBuilder_ == null + ? generativeSettings_ + : generativeSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 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.UpdateGenerativeSettingsRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + .getDefaultInstance()) return this; + if (other.hasGenerativeSettings()) { + mergeGenerativeSettings(other.getGenerativeSettings()); + } + 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: + { + input.readMessage( + getGenerativeSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.cloud.dialogflow.cx.v3beta1.GenerativeSettings generativeSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder> + generativeSettingsBuilder_; + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + public boolean hasGenerativeSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getGenerativeSettings() { + if (generativeSettingsBuilder_ == null) { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } else { + return generativeSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings value) { + if (generativeSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generativeSettings_ = value; + } else { + generativeSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder builderForValue) { + if (generativeSettingsBuilder_ == null) { + generativeSettings_ = builderForValue.build(); + } else { + generativeSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGenerativeSettings( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings value) { + if (generativeSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && generativeSettings_ != null + && generativeSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance()) { + getGenerativeSettingsBuilder().mergeFrom(value); + } else { + generativeSettings_ = value; + } + } else { + generativeSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGenerativeSettings() { + bitField0_ = (bitField0_ & ~0x00000001); + generativeSettings_ = null; + if (generativeSettingsBuilder_ != null) { + generativeSettingsBuilder_.dispose(); + generativeSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder + getGenerativeSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenerativeSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder + getGenerativeSettingsOrBuilder() { + if (generativeSettingsBuilder_ != null) { + return generativeSettingsBuilder_.getMessageOrBuilder(); + } else { + return generativeSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance() + : generativeSettings_; + } + } + /** + * + * + *
+     * Required. Generative settings to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder> + getGenerativeSettingsFieldBuilder() { + if (generativeSettingsBuilder_ == null) { + generativeSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder>( + getGenerativeSettings(), getParentForChildren(), isClean()); + generativeSettings_ = null; + } + return generativeSettingsBuilder_; + } + + 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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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.UpdateGenerativeSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGenerativeSettingsRequest 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.UpdateGenerativeSettingsRequest + 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/UpdateGenerativeSettingsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateGenerativeSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..cf75558e2b0e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateGenerativeSettingsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UpdateGenerativeSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the generativeSettings field is set. + */ + boolean hasGenerativeSettings(); + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The generativeSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getGenerativeSettings(); + /** + * + * + *
+   * Required. Generative settings to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder + getGenerativeSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java index b3022b335ca2..652ef26f144f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java @@ -216,6 +216,16 @@ public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { * TRANSITION_ROUTE_GROUP = 7; */ TRANSITION_ROUTE_GROUP(7), + /** + * + * + *
+     * Agent transition route group.
+     * 
+ * + * AGENT_TRANSITION_ROUTE_GROUP = 14; + */ + AGENT_TRANSITION_ROUTE_GROUP(14), UNRECOGNIZED(-1), ; @@ -359,6 +369,16 @@ public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { * TRANSITION_ROUTE_GROUP = 7; */ public static final int TRANSITION_ROUTE_GROUP_VALUE = 7; + /** + * + * + *
+     * Agent transition route group.
+     * 
+ * + * AGENT_TRANSITION_ROUTE_GROUP = 14; + */ + public static final int AGENT_TRANSITION_ROUTE_GROUP_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -412,6 +432,8 @@ public static ResourceType forNumber(int value) { return PAGES; case 7: return TRANSITION_ROUTE_GROUP; + case 14: + return AGENT_TRANSITION_ROUTE_GROUP; default: return null; } @@ -703,7 +725,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType get * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -720,7 +742,7 @@ public com.google.protobuf.ProtocolStringList getResourcesList() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -737,7 +759,7 @@ public int getResourcesCount() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -755,7 +777,7 @@ public java.lang.String getResources(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ @@ -1551,7 +1573,7 @@ private void ensureResourcesIsMutable() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -1569,7 +1591,7 @@ public com.google.protobuf.ProtocolStringList getResourcesList() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -1586,7 +1608,7 @@ public int getResourcesCount() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -1604,7 +1626,7 @@ public java.lang.String getResources(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ @@ -1622,7 +1644,7 @@ public com.google.protobuf.ByteString getResourcesBytes(int index) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index to set the value at. * @param value The resources to set. * @return This builder for chaining. @@ -1648,7 +1670,7 @@ public Builder setResources(int index, java.lang.String value) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param value The resources to add. * @return This builder for chaining. */ @@ -1673,7 +1695,7 @@ public Builder addResources(java.lang.String value) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param values The resources to add. * @return This builder for chaining. */ @@ -1695,7 +1717,7 @@ public Builder addAllResources(java.lang.Iterable values) { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1716,7 +1738,7 @@ public Builder clearResources() { * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param value The bytes of the resources to add. * @return This builder for chaining. */ diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java index 2fc5259b782e..86801f8d0479 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java @@ -60,7 +60,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return A list containing the resources. */ @java.lang.Deprecated @@ -75,7 +75,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @return The count of resources. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the element to return. * @return The resources at the given index. */ @@ -106,7 +106,7 @@ public interface ValidationMessageOrBuilder * repeated string resources = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=93 + * google/cloud/dialogflow/cx/v3beta1/validation_message.proto;l=96 * @param index The index of the value to return. * @return The bytes of the resources at the given index. */ diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java index 167e0b7a3139..c68607712e27 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java @@ -46,7 +46,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n;google/cloud/dialogflow/cx/v3beta1/val" + "idation_message.proto\022\"google.cloud.dial" - + "ogflow.cx.v3beta1\"\207\005\n\021ValidationMessage\022" + + "ogflow.cx.v3beta1\"\251\005\n\021ValidationMessage\022" + "Y\n\rresource_type\030\001 \001(\0162B.google.cloud.di" + "alogflow.cx.v3beta1.ValidationMessage.Re" + "sourceType\022\025\n\tresources\030\002 \003(\tB\002\030\001\022H\n\016res" @@ -54,22 +54,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "low.cx.v3beta1.ResourceName\022P\n\010severity\030" + "\003 \001(\0162>.google.cloud.dialogflow.cx.v3bet" + "a1.ValidationMessage.Severity\022\016\n\006detail\030" - + "\004 \001(\t\"\213\002\n\014ResourceType\022\035\n\031RESOURCE_TYPE_" + + "\004 \001(\t\"\255\002\n\014ResourceType\022\035\n\031RESOURCE_TYPE_" + "UNSPECIFIED\020\000\022\t\n\005AGENT\020\001\022\n\n\006INTENT\020\002\022\032\n\026" + "INTENT_TRAINING_PHRASE\020\010\022\024\n\020INTENT_PARAM" + "ETER\020\t\022\013\n\007INTENTS\020\n\022\033\n\027INTENT_TRAINING_P" + "HRASES\020\013\022\017\n\013ENTITY_TYPE\020\003\022\020\n\014ENTITY_TYPE" + "S\020\014\022\013\n\007WEBHOOK\020\004\022\010\n\004FLOW\020\005\022\010\n\004PAGE\020\006\022\t\n\005" - + "PAGES\020\r\022\032\n\026TRANSITION_ROUTE_GROUP\020\007\"F\n\010S" - + "everity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\010\n\004INF" - + "O\020\001\022\013\n\007WARNING\020\002\022\t\n\005ERROR\020\003\"2\n\014ResourceN" - + "ame\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\tB" - + "\320\001\n&com.google.cloud.dialogflow.cx.v3bet" - + "a1B\026ValidationMessageProtoP\001Z6cloud.goog" - + "le.com/go/dialogflow/cx/apiv3beta1/cxpb;" - + "cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.C" - + "x.V3Beta1\352\002&Google::Cloud::Dialogflow::C" - + "X::V3beta1b\006proto3" + + "PAGES\020\r\022\032\n\026TRANSITION_ROUTE_GROUP\020\007\022 \n\034A" + + "GENT_TRANSITION_ROUTE_GROUP\020\016\"F\n\010Severit" + + "y\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\010\n\004INFO\020\001\022\013\n" + + "\007WARNING\020\002\022\t\n\005ERROR\020\003\"2\n\014ResourceName\022\014\n" + + "\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\tB\320\001\n&co" + + "m.google.cloud.dialogflow.cx.v3beta1B\026Va" + + "lidationMessageProtoP\001Z6cloud.google.com" + + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" + + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" + + "ta1\352\002&Google::Cloud::Dialogflow::CX::V3b" + + "eta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java index 8c73ff7b2d02..cb2c6b1f75a6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java @@ -387,8 +387,8 @@ java.lang.String getRequestHeadersOrDefault( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -402,8 +402,8 @@ java.lang.String getRequestHeadersOrDefault( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -420,8 +420,8 @@ java.lang.String getRequestHeadersOrDefault( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -435,8 +435,8 @@ java.lang.String getRequestHeadersOrDefault( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -454,8 +454,8 @@ java.lang.String getParameterMappingOrDefault( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -1489,8 +1489,8 @@ public int getParameterMappingCount() { *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -1516,8 +1516,8 @@ public java.util.Map getParameterMapping() { *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -1534,8 +1534,8 @@ public java.util.Map getParameterMappingMap( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -1560,8 +1560,8 @@ public java.util.Map getParameterMappingMap( *
      * Optional. Maps the values extracted from specific fields of the flexible
      * webhook response into session parameters.
-     *  - Key: session parameter name
-     *  - Value: field path in the webhook response
+     * - Key: session parameter name
+     * - Value: field path in the webhook response
      * 
* * @@ -3315,8 +3315,8 @@ public int getParameterMappingCount() { *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3342,8 +3342,8 @@ public java.util.Map getParameterMapping() { *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3360,8 +3360,8 @@ public java.util.Map getParameterMappingMap( *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3386,8 +3386,8 @@ public java.util.Map getParameterMappingMap( *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3418,8 +3418,8 @@ public Builder clearParameterMapping() { *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3445,8 +3445,8 @@ public java.util.Map getMutableParameterMapp *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * @@ -3470,8 +3470,8 @@ public Builder putParameterMapping(java.lang.String key, java.lang.String value) *
        * Optional. Maps the values extracted from specific fields of the flexible
        * webhook response into session parameters.
-       *  - Key: session parameter name
-       *  - Value: field path in the webhook response
+       * - Key: session parameter name
+       * - Value: field path in the webhook response
        * 
* * 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 c9208341a93f..63a356089538 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 @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto"; import "google/cloud/dialogflow/cx/v3beta1/flow.proto"; +import "google/cloud/dialogflow/cx/v3beta1/generative_settings.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -162,6 +163,25 @@ service Agents { }; option (google.api.method_signature) = "name"; } + + // Gets the generative settings for the agent. + rpc GetGenerativeSettings(GetGenerativeSettingsRequest) + returns (GenerativeSettings) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/generativeSettings}" + }; + option (google.api.method_signature) = "name,language_code"; + } + + // Updates the generative settings for the agent. + rpc UpdateGenerativeSettings(UpdateGenerativeSettingsRequest) + returns (GenerativeSettings) { + option (google.api.http) = { + patch: "/v3beta1/{generative_settings.name=projects/*/locations/*/agents/*/generativeSettings}" + body: "generative_settings" + }; + option (google.api.method_signature) = "generative_settings,update_mask"; + } } // Settings related to speech recognition. @@ -180,8 +200,9 @@ message SpeechToTextSettings { // Types][google.cloud.dialogflow.cx.v3beta1.EntityType], // [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], // [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], -// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage -// the conversation flows.. +// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], +// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] +// and so on to manage the conversation flows. message Agent { option (google.api.resource) = { type: "dialogflow.googleapis.com/Agent" @@ -216,6 +237,14 @@ message Agent { } } + // Settings for Gen App Builder. + message GenAppBuilderSettings { + // Required. The full name of the Gen App Builder engine related to this + // agent if there is one. Format: `projects/{Project ID}/locations/{Location + // ID}/collections/{Collection ID}/engines/{Engine ID}` + string engine = 1 [(google.api.field_behavior) = REQUIRED]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] @@ -303,6 +332,9 @@ message Agent { // Settings on instructing the speech synthesizer on how to generate the // output audio content. TextToSpeechSettings text_to_speech_settings = 31; + + // Gen App Builder-related agent-level settings. + optional GenAppBuilderSettings gen_app_builder_settings = 33; } // The request message for @@ -585,3 +617,34 @@ message AgentValidationResult { // Contains all flow validation results. repeated FlowValidationResult flow_validation_results = 2; } + +// Request for +// [GetGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettings] +// RPC. +message GetGenerativeSettingsRequest { + // Required. Format: `projects//locations//agents//generativeSettings`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AgentGenerativeSettings" + } + ]; + + // Required. Language code of the generative settings. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for +// [UpdateGenerativeSettings][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettings] +// RPC. +message UpdateGenerativeSettingsRequest { + // Required. Generative settings to update. + GenerativeSettings generative_settings = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto new file mode 100644 index 000000000000..59572e39dd56 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto @@ -0,0 +1,55 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "DataStoreConnectionProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// A data store connection. It represents a data store in Discovery Engine and +// the type of the contents it contains. +message DataStoreConnection { + // The type of the connected data store. + DataStoreType data_store_type = 1; + + // The full name of the referenced data store. + // Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + string data_store = 2; +} + +// Type of a data store. +// Determines how search is performed in the data store. +enum DataStoreType { + // Not specified. This value indicates that the data store type is not + // specified, so it will not be used during search. + DATA_STORE_TYPE_UNSPECIFIED = 0; + + // A data store that contains public web content. + PUBLIC_WEB = 1; + + // A data store that contains unstructured private data. + UNSTRUCTURED = 2; + + // A data store that contains structured data (for example FAQ). + STRUCTURED = 3; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto index f85168113d39..861e02bcba3f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/import_strategy.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto"; import "google/longrunning/operations.proto"; @@ -308,7 +309,10 @@ message Flow { // defined in the page have higher priority than those defined in the flow. // // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/` for agent-level + // groups. repeated string transition_route_groups = 15 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" @@ -316,6 +320,10 @@ message Flow { // NLU related settings of the flow. NluSettings nlu_settings = 11; + + // Optional. Knowledge connector configuration. + KnowledgeConnectorSettings knowledge_connector_settings = 18 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for @@ -582,6 +590,24 @@ message ImportFlowRequest { // Flow import mode. If not specified, `KEEP` is assumed. ImportOption import_option = 4; + + // Optional. Specifies the import strategy used when resolving resource + // conflicts. + FlowImportStrategy flow_import_strategy = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The flow import strategy used for resource conflict resolution associated +// with an +// [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest]. +message FlowImportStrategy { + // Optional. Global flow import strategy for resource conflict resolution. The + // import Import strategy for resource conflict resolution, applied globally + // throughout the flow. It will be applied for all + // display name conflicts in the imported content. If not specified, + // 'CREATE_NEW' is assumed. + ImportStrategy global_import_strategy = 1 + [(google.api.field_behavior) = OPTIONAL]; } // The response message for diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto new file mode 100644 index 000000000000..680223a455f3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto @@ -0,0 +1,102 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/safety_settings.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "GenerativeSettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Settings for Generative AI. +message GenerativeSettings { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/AgentGenerativeSettings" + pattern: "projects/{project}/locations/{location}/agents/{agent}/generativeSettings" + }; + + // Settings for Generative Fallback. + message FallbackSettings { + // Prompt template. + message PromptTemplate { + // Prompt name. + string display_name = 1; + + // Prompt text that is sent to a LLM on no-match default, placeholders are + // filled downstream. For example: "Here is a conversation $conversation, + // a response is: " + string prompt_text = 2; + + // If the flag is true, the prompt is frozen and cannot be modified by + // users. + bool frozen = 3; + } + + // Display name of the selected prompt. + string selected_prompt = 3; + + // Stored prompts that can be selected, for example default templates like + // "conservative" or "chatty", or user defined ones. + repeated PromptTemplate prompt_templates = 4; + } + + // Settings for knowledge connector. These parameters are used for LLM prompt + // like "You are . You are a helpful and verbose at + // , . Your task is to help humans on + // ". + message KnowledgeConnectorSettings { + // Name of the company, organization or other entity that the agent + // represents. Used for knowledge connector LLM prompt and for knowledge + // search. + string business = 1; + + // Name of the virtual agent. Used for LLM prompt. Can be left empty. + string agent = 2; + + // Identity of the agent, e.g. "virtual agent", "AI assistant". + string agent_identity = 3; + + // Company description, used for LLM prompt, e.g. "a family company selling + // freshly roasted coffee beans". + string business_description = 4; + + // Agent scope, e.g. "Example company website", "internal Example + // company website for employees", "manual of car owner". + string agent_scope = 5; + } + + // Format: `projects//locations//agents//generativeSettings`. + string name = 5; + + // Settings for Generative Fallback. + FallbackSettings fallback_settings = 1; + + // Settings for Generative Safety. + SafetySettings generative_safety_settings = 3; + + // Settings for knowledge connector. + KnowledgeConnectorSettings knowledge_connector_settings = 7; + + // Language for this settings. + string language_code = 4; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto new file mode 100644 index 000000000000..3b3f3baee559 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto @@ -0,0 +1,51 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ImportStrategyProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Import strategies for the conflict resolution of resources (i.e. intents, +// entities, and webhooks) with identical display names during import +// operations. +enum ImportStrategy { + // Unspecified. Treated as 'CREATE_NEW'. + IMPORT_STRATEGY_UNSPECIFIED = 0; + + // Create a new resource with a numeric suffix appended to the end of the + // existing display name. + IMPORT_STRATEGY_CREATE_NEW = 1; + + // Replace existing resource with incoming resource in the content to be + // imported. + IMPORT_STRATEGY_REPLACE = 2; + + // Keep existing resource and discard incoming resource in the content to be + // imported. + IMPORT_STRATEGY_KEEP = 3; + + // Combine existing and incoming resources when a conflict is encountered. + IMPORT_STRATEGY_MERGE = 4; + + // Throw error if a conflict is encountered. + IMPORT_STRATEGY_THROW_ERROR = 5; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto index 6c59bcea401c..1d56080128c8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto"; import "google/cloud/dialogflow/cx/v3beta1/fulfillment.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -128,8 +129,10 @@ message Page { // Ordered list of // [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] - // associated with the page. Transition route groups must be unique within a - // page. + // added to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and agent-level + // transition route groups, the flow-level ones will have higher priority and + // will be put before the agent-level ones. // // * If multiple transition routes within a page scope refer to the same // intent, then the precedence order is: page's transition route -> page's @@ -139,7 +142,10 @@ message Page { // intent, then the first group in the ordered list takes precedence. // // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/` for agent-level + // groups. repeated string transition_route_groups = 11 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" @@ -172,6 +178,10 @@ message Page { // Handlers associated with the page to handle events such as webhook errors, // no match or no input. repeated EventHandler event_handlers = 10; + + // Optional. Knowledge connector configuration. + KnowledgeConnectorSettings knowledge_connector_settings = 18 + [(google.api.field_behavior) = OPTIONAL]; } // A form is a data model that groups related parameters that can be collected @@ -341,6 +351,10 @@ message TransitionRoute { // Output only. The unique identifier of this transition route. string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The description of the transition route. The maximum length is + // 500 characters. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + // The unique identifier of an // [Intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format: // `projects//locations//agents//locations//agents//flows//pages/`. + string target_page = 4 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; + + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + string target_flow = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + } + + // Optional. List of related data store connections. + repeated DataStoreConnection data_store_connections = 6 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto index ba7dcbf288c5..37b092872cc5 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -180,6 +180,13 @@ message ResponseMessage { } } + // Represents info card response. If the response contains generative + // knowledge prediction, Dialogflow will return a payload with Infobot + // Messenger compatible info card. + // + // Otherwise, the info card response is skipped. + message KnowledgeInfoCard {} + // Required. The rich response message. oneof message { // Returns a text response. @@ -224,6 +231,10 @@ message ResponseMessage { // A signal that the client should transfer the phone call connected to // this agent to a third-party endpoint. TelephonyTransferCall telephony_transfer_call = 18; + + // Represents info card for knowledge answers, to be better rendered in + // Dialogflow Messenger. + KnowledgeInfoCard knowledge_info_card = 20; } // The channel which the response is associated with. Clients can specify the diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/safety_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/safety_settings.proto new file mode 100644 index 000000000000..d87ae3d1dd5a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/safety_settings.proto @@ -0,0 +1,42 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "SafetySettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Settings for Generative Safety. +message SafetySettings { + // Text input which can be used for prompt or banned phrases. + message Phrase { + // Required. Text input which can be used for prompt or banned phrases. + string text = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Language code of the phrase. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Banned phrases for generated text. + repeated Phrase banned_phrases = 1; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index 08d59f862726..1bb3f0456b61 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -218,6 +218,17 @@ message SecuritySettings { REDACT_DISK_STORAGE = 2; } + // Defines how long we retain persisted data that contains sensitive info. + enum RetentionStrategy { + // Retains the persisted data with Dialogflow's internal default 365d TTLs. + RETENTION_STRATEGY_UNSPECIFIED = 0; + + // Removes data when the conversation ends. If there is no [Conversation][] + // explicitly established, a default conversation ends when the + // corresponding Dialogflow session ends. + REMOVE_AFTER_CONVERSATION = 1; + } + // Type of data we purge after retention settings triggers purge. enum PurgeDataType { // Unspecified. Do not use. @@ -347,6 +358,10 @@ message SecuritySettings { // Setting a value higher than that has no effect. A missing value or // setting to 0 also means we use default TTL. int32 retention_window_days = 6; + + // Specifies the retention behavior defined by + // [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RetentionStrategy]. + RetentionStrategy retention_strategy = 7; } // List of types of data to remove when retention settings triggers purge. 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 dcf2f5a4de75..aae82bff3767 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 @@ -324,9 +324,12 @@ message CloudConversationDebuggingInfo { // beginning of the stream. google.protobuf.Duration single_utterance_end_time_offset = 14; - // No speech timeout settings observed at runtime. + // No speech timeout settings for the stream. google.protobuf.Duration no_speech_timeout = 15; + // Speech endpointing timeout settings for the stream. + google.protobuf.Duration endpointing_timeout = 19; + // Whether the streaming terminates with an injected text query. bool is_input_text = 16; @@ -609,15 +612,15 @@ message QueryParameters { // Represents the query input. It can contain one of: // -// 1. A conversational query in the form of text. +// 1. A conversational query in the form of text. // -// 2. An intent query that specifies which intent to trigger. +// 2. An intent query that specifies which intent to trigger. // -// 3. Natural language speech audio to be processed. +// 3. Natural language speech audio to be processed. // -// 4. An event to be triggered. +// 4. An event to be triggered. // -// 5. DTMF digits to invoke an intent and fill in parameter value. +// 5. DTMF digits to invoke an intent and fill in parameter value. message QueryInput { // Required. The input specification. oneof input { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto index e616c7a3718e..a68a449052d2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -46,6 +46,9 @@ service TransitionRouteGroups { returns (ListTransitionRouteGroupsResponse) { option (google.api.http) = { get: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups" + additional_bindings { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups" + } }; option (google.api.method_signature) = "parent"; } @@ -56,6 +59,9 @@ service TransitionRouteGroups { returns (TransitionRouteGroup) { option (google.api.http) = { get: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" + additional_bindings { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + } }; option (google.api.method_signature) = "name"; } @@ -72,6 +78,10 @@ service TransitionRouteGroups { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups" body: "transition_route_group" + additional_bindings { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups" + body: "transition_route_group" + } }; option (google.api.method_signature) = "parent,transition_route_group"; } @@ -87,6 +97,10 @@ service TransitionRouteGroups { option (google.api.http) = { patch: "/v3beta1/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" body: "transition_route_group" + additional_bindings { + patch: "/v3beta1/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + body: "transition_route_group" + } }; option (google.api.method_signature) = "transition_route_group,update_mask"; } @@ -101,25 +115,34 @@ service TransitionRouteGroups { returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}" + additional_bindings { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}" + } }; option (google.api.method_signature) = "name"; } } -// An TransitionRouteGroup represents a group of +// A TransitionRouteGroup represents a group of // [`TransitionRoutes`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute] to // be used by a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. message TransitionRouteGroup { option (google.api.resource) = { type: "dialogflow.googleapis.com/TransitionRouteGroup" pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}" + pattern: "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}" + plural: "transitionRouteGroups" + singular: "transitionRouteGroup" }; // The unique identifier of the transition route group. // [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] // populates the name automatically. Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/transitionRouteGroups/` or + // `projects//locations//agents//transitionRouteGroups/` for agent-level + // groups. string name = 1; // Required. The human-readable name of the transition route group, unique @@ -136,7 +159,8 @@ message TransitionRouteGroup { message ListTransitionRouteGroupsRequest { // Required. The flow to list all transition route groups for. // Format: `projects//locations//agents//flows/`. + // ID>/flows/` + // or `projects//locations//agents/. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -186,7 +210,9 @@ message GetTransitionRouteGroupRequest { // Required. The name of the // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. // Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // ID>/flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -215,7 +241,9 @@ message CreateTransitionRouteGroupRequest { // Required. The flow to create an // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] // for. Format: `projects//locations//agents//flows/`. + // ID>/flows/` + // or `projects//locations//agents/` + // for agent-level groups. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -272,7 +300,8 @@ message DeleteTransitionRouteGroupRequest { // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] // to delete. Format: `projects//locations//agents//flows//transitionRouteGroups/`. + // Route Group ID>` or `projects//locations//agents//transitionRouteGroups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto index 96ec7c6ddff3..0ff2df787481 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -70,6 +70,9 @@ message ValidationMessage { // Transition route group. TRANSITION_ROUTE_GROUP = 7; + + // Agent transition route group. + AGENT_TRANSITION_ROUTE_GROUP = 14; } // Severity level. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto index e88e3ee91aea..ce564df22c38 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -182,8 +182,8 @@ message Webhook { // Optional. Maps the values extracted from specific fields of the flexible // webhook response into session parameters. - // - Key: session parameter name - // - Value: field path in the webhook response + // - Key: session parameter name + // - Value: field path in the webhook response map parameter_mapping = 9 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/AsyncGetGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/AsyncGetGenerativeSettings.java new file mode 100644 index 000000000000..0f97e8df94d6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/AsyncGetGenerativeSettings.java @@ -0,0 +1,52 @@ +/* + * 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_Agents_GetGenerativeSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; + +public class AsyncGetGenerativeSettings { + + public static void main(String[] args) throws Exception { + asyncGetGenerativeSettings(); + } + + public static void asyncGetGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = + agentsClient.getGenerativeSettingsCallable().futureCall(request); + // Do something. + GenerativeSettings response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettings.java new file mode 100644 index 000000000000..a0b226950b2a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettings.java @@ -0,0 +1,48 @@ +/* + * 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_Agents_GetGenerativeSettings_sync] +import com.google.cloud.dialogflow.cx.v3.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest; + +public class SyncGetGenerativeSettings { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettings(); + } + + public static void syncGetGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + GenerativeSettings response = agentsClient.getGenerativeSettings(request); + } + } +} +// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java new file mode 100644 index 000000000000..ff50ea0805e2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java @@ -0,0 +1,44 @@ +/* + * 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_Agents_GetGenerativeSettings_AgentgenerativesettingsnameString_sync] +import com.google.cloud.dialogflow.cx.v3.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; + +public class SyncGetGenerativeSettingsAgentgenerativesettingsnameString { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettingsAgentgenerativesettingsnameString(); + } + + public static void syncGetGenerativeSettingsAgentgenerativesettingsnameString() 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 (AgentsClient agentsClient = AgentsClient.create()) { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode); + } + } +} +// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_AgentgenerativesettingsnameString_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java new file mode 100644 index 000000000000..baaa7b05ce0c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java @@ -0,0 +1,43 @@ +/* + * 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_Agents_GetGenerativeSettings_StringString_sync] +import com.google.cloud.dialogflow.cx.v3.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; + +public class SyncGetGenerativeSettingsStringString { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettingsStringString(); + } + + public static void syncGetGenerativeSettingsStringString() 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 (AgentsClient agentsClient = AgentsClient.create()) { + String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + String languageCode = "languageCode-2092349083"; + GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode); + } + } +} +// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_StringString_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java new file mode 100644 index 000000000000..8dfc7f6d63b8 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java @@ -0,0 +1,51 @@ +/* + * 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_Agents_UpdateGenerativeSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGenerativeSettings { + + public static void main(String[] args) throws Exception { + asyncUpdateGenerativeSettings(); + } + + public static void asyncUpdateGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(GenerativeSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + agentsClient.updateGenerativeSettingsCallable().futureCall(request); + // Do something. + GenerativeSettings response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Agents_UpdateGenerativeSettings_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java new file mode 100644 index 000000000000..a17370cd7d1b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java @@ -0,0 +1,47 @@ +/* + * 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_Agents_UpdateGenerativeSettings_sync] +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGenerativeSettings { + + public static void main(String[] args) throws Exception { + syncUpdateGenerativeSettings(); + } + + public static void syncUpdateGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(GenerativeSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + GenerativeSettings response = agentsClient.updateGenerativeSettings(request); + } + } +} +// [END dialogflow_v3_generated_Agents_UpdateGenerativeSettings_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java new file mode 100644 index 000000000000..c2b8903eca6f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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_Agents_UpdateGenerativeSettings_GenerativesettingsFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3.AgentsClient; +import com.google.cloud.dialogflow.cx.v3.GenerativeSettings; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGenerativeSettingsGenerativesettingsFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateGenerativeSettingsGenerativesettingsFieldmask(); + } + + public static void syncUpdateGenerativeSettingsGenerativesettingsFieldmask() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + GenerativeSettings response = + agentsClient.updateGenerativeSettings(generativeSettings, updateMask); + } + } +} +// [END dialogflow_v3_generated_Agents_UpdateGenerativeSettings_GenerativesettingsFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlow.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlow.java index 0f659ad28164..3e12619d0fc1 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlow.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlow.java @@ -19,6 +19,7 @@ // [START dialogflow_v3_generated_Flows_ImportFlow_async] import com.google.api.core.ApiFuture; import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3.FlowsClient; import com.google.cloud.dialogflow.cx.v3.ImportFlowRequest; import com.google.longrunning.Operation; @@ -39,6 +40,7 @@ public static void asyncImportFlow() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ApiFuture future = flowsClient.importFlowCallable().futureCall(request); // Do something. diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlowLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlowLRO.java index 651a26ca54c0..2b61752110aa 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlowLRO.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/AsyncImportFlowLRO.java @@ -19,6 +19,7 @@ // [START dialogflow_v3_generated_Flows_ImportFlow_LRO_async] import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3.FlowsClient; import com.google.cloud.dialogflow.cx.v3.ImportFlowRequest; import com.google.cloud.dialogflow.cx.v3.ImportFlowResponse; @@ -40,6 +41,7 @@ public static void asyncImportFlowLRO() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); OperationFuture future = flowsClient.importFlowOperationCallable().futureCall(request); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/SyncImportFlow.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/SyncImportFlow.java index a9a90afe070a..30e8c8778397 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/SyncImportFlow.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/flows/importflow/SyncImportFlow.java @@ -18,6 +18,7 @@ // [START dialogflow_v3_generated_Flows_ImportFlow_sync] import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3.FlowsClient; import com.google.cloud.dialogflow.cx.v3.ImportFlowRequest; import com.google.cloud.dialogflow.cx.v3.ImportFlowResponse; @@ -38,6 +39,7 @@ public static void syncImportFlow() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse response = flowsClient.importFlowAsync(request).get(); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java new file mode 100644 index 000000000000..d51f017e5a9c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java @@ -0,0 +1,46 @@ +/* + * 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_TransitionRouteGroups_CreateTransitionRouteGroup_AgentnameTransitionroutegroup_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup; +import com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupsClient; + +public class SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup { + + public static void main(String[] args) throws Exception { + syncCreateTransitionRouteGroupAgentnameTransitionroutegroup(); + } + + public static void syncCreateTransitionRouteGroupAgentnameTransitionroutegroup() + 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 (TransitionRouteGroupsClient transitionRouteGroupsClient = + TransitionRouteGroupsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + TransitionRouteGroup response = + transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup); + } + } +} +// [END dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_AgentnameTransitionroutegroup_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java index 1ee558a64fd5..0bf41bc83394 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java @@ -40,7 +40,7 @@ public static void asyncDeleteTransitionRouteGroup() throws Exception { DeleteTransitionRouteGroupRequest request = DeleteTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java index ee8555f8e02e..42538c527b4f 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java @@ -39,7 +39,7 @@ public static void syncDeleteTransitionRouteGroup() throws Exception { DeleteTransitionRouteGroupRequest request = DeleteTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java index 37375639cac1..d7da114681bb 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java @@ -36,7 +36,7 @@ public static void syncDeleteTransitionRouteGroupString() throws Exception { try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { String name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString(); transitionRouteGroupsClient.deleteTransitionRouteGroup(name); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java index 7212e052bc26..dc39205b3dca 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java @@ -36,7 +36,7 @@ public static void syncDeleteTransitionRouteGroupTransitionroutegroupname() thro try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); transitionRouteGroupsClient.deleteTransitionRouteGroup(name); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java index 4e62a81cbc37..46a1a773b1cb 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java @@ -40,7 +40,7 @@ public static void asyncGetTransitionRouteGroup() throws Exception { GetTransitionRouteGroupRequest request = GetTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java index 27e22dbfc160..32e5e035221e 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java @@ -39,7 +39,7 @@ public static void syncGetTransitionRouteGroup() throws Exception { GetTransitionRouteGroupRequest request = GetTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java index 39530bbfb9ba..0c24f440c3fe 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java @@ -36,7 +36,7 @@ public static void syncGetTransitionRouteGroupString() throws Exception { try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { String name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString(); TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java index 4542e8b95e76..3c0b53bd7ff0 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java @@ -36,7 +36,7 @@ public static void syncGetTransitionRouteGroupTransitionroutegroupname() throws try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java new file mode 100644 index 000000000000..f44961e9ebfc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java @@ -0,0 +1,46 @@ +/* + * 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_TransitionRouteGroups_ListTransitionRouteGroups_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup; +import com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupsClient; + +public class SyncListTransitionRouteGroupsAgentname { + + public static void main(String[] args) throws Exception { + syncListTransitionRouteGroupsAgentname(); + } + + public static void syncListTransitionRouteGroupsAgentname() 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 (TransitionRouteGroupsClient transitionRouteGroupsClient = + TransitionRouteGroupsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (TransitionRouteGroup element : + transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_Agentname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/AsyncGetGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/AsyncGetGenerativeSettings.java new file mode 100644 index 000000000000..2f3bb73d8f5d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/AsyncGetGenerativeSettings.java @@ -0,0 +1,52 @@ +/* + * 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_Agents_GetGenerativeSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + +public class AsyncGetGenerativeSettings { + + public static void main(String[] args) throws Exception { + asyncGetGenerativeSettings(); + } + + public static void asyncGetGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = + agentsClient.getGenerativeSettingsCallable().futureCall(request); + // Do something. + GenerativeSettings response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_GetGenerativeSettings_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettings.java new file mode 100644 index 000000000000..a1c7190fe07a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettings.java @@ -0,0 +1,48 @@ +/* + * 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_Agents_GetGenerativeSettings_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + +public class SyncGetGenerativeSettings { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettings(); + } + + public static void syncGetGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GetGenerativeSettingsRequest request = + GetGenerativeSettingsRequest.newBuilder() + .setName( + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + GenerativeSettings response = agentsClient.getGenerativeSettings(request); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_GetGenerativeSettings_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java new file mode 100644 index 000000000000..b257bb149e7a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsAgentgenerativesettingsnameString.java @@ -0,0 +1,44 @@ +/* + * 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_Agents_GetGenerativeSettings_AgentgenerativesettingsnameString_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; + +public class SyncGetGenerativeSettingsAgentgenerativesettingsnameString { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettingsAgentgenerativesettingsnameString(); + } + + public static void syncGetGenerativeSettingsAgentgenerativesettingsnameString() 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 (AgentsClient agentsClient = AgentsClient.create()) { + AgentGenerativeSettingsName name = + AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + String languageCode = "languageCode-2092349083"; + GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_GetGenerativeSettings_AgentgenerativesettingsnameString_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java new file mode 100644 index 000000000000..7da46189129e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/getgenerativesettings/SyncGetGenerativeSettingsStringString.java @@ -0,0 +1,43 @@ +/* + * 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_Agents_GetGenerativeSettings_StringString_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentGenerativeSettingsName; +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; + +public class SyncGetGenerativeSettingsStringString { + + public static void main(String[] args) throws Exception { + syncGetGenerativeSettingsStringString(); + } + + public static void syncGetGenerativeSettingsStringString() 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 (AgentsClient agentsClient = AgentsClient.create()) { + String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + String languageCode = "languageCode-2092349083"; + GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_GetGenerativeSettings_StringString_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java new file mode 100644 index 000000000000..b1ee68d04d26 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/AsyncUpdateGenerativeSettings.java @@ -0,0 +1,51 @@ +/* + * 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_Agents_UpdateGenerativeSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGenerativeSettings { + + public static void main(String[] args) throws Exception { + asyncUpdateGenerativeSettings(); + } + + public static void asyncUpdateGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(GenerativeSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + agentsClient.updateGenerativeSettingsCallable().futureCall(request); + // Do something. + GenerativeSettings response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_UpdateGenerativeSettings_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java new file mode 100644 index 000000000000..ab8725e88ade --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettings.java @@ -0,0 +1,47 @@ +/* + * 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_Agents_UpdateGenerativeSettings_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGenerativeSettings { + + public static void main(String[] args) throws Exception { + syncUpdateGenerativeSettings(); + } + + public static void syncUpdateGenerativeSettings() 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 (AgentsClient agentsClient = AgentsClient.create()) { + UpdateGenerativeSettingsRequest request = + UpdateGenerativeSettingsRequest.newBuilder() + .setGenerativeSettings(GenerativeSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + GenerativeSettings response = agentsClient.updateGenerativeSettings(request); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_UpdateGenerativeSettings_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java new file mode 100644 index 000000000000..d3e1dc231ae0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/agents/updategenerativesettings/SyncUpdateGenerativeSettingsGenerativesettingsFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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_Agents_UpdateGenerativeSettings_GenerativesettingsFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentsClient; +import com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGenerativeSettingsGenerativesettingsFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateGenerativeSettingsGenerativesettingsFieldmask(); + } + + public static void syncUpdateGenerativeSettingsGenerativesettingsFieldmask() 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 (AgentsClient agentsClient = AgentsClient.create()) { + GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + GenerativeSettings response = + agentsClient.updateGenerativeSettings(generativeSettings, updateMask); + } + } +} +// [END dialogflow_v3beta1_generated_Agents_UpdateGenerativeSettings_GenerativesettingsFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlow.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlow.java index e36d3497aaa0..3078b5070577 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlow.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlow.java @@ -19,6 +19,7 @@ // [START dialogflow_v3beta1_generated_Flows_ImportFlow_async] import com.google.api.core.ApiFuture; import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3beta1.FlowsClient; import com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; import com.google.longrunning.Operation; @@ -39,6 +40,7 @@ public static void asyncImportFlow() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ApiFuture future = flowsClient.importFlowCallable().futureCall(request); // Do something. diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlowLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlowLRO.java index 52e4730bc766..0ef4bb2102e0 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlowLRO.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/AsyncImportFlowLRO.java @@ -19,6 +19,7 @@ // [START dialogflow_v3beta1_generated_Flows_ImportFlow_LRO_async] import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3beta1.FlowsClient; import com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; @@ -40,6 +41,7 @@ public static void asyncImportFlowLRO() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); OperationFuture future = flowsClient.importFlowOperationCallable().futureCall(request); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/SyncImportFlow.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/SyncImportFlow.java index 4ecdfb251845..269a11cccc93 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/SyncImportFlow.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/flows/importflow/SyncImportFlow.java @@ -18,6 +18,7 @@ // [START dialogflow_v3beta1_generated_Flows_ImportFlow_sync] import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; import com.google.cloud.dialogflow.cx.v3beta1.FlowsClient; import com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; @@ -38,6 +39,7 @@ public static void syncImportFlow() throws Exception { ImportFlowRequest request = ImportFlowRequest.newBuilder() .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setFlowImportStrategy(FlowImportStrategy.newBuilder().build()) .build(); ImportFlowResponse response = flowsClient.importFlowAsync(request).get(); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java new file mode 100644 index 000000000000..9b1a6400a491 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/createtransitionroutegroup/SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup.java @@ -0,0 +1,46 @@ +/* + * 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_TransitionRouteGroups_CreateTransitionRouteGroup_AgentnameTransitionroutegroup_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup; +import com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupsClient; + +public class SyncCreateTransitionRouteGroupAgentnameTransitionroutegroup { + + public static void main(String[] args) throws Exception { + syncCreateTransitionRouteGroupAgentnameTransitionroutegroup(); + } + + public static void syncCreateTransitionRouteGroupAgentnameTransitionroutegroup() + 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 (TransitionRouteGroupsClient transitionRouteGroupsClient = + TransitionRouteGroupsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build(); + TransitionRouteGroup response = + transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup); + } + } +} +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_CreateTransitionRouteGroup_AgentnameTransitionroutegroup_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java index 607e77fa2b2c..7ff2777bcb92 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/AsyncDeleteTransitionRouteGroup.java @@ -40,7 +40,7 @@ public static void asyncDeleteTransitionRouteGroup() throws Exception { DeleteTransitionRouteGroupRequest request = DeleteTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java index fb6b615004ae..4b179c0dcb39 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroup.java @@ -39,7 +39,7 @@ public static void syncDeleteTransitionRouteGroup() throws Exception { DeleteTransitionRouteGroupRequest request = DeleteTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java index 3d877e28794a..a7f8e284012a 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupString.java @@ -36,7 +36,7 @@ public static void syncDeleteTransitionRouteGroupString() throws Exception { try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { String name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString(); transitionRouteGroupsClient.deleteTransitionRouteGroup(name); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java index 730dfa2b075f..bc2603466129 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/deletetransitionroutegroup/SyncDeleteTransitionRouteGroupTransitionroutegroupname.java @@ -36,7 +36,7 @@ public static void syncDeleteTransitionRouteGroupTransitionroutegroupname() thro try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); transitionRouteGroupsClient.deleteTransitionRouteGroup(name); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java index abed1daef9e6..e08db655e71d 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/AsyncGetTransitionRouteGroup.java @@ -40,7 +40,7 @@ public static void asyncGetTransitionRouteGroup() throws Exception { GetTransitionRouteGroupRequest request = GetTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java index 840e998d6094..4c28f8c0900f 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroup.java @@ -39,7 +39,7 @@ public static void syncGetTransitionRouteGroup() throws Exception { GetTransitionRouteGroupRequest request = GetTransitionRouteGroupRequest.newBuilder() .setName( - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java index 935125f40635..20a873e01da7 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupString.java @@ -36,7 +36,7 @@ public static void syncGetTransitionRouteGroupString() throws Exception { try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { String name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]") .toString(); TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java index 756b0724848f..746cc357a0c0 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/gettransitionroutegroup/SyncGetTransitionRouteGroupTransitionroutegroupname.java @@ -36,7 +36,7 @@ public static void syncGetTransitionRouteGroupTransitionroutegroupname() throws try (TransitionRouteGroupsClient transitionRouteGroupsClient = TransitionRouteGroupsClient.create()) { TransitionRouteGroupName name = - TransitionRouteGroupName.of( + TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName( "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"); TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java new file mode 100644 index 000000000000..c067f4c37e77 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/transitionroutegroups/listtransitionroutegroups/SyncListTransitionRouteGroupsAgentname.java @@ -0,0 +1,46 @@ +/* + * 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_TransitionRouteGroups_ListTransitionRouteGroups_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup; +import com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupsClient; + +public class SyncListTransitionRouteGroupsAgentname { + + public static void main(String[] args) throws Exception { + syncListTransitionRouteGroupsAgentname(); + } + + public static void syncListTransitionRouteGroupsAgentname() 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 (TransitionRouteGroupsClient transitionRouteGroupsClient = + TransitionRouteGroupsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (TransitionRouteGroup element : + transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_ListTransitionRouteGroups_Agentname_sync]