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