diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java index 1c637845af6..1ada85669eb 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2020. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -101,10 +101,10 @@ */ public class Assistant extends BaseService { - private static final String DEFAULT_SERVICE_NAME = "assistant"; + private static final String DEFAULT_SERVICE_NAME = "conversation"; private static final String DEFAULT_SERVICE_URL = - "https://gateway.watsonplatform.net/assistant/api"; + "https://api.us-south.assistant.watson.cloud.ibm.com"; private String versionDate; @@ -171,8 +171,6 @@ public Assistant(String versionDate, String serviceName, Authenticator authentic * and search capabilities. For more information, see the * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview). * - *
There is no rate limit for this operation.
- *
* @param messageOptions the {@link MessageOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link MessageResponse}
*/
@@ -234,9 +232,6 @@ public ServiceCall List the workspaces associated with a Watson Assistant service instance.
*
- * This operation is limited to 500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listWorkspacesOptions the {@link ListWorkspacesOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link WorkspaceCollection}
@@ -278,9 +273,6 @@ public ServiceCall List the workspaces associated with a Watson Assistant service instance.
*
- * This operation is limited to 500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @return a {@link ServiceCall} with a response type of {@link WorkspaceCollection}
*/
public ServiceCall Create a workspace based on component objects. You must provide workspace components
* defining the content of the new workspace.
*
- * This operation is limited to 30 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createWorkspaceOptions the {@link CreateWorkspaceOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Workspace}
@@ -384,9 +373,6 @@ public ServiceCall Create a workspace based on component objects. You must provide workspace components
* defining the content of the new workspace.
*
- * This operation is limited to 30 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @return a {@link ServiceCall} with a response type of {@link Workspace}
*/
public ServiceCall Get information about a workspace, optionally including all workspace content.
*
- * With **export**=`false`, this operation is limited to 6000 requests per 5 minutes. With
- * **export**=`true`, the limit is 20 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getWorkspaceOptions the {@link GetWorkspaceOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Workspace}
*/
@@ -440,9 +422,6 @@ public ServiceCall Update an existing workspace with new or modified data. You must provide component objects
* defining the content of the updated workspace.
*
- * This operation is limited to 30 request per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateWorkspaceOptions the {@link UpdateWorkspaceOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Workspace}
@@ -535,9 +514,6 @@ public ServiceCall Delete a workspace from the service instance.
*
- * This operation is limited to 30 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteWorkspaceOptions the {@link DeleteWorkspaceOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of Void
@@ -567,10 +543,6 @@ public ServiceCall List the intents for a workspace.
*
- * With **export**=`false`, this operation is limited to 2000 requests per 30 minutes. With
- * **export**=`true`, the limit is 400 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listIntentsOptions the {@link ListIntentsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link IntentCollection}
*/
@@ -617,9 +589,6 @@ public ServiceCall If you want to create multiple intents with a single API call, consider using the **[Update
* workspace](#update-workspace)** method instead.
*
- * This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createIntentOptions the {@link CreateIntentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Intent}
*/
@@ -663,10 +632,6 @@ public ServiceCall Get information about an intent, optionally including all intent content.
*
- * With **export**=`false`, this operation is limited to 6000 requests per 5 minutes. With
- * **export**=`true`, the limit is 400 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getIntentOptions the {@link GetIntentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Intent}
*/
@@ -705,9 +670,6 @@ public ServiceCall If you want to update multiple intents with a single API call, consider using the **[Update
* workspace](#update-workspace)** method instead.
*
- * This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateIntentOptions the {@link UpdateIntentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Intent}
*/
@@ -756,9 +718,6 @@ public ServiceCall Delete an intent from a workspace.
*
- * This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteIntentOptions the {@link DeleteIntentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of Void
*/
@@ -786,9 +745,6 @@ public ServiceCall List the user input examples for an intent, optionally including contextual entity mentions.
*
- * This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listExamplesOptions the {@link ListExamplesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ExampleCollection}
*/
@@ -832,9 +788,6 @@ public ServiceCall If you want to add multiple examples with a single API call, consider using the **[Update
* intent](#update-intent)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createExampleOptions the {@link CreateExampleOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Example}
@@ -876,9 +829,6 @@ public ServiceCall Get information about a user input example.
*
- * This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getExampleOptions the {@link GetExampleOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Example}
*/
@@ -915,9 +865,6 @@ public ServiceCall If you want to update multiple examples with a single API call, consider using the **[Update
* intent](#update-intent)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateExampleOptions the {@link UpdateExampleOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Example}
@@ -963,9 +910,6 @@ public ServiceCall Delete a user input example from an intent.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteExampleOptions the {@link DeleteExampleOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of Void
@@ -997,9 +941,6 @@ public ServiceCall List the counterexamples for a workspace. Counterexamples are examples that have been marked
* as irrelevant input.
*
- * This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listCounterexamplesOptions the {@link ListCounterexamplesOptions} containing the options
* for the call
* @return a {@link ServiceCall} with a response type of {@link CounterexampleCollection}
@@ -1047,9 +988,6 @@ public ServiceCall If you want to add multiple counterexamples with a single API call, consider using the
* **[Update workspace](#update-workspace)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createCounterexampleOptions the {@link CreateCounterexampleOptions} containing the
* options for the call
* @return a {@link ServiceCall} with a response type of {@link Counterexample}
@@ -1088,9 +1026,6 @@ public ServiceCall Get information about a counterexample. Counterexamples are examples that have been marked
* as irrelevant input.
*
- * This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getCounterexampleOptions the {@link GetCounterexampleOptions} containing the options for
* the call
* @return a {@link ServiceCall} with a response type of {@link Counterexample}
@@ -1128,12 +1063,6 @@ public ServiceCall Update the text of a counterexample. Counterexamples are examples that have been marked as
* irrelevant input.
*
- * If you want to update multiple counterexamples with a single API call, consider using the
- * **[Update workspace](#update-workspace)** method instead.
- *
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateCounterexampleOptions the {@link UpdateCounterexampleOptions} containing the
* options for the call
* @return a {@link ServiceCall} with a response type of {@link Counterexample}
@@ -1176,9 +1105,6 @@ public ServiceCall Delete a counterexample from a workspace. Counterexamples are examples that have been marked
* as irrelevant input.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteCounterexampleOptions the {@link DeleteCounterexampleOptions} containing the
* options for the call
* @return a {@link ServiceCall} with a response type of Void
@@ -1211,10 +1137,6 @@ public ServiceCall List the entities for a workspace.
*
- * With **export**=`false`, this operation is limited to 1000 requests per 30 minutes. With
- * **export**=`true`, the limit is 200 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listEntitiesOptions the {@link ListEntitiesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link EntityCollection}
*/
@@ -1261,9 +1183,6 @@ public ServiceCall If you want to create multiple entities with a single API call, consider using the **[Update
* workspace](#update-workspace)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createEntityOptions the {@link CreateEntityOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Entity}
*/
@@ -1316,10 +1235,6 @@ public ServiceCall Get information about an entity, optionally including all entity content.
*
- * With **export**=`false`, this operation is limited to 6000 requests per 5 minutes. With
- * **export**=`true`, the limit is 200 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getEntityOptions the {@link GetEntityOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Entity}
*/
@@ -1358,9 +1273,6 @@ public ServiceCall If you want to update multiple entities with a single API call, consider using the **[Update
* workspace](#update-workspace)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateEntityOptions the {@link UpdateEntityOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Entity}
*/
@@ -1418,9 +1330,6 @@ public ServiceCall Delete an entity from a workspace, or disable a system entity.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteEntityOptions the {@link DeleteEntityOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of Void
*/
@@ -1449,9 +1358,6 @@ public ServiceCall List mentions for a contextual entity. An entity mention is an occurrence of a contextual
* entity in the context of an intent user input example.
*
- * This operation is limited to 200 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listMentionsOptions the {@link ListMentionsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link EntityMentionCollection}
*/
@@ -1487,9 +1393,6 @@ public ServiceCall List the values for an entity.
*
- * This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listValuesOptions the {@link ListValuesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ValueCollection}
*/
@@ -1536,9 +1439,6 @@ public ServiceCall If you want to create multiple entity values with a single API call, consider using the
* **[Update entity](#update-entity)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createValueOptions the {@link CreateValueOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Value}
*/
@@ -1594,9 +1494,6 @@ public ServiceCall Get information about an entity value.
*
- * This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getValueOptions the {@link GetValueOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Value}
*/
@@ -1637,9 +1534,6 @@ public ServiceCall If you want to update multiple entity values with a single API call, consider using the
* **[Update entity](#update-entity)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateValueOptions the {@link UpdateValueOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Value}
*/
@@ -1702,9 +1596,6 @@ public ServiceCall Delete a value from an entity.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteValueOptions the {@link DeleteValueOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of Void
*/
@@ -1734,9 +1625,6 @@ public ServiceCall List the synonyms for an entity value.
*
- * This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listSynonymsOptions the {@link ListSynonymsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link SynonymCollection}
*/
@@ -1782,9 +1670,6 @@ public ServiceCall If you want to create multiple synonyms with a single API call, consider using the **[Update
* entity](#update-entity)** or **[Update entity value](#update-entity-value)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createSynonymOptions the {@link CreateSynonymOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Synonym}
@@ -1824,9 +1709,6 @@ public ServiceCall Get information about a synonym of an entity value.
*
- * This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getSynonymOptions the {@link GetSynonymOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Synonym}
*/
@@ -1866,9 +1748,6 @@ public ServiceCall If you want to update multiple synonyms with a single API call, consider using the **[Update
* entity](#update-entity)** or **[Update entity value](#update-entity-value)** method instead.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateSynonymOptions the {@link UpdateSynonymOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link Synonym}
@@ -1911,9 +1790,6 @@ public ServiceCall Delete a synonym from an entity value.
*
- * This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteSynonymOptions the {@link DeleteSynonymOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of Void
@@ -1947,9 +1823,6 @@ public ServiceCall List the dialog nodes for a workspace.
*
- * This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param listDialogNodesOptions the {@link ListDialogNodesOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link DialogNodeCollection}
@@ -1996,9 +1869,6 @@ public ServiceCall If you want to create multiple dialog nodes with a single API call, consider using the
* **[Update workspace](#update-workspace)** method instead.
*
- * This operation is limited to 500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param createDialogNodeOptions the {@link CreateDialogNodeOptions} containing the options for
* the call
* @return a {@link ServiceCall} with a response type of {@link DialogNode}
@@ -2105,9 +1975,6 @@ public ServiceCall Get information about a dialog node.
*
- * This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate
- * limiting**.
- *
* @param getDialogNodeOptions the {@link GetDialogNodeOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of {@link DialogNode}
@@ -2145,9 +2012,6 @@ public ServiceCall If you want to update multiple dialog nodes with a single API call, consider using the
* **[Update workspace](#update-workspace)** method instead.
*
- * This operation is limited to 500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param updateDialogNodeOptions the {@link UpdateDialogNodeOptions} containing the options for
* the call
* @return a {@link ServiceCall} with a response type of {@link DialogNode}
@@ -2258,9 +2122,6 @@ public ServiceCall Delete a dialog node from a workspace.
*
- * This operation is limited to 500 requests per 30 minutes. For more information, see **Rate
- * limiting**.
- *
* @param deleteDialogNodeOptions the {@link DeleteDialogNodeOptions} containing the options for
* the call
* @return a {@link ServiceCall} with a response type of Void
@@ -2292,10 +2153,6 @@ public ServiceCall List the events from the log of a specific workspace.
*
- * If **cursor** is not specified, this operation is limited to 40 requests per 30 minutes. If
- * **cursor** is specified, the limit is 120 requests per minute. For more information, see **Rate
- * limiting**.
- *
* @param listLogsOptions the {@link ListLogsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link LogCollection}
*/
@@ -2336,10 +2193,6 @@ public ServiceCall List the events from the logs of all workspaces in the service instance.
*
- * If **cursor** is not specified, this operation is limited to 40 requests per 30 minutes. If
- * **cursor** is specified, the limit is 120 requests per minute. For more information, see **Rate
- * limiting**.
- *
* @param listAllLogsOptions the {@link ListAllLogsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link LogCollection}
*/
@@ -2382,9 +2235,6 @@ public ServiceCall This operation is limited to 4 requests per minute. For more information, see **Rate
- * limiting**.
- *
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
* call
* @return a {@link ServiceCall} with a response type of Void
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java
index 01f42824181..fe2027cf0ff 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -24,8 +24,7 @@ public class DialogNodeOutputGeneric extends GenericModel {
* The type of response returned by the dialog node. The specified response type must be supported
* by the client application or channel.
*
- * **Note:** The **search_skill** response type is available only for Plus and Premium users,
- * and is used only by the v2 runtime API.
+ * **Note:** The **search_skill** response type is used only by the v2 runtime API.
*/
public interface ResponseType {
/** text. */
@@ -406,8 +405,7 @@ public Builder newBuilder() {
* The type of response returned by the dialog node. The specified response type must be
* supported by the client application or channel.
*
- * **Note:** The **search_skill** response type is available only for Plus and Premium users,
- * and is used only by the v2 runtime API.
+ * **Note:** The **search_skill** response type is used only by the v2 runtime API.
*
* @return the responseType
*/
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionResponseGeneric.java
index 68ef115b187..48e3ba0b847 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionResponseGeneric.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionResponseGeneric.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -24,9 +24,7 @@ public class DialogSuggestionResponseGeneric extends GenericModel {
* The type of response returned by the dialog node. The specified response type must be supported
* by the client application or channel.
*
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Plus and Premium users. The **search_skill** response type is available only
- * for Plus and Premium users, and is used only by the v2 runtime API.
+ * **Note:** The **search_skill** response type is is used only by the v2 runtime API.
*/
public interface ResponseType {
/** text. */
@@ -302,9 +300,7 @@ public Builder newBuilder() {
* The type of response returned by the dialog node. The specified response type must be
* supported by the client application or channel.
*
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Plus and Premium users. The **search_skill** response type is available only
- * for Plus and Premium users, and is used only by the v2 runtime API.
+ * **Note:** The **search_skill** response type is is used only by the v2 runtime API.
*
* @return the responseType
*/
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java
index 7a94a307c2c..510b4877128 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -23,9 +23,6 @@ public class RuntimeResponseGeneric extends GenericModel {
/**
* The type of response returned by the dialog node. The specified response type must be supported
* by the client application or channel.
- *
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Plus and Premium users.
*/
public interface ResponseType {
/** text. */
@@ -332,9 +329,6 @@ public Builder newBuilder() {
* The type of response returned by the dialog node. The specified response type must be
* supported by the client application or channel.
*
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Plus and Premium users.
- *
* @return the responseType
*/
public String responseType() {
@@ -470,9 +464,6 @@ public String dialogNode() {
* An array of objects describing the possible matching dialog nodes from which the user can
* choose.
*
- * **Note:** The **suggestions** property is part of the disambiguation feature, which is only
- * available for Plus and Premium users.
- *
* @return the suggestions
*/
public List Workspace settings related to the disambiguation feature.
*
- * **Note:** This feature is available only to Plus and Premium users.
- *
* @return the disambiguation
*/
public WorkspaceSystemSettingsDisambiguation disambiguation() {
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java
index 54d5b75dfec..6687e86c20e 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -15,11 +15,7 @@
import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;
-/**
- * Workspace settings related to the disambiguation feature.
- *
- * **Note:** This feature is available only to Plus and Premium users.
- */
+/** Workspace settings related to the disambiguation feature. */
public class WorkspaceSystemSettingsDisambiguation extends GenericModel {
/**
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
index aae8e8cf061..67794c50b02 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -22,6 +22,9 @@
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
import com.ibm.watson.assistant.v2.model.CreateSessionOptions;
import com.ibm.watson.assistant.v2.model.DeleteSessionOptions;
+import com.ibm.watson.assistant.v2.model.DeleteUserDataOptions;
+import com.ibm.watson.assistant.v2.model.ListLogsOptions;
+import com.ibm.watson.assistant.v2.model.LogCollection;
import com.ibm.watson.assistant.v2.model.MessageOptions;
import com.ibm.watson.assistant.v2.model.MessageResponse;
import com.ibm.watson.assistant.v2.model.MessageResponseStateless;
@@ -44,10 +47,10 @@
*/
public class Assistant extends BaseService {
- private static final String DEFAULT_SERVICE_NAME = "assistant";
+ private static final String DEFAULT_SERVICE_NAME = "conversation";
private static final String DEFAULT_SERVICE_URL =
- "https://gateway.watsonplatform.net/assistant/api";
+ "https://api.us-south.assistant.watson.cloud.ibm.com";
private String versionDate;
@@ -175,8 +178,6 @@ public ServiceCall Send user input to an assistant and receive a response, with conversation state (including
* context data) stored by Watson Assistant for the duration of the session.
*
- * There is no rate limit for this operation.
- *
* @param messageOptions the {@link MessageOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link MessageResponse}
*/
@@ -217,8 +218,6 @@ public ServiceCall Send user input to an assistant and receive a response, with conversation state (including
* context data) managed by your application.
*
- * There is no rate limit for this operation.
- *
* @param messageStatelessOptions the {@link MessageStatelessOptions} containing the options for
* the call
* @return a {@link ServiceCall} with a response type of {@link MessageResponseStateless}
@@ -258,4 +257,82 @@ public ServiceCall List the events from the log of an assistant.
+ *
+ * This method is available only with Premium plans.
+ *
+ * @param listLogsOptions the {@link ListLogsOptions} containing the options for the call
+ * @return a {@link ServiceCall} with a response type of {@link LogCollection}
+ */
+ public ServiceCall Deletes all data associated with a specified customer ID. The method has no effect if no
+ * data is associated with the customer ID.
+ *
+ * You associate a customer ID with data by passing the `X-Watson-Metadata` header with a
+ * request that passes data. For more information about personal data and customer IDs, see
+ * [Information
+ * security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
+ *
+ * This operation is limited to 4 requests per minute. For more information, see **Rate
+ * limiting**.
+ *
+ * @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
+ * call
+ * @return a {@link ServiceCall} with a response type of Void
+ */
+ public ServiceCall The customer ID for which all data is to be deleted.
+ *
+ * @return the customerId
+ */
+ public String customerId() {
+ return customerId;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java
index e3ba9569cc3..c80276afd74 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogSuggestion.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -25,8 +25,8 @@ public class DialogSuggestion extends GenericModel {
/**
* Gets the label.
*
- * The user-facing label for the disambiguation option. This label is taken from the **title**
- * or **user_label** property of the corresponding dialog node, depending on the disambiguation
+ * The user-facing label for the suggestion. This label is taken from the **title** or
+ * **user_label** property of the corresponding dialog node, depending on the disambiguation
* options.
*
* @return the label
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java
new file mode 100644
index 00000000000..60bff4e4849
--- /dev/null
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ListLogsOptions.java
@@ -0,0 +1,200 @@
+/*
+ * (C) Copyright IBM Corp. 2020.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package com.ibm.watson.assistant.v2.model;
+
+import com.ibm.cloud.sdk.core.service.model.GenericModel;
+
+/** The listLogs options. */
+public class ListLogsOptions extends GenericModel {
+
+ protected String assistantId;
+ protected String sort;
+ protected String filter;
+ protected Long pageLimit;
+ protected String cursor;
+
+ /** Builder. */
+ public static class Builder {
+ private String assistantId;
+ private String sort;
+ private String filter;
+ private Long pageLimit;
+ private String cursor;
+
+ private Builder(ListLogsOptions listLogsOptions) {
+ this.assistantId = listLogsOptions.assistantId;
+ this.sort = listLogsOptions.sort;
+ this.filter = listLogsOptions.filter;
+ this.pageLimit = listLogsOptions.pageLimit;
+ this.cursor = listLogsOptions.cursor;
+ }
+
+ /** Instantiates a new builder. */
+ public Builder() {}
+
+ /**
+ * Instantiates a new builder with required properties.
+ *
+ * @param assistantId the assistantId
+ */
+ public Builder(String assistantId) {
+ this.assistantId = assistantId;
+ }
+
+ /**
+ * Builds a ListLogsOptions.
+ *
+ * @return the listLogsOptions
+ */
+ public ListLogsOptions build() {
+ return new ListLogsOptions(this);
+ }
+
+ /**
+ * Set the assistantId.
+ *
+ * @param assistantId the assistantId
+ * @return the ListLogsOptions builder
+ */
+ public Builder assistantId(String assistantId) {
+ this.assistantId = assistantId;
+ return this;
+ }
+
+ /**
+ * Set the sort.
+ *
+ * @param sort the sort
+ * @return the ListLogsOptions builder
+ */
+ public Builder sort(String sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ /**
+ * Set the filter.
+ *
+ * @param filter the filter
+ * @return the ListLogsOptions builder
+ */
+ public Builder filter(String filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Set the pageLimit.
+ *
+ * @param pageLimit the pageLimit
+ * @return the ListLogsOptions builder
+ */
+ public Builder pageLimit(long pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set the cursor.
+ *
+ * @param cursor the cursor
+ * @return the ListLogsOptions builder
+ */
+ public Builder cursor(String cursor) {
+ this.cursor = cursor;
+ return this;
+ }
+ }
+
+ protected ListLogsOptions(Builder builder) {
+ com.ibm.cloud.sdk.core.util.Validator.notEmpty(
+ builder.assistantId, "assistantId cannot be empty");
+ assistantId = builder.assistantId;
+ sort = builder.sort;
+ filter = builder.filter;
+ pageLimit = builder.pageLimit;
+ cursor = builder.cursor;
+ }
+
+ /**
+ * New builder.
+ *
+ * @return a ListLogsOptions builder
+ */
+ public Builder newBuilder() {
+ return new Builder(this);
+ }
+
+ /**
+ * Gets the assistantId.
+ *
+ * Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user
+ * interface, open the assistant settings and click **API Details**. For information about
+ * creating assistants, see the
+ * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
+ *
+ * **Note:** Currently, the v2 API does not support creating assistants.
+ *
+ * @return the assistantId
+ */
+ public String assistantId() {
+ return assistantId;
+ }
+
+ /**
+ * Gets the sort.
+ *
+ * How to sort the returned log events. You can sort by **request_timestamp**. To reverse the
+ * sort order, prefix the parameter value with a minus sign (`-`).
+ *
+ * @return the sort
+ */
+ public String sort() {
+ return sort;
+ }
+
+ /**
+ * Gets the filter.
+ *
+ * A cacheable parameter that limits the results to those matching the specified filter. For
+ * more information, see the
+ * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
+ *
+ * @return the filter
+ */
+ public String filter() {
+ return filter;
+ }
+
+ /**
+ * Gets the pageLimit.
+ *
+ * The number of records to return in each page of results.
+ *
+ * @return the pageLimit
+ */
+ public Long pageLimit() {
+ return pageLimit;
+ }
+
+ /**
+ * Gets the cursor.
+ *
+ * A token identifying the page of results to retrieve.
+ *
+ * @return the cursor
+ */
+ public String cursor() {
+ return cursor;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java
new file mode 100644
index 00000000000..11e7f03c207
--- /dev/null
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/Log.java
@@ -0,0 +1,170 @@
+/*
+ * (C) Copyright IBM Corp. 2020.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package com.ibm.watson.assistant.v2.model;
+
+import com.google.gson.annotations.SerializedName;
+import com.ibm.cloud.sdk.core.service.model.GenericModel;
+
+/** Log. */
+public class Log extends GenericModel {
+
+ @SerializedName("log_id")
+ protected String logId;
+
+ protected MessageRequest request;
+ protected MessageResponse response;
+
+ @SerializedName("assistant_id")
+ protected String assistantId;
+
+ @SerializedName("session_id")
+ protected String sessionId;
+
+ @SerializedName("skill_id")
+ protected String skillId;
+
+ protected String snapshot;
+
+ @SerializedName("request_timestamp")
+ protected String requestTimestamp;
+
+ @SerializedName("response_timestamp")
+ protected String responseTimestamp;
+
+ protected String language;
+
+ @SerializedName("customer_id")
+ protected String customerId;
+
+ /**
+ * Gets the logId.
+ *
+ * A unique identifier for the logged event.
+ *
+ * @return the logId
+ */
+ public String getLogId() {
+ return logId;
+ }
+
+ /**
+ * Gets the request.
+ *
+ * A stateful message request formatted for the Watson Assistant service.
+ *
+ * @return the request
+ */
+ public MessageRequest getRequest() {
+ return request;
+ }
+
+ /**
+ * Gets the response.
+ *
+ * A response from the Watson Assistant service.
+ *
+ * @return the response
+ */
+ public MessageResponse getResponse() {
+ return response;
+ }
+
+ /**
+ * Gets the assistantId.
+ *
+ * Unique identifier of the assistant.
+ *
+ * @return the assistantId
+ */
+ public String getAssistantId() {
+ return assistantId;
+ }
+
+ /**
+ * Gets the sessionId.
+ *
+ * The ID of the session the message was part of.
+ *
+ * @return the sessionId
+ */
+ public String getSessionId() {
+ return sessionId;
+ }
+
+ /**
+ * Gets the skillId.
+ *
+ * The unique identifier of the skill that responded to the message.
+ *
+ * @return the skillId
+ */
+ public String getSkillId() {
+ return skillId;
+ }
+
+ /**
+ * Gets the snapshot.
+ *
+ * The name of the snapshot (dialog skill version) that responded to the message (for example,
+ * `draft`).
+ *
+ * @return the snapshot
+ */
+ public String getSnapshot() {
+ return snapshot;
+ }
+
+ /**
+ * Gets the requestTimestamp.
+ *
+ * The timestamp for receipt of the message.
+ *
+ * @return the requestTimestamp
+ */
+ public String getRequestTimestamp() {
+ return requestTimestamp;
+ }
+
+ /**
+ * Gets the responseTimestamp.
+ *
+ * The timestamp for the system response to the message.
+ *
+ * @return the responseTimestamp
+ */
+ public String getResponseTimestamp() {
+ return responseTimestamp;
+ }
+
+ /**
+ * Gets the language.
+ *
+ * The language of the assistant to which the message request was made.
+ *
+ * @return the language
+ */
+ public String getLanguage() {
+ return language;
+ }
+
+ /**
+ * Gets the customerId.
+ *
+ * The customer ID specified for the message, if any.
+ *
+ * @return the customerId
+ */
+ public String getCustomerId() {
+ return customerId;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java
new file mode 100644
index 00000000000..b331207d4fc
--- /dev/null
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogCollection.java
@@ -0,0 +1,45 @@
+/*
+ * (C) Copyright IBM Corp. 2020.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package com.ibm.watson.assistant.v2.model;
+
+import com.ibm.cloud.sdk.core.service.model.GenericModel;
+import java.util.List;
+
+/** LogCollection. */
+public class LogCollection extends GenericModel {
+
+ protected List An array of objects describing log events.
+ *
+ * @return the logs
+ */
+ public List The pagination data for the returned objects.
+ *
+ * @return the pagination
+ */
+ public LogPagination getPagination() {
+ return pagination;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java
new file mode 100644
index 00000000000..00a9dbcd0ac
--- /dev/null
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/LogPagination.java
@@ -0,0 +1,61 @@
+/*
+ * (C) Copyright IBM Corp. 2020.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package com.ibm.watson.assistant.v2.model;
+
+import com.google.gson.annotations.SerializedName;
+import com.ibm.cloud.sdk.core.service.model.GenericModel;
+
+/** The pagination data for the returned objects. */
+public class LogPagination extends GenericModel {
+
+ @SerializedName("next_url")
+ protected String nextUrl;
+
+ protected Long matched;
+
+ @SerializedName("next_cursor")
+ protected String nextCursor;
+
+ /**
+ * Gets the nextUrl.
+ *
+ * The URL that will return the next page of results, if any.
+ *
+ * @return the nextUrl
+ */
+ public String getNextUrl() {
+ return nextUrl;
+ }
+
+ /**
+ * Gets the matched.
+ *
+ * Reserved for future use.
+ *
+ * @return the matched
+ */
+ public Long getMatched() {
+ return matched;
+ }
+
+ /**
+ * Gets the nextCursor.
+ *
+ * A token identifying the next page of results.
+ *
+ * @return the nextCursor
+ */
+ public String getNextCursor() {
+ return nextCursor;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkill.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkill.java
index bd0a7741b6b..66516baef05 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkill.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageContextSkill.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -25,12 +25,12 @@ public class MessageContextSkill extends GenericModel {
@SerializedName("user_defined")
protected Map An input object that includes the input text.
+ *
+ * @return the input
+ */
+ public MessageInput input() {
+ return input;
+ }
+
+ /**
+ * Gets the context.
+ *
+ * Context data for the conversation. You can use this property to set or modify context
+ * variables, which can also be accessed by dialog nodes. The context is stored by the assistant
+ * on a per-session basis.
+ *
+ * **Note:** The total size of the context data stored for a stateful session cannot exceed
+ * 100KB.
+ *
+ * @return the context
+ */
+ public MessageContext context() {
+ return context;
+ }
+}
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageResponse.java
index 31204c84cf9..fbcbfe3f5b7 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageResponse.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageResponse.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -38,7 +38,7 @@ public MessageOutput getOutput() {
* The context is stored by the assistant on a per-session basis.
*
* **Note:** The context is included in message responses only if **return_context**=`true` in
- * the message request.
+ * the message request. Full context is always included in logs.
*
* @return the context
*/
diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java
index 797a4a6ebb9..eb0a3bff6bb 100644
--- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java
+++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -23,9 +23,6 @@ public class RuntimeResponseGeneric extends GenericModel {
/**
* The type of response returned by the dialog node. The specified response type must be supported
* by the client application or channel.
- *
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Premium users.
*/
public interface ResponseType {
/** text. */
@@ -361,9 +358,6 @@ public Builder newBuilder() {
* The type of response returned by the dialog node. The specified response type must be
* supported by the client application or channel.
*
- * **Note:** The **suggestion** response type is part of the disambiguation feature, which is
- * only available for Premium users.
- *
* @return the responseType
*/
public String responseType() {
@@ -487,9 +481,6 @@ public String topic() {
* An array of objects describing the possible matching dialog nodes from which the user can
* choose.
*
- * **Note:** The **suggestions** property is part of the disambiguation feature, which is only
- * available for Premium users.
- *
* @return the suggestions
*/
public List The unique identifier of the document in the Discovery service collection.
*
- * This property is included in responses from search skills, which are a beta feature
- * available only to Plus or Premium plan users.
+ * This property is included in responses from search skills, which are available only to Plus
+ * or Premium plan users.
*
* @return the id
*/
diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java
index 1dc07eb33af..b033eaa1d68 100644
--- a/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java
+++ b/discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -134,7 +134,7 @@ public class Discovery extends BaseService {
private static final String DEFAULT_SERVICE_NAME = "discovery";
private static final String DEFAULT_SERVICE_URL =
- "https://gateway.watsonplatform.net/discovery/api";
+ "https://api.us-south.discovery.watson.cloud.ibm.com";
private String versionDate;
diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java
index 894ca91c0b4..7d382c76295 100644
--- a/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java
+++ b/discovery/src/main/java/com/ibm/watson/discovery/v1/model/CredentialDetails.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -39,7 +39,7 @@ public interface CredentialType {
/** saml. */
String SAML = "saml";
/** username_password. */
- String USERNAME_PASSWORD = "username_password"; // pragma: whitelist secret
+ String USERNAME_PASSWORD = "username_password";
/** noauth. */
String NOAUTH = "noauth";
/** basic. */
@@ -141,7 +141,7 @@ private Builder(CredentialDetails credentialDetails) {
this.publicKeyId = credentialDetails.publicKeyId;
this.privateKey = credentialDetails.privateKey;
this.passphrase = credentialDetails.passphrase;
- this.password = credentialDetails.password; // pragma: whitelist secret
+ this.password = credentialDetails.password;
this.gatewayId = credentialDetails.gatewayId;
this.sourceVersion = credentialDetails.sourceVersion;
this.webApplicationUrl = credentialDetails.webApplicationUrl;
@@ -291,7 +291,7 @@ public Builder passphrase(String passphrase) {
* @return the CredentialDetails builder
*/
public Builder password(String password) {
- this.password = password; // pragma: whitelist secret
+ this.password = password;
return this;
}
@@ -385,7 +385,7 @@ protected CredentialDetails(Builder builder) {
publicKeyId = builder.publicKeyId;
privateKey = builder.privateKey;
passphrase = builder.passphrase;
- password = builder.password; // pragma: whitelist secret
+ password = builder.password;
gatewayId = builder.gatewayId;
sourceVersion = builder.sourceVersion;
webApplicationUrl = builder.webApplicationUrl;
diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java
index c394a1a2515..a3d8886a0ce 100644
--- a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java
+++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -23,38 +23,57 @@
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
import com.ibm.watson.common.SdkCommon;
import com.ibm.watson.discovery.v2.model.AddDocumentOptions;
+import com.ibm.watson.discovery.v2.model.CollectionDetails;
import com.ibm.watson.discovery.v2.model.Completions;
import com.ibm.watson.discovery.v2.model.ComponentSettingsResponse;
+import com.ibm.watson.discovery.v2.model.CreateCollectionOptions;
+import com.ibm.watson.discovery.v2.model.CreateEnrichmentOptions;
+import com.ibm.watson.discovery.v2.model.CreateProjectOptions;
import com.ibm.watson.discovery.v2.model.CreateTrainingQueryOptions;
+import com.ibm.watson.discovery.v2.model.DeleteCollectionOptions;
import com.ibm.watson.discovery.v2.model.DeleteDocumentOptions;
import com.ibm.watson.discovery.v2.model.DeleteDocumentResponse;
+import com.ibm.watson.discovery.v2.model.DeleteEnrichmentOptions;
+import com.ibm.watson.discovery.v2.model.DeleteProjectOptions;
import com.ibm.watson.discovery.v2.model.DeleteTrainingQueriesOptions;
+import com.ibm.watson.discovery.v2.model.DeleteUserDataOptions;
import com.ibm.watson.discovery.v2.model.DocumentAccepted;
+import com.ibm.watson.discovery.v2.model.Enrichment;
+import com.ibm.watson.discovery.v2.model.Enrichments;
import com.ibm.watson.discovery.v2.model.GetAutocompletionOptions;
+import com.ibm.watson.discovery.v2.model.GetCollectionOptions;
import com.ibm.watson.discovery.v2.model.GetComponentSettingsOptions;
+import com.ibm.watson.discovery.v2.model.GetEnrichmentOptions;
+import com.ibm.watson.discovery.v2.model.GetProjectOptions;
import com.ibm.watson.discovery.v2.model.GetTrainingQueryOptions;
import com.ibm.watson.discovery.v2.model.ListCollectionsOptions;
import com.ibm.watson.discovery.v2.model.ListCollectionsResponse;
+import com.ibm.watson.discovery.v2.model.ListEnrichmentsOptions;
import com.ibm.watson.discovery.v2.model.ListFieldsOptions;
import com.ibm.watson.discovery.v2.model.ListFieldsResponse;
+import com.ibm.watson.discovery.v2.model.ListProjectsOptions;
+import com.ibm.watson.discovery.v2.model.ListProjectsResponse;
import com.ibm.watson.discovery.v2.model.ListTrainingQueriesOptions;
+import com.ibm.watson.discovery.v2.model.ProjectDetails;
import com.ibm.watson.discovery.v2.model.QueryNoticesOptions;
import com.ibm.watson.discovery.v2.model.QueryNoticesResponse;
import com.ibm.watson.discovery.v2.model.QueryOptions;
import com.ibm.watson.discovery.v2.model.QueryResponse;
import com.ibm.watson.discovery.v2.model.TrainingQuery;
import com.ibm.watson.discovery.v2.model.TrainingQuerySet;
+import com.ibm.watson.discovery.v2.model.UpdateCollectionOptions;
import com.ibm.watson.discovery.v2.model.UpdateDocumentOptions;
+import com.ibm.watson.discovery.v2.model.UpdateEnrichmentOptions;
+import com.ibm.watson.discovery.v2.model.UpdateProjectOptions;
import com.ibm.watson.discovery.v2.model.UpdateTrainingQueryOptions;
import java.util.Map;
import java.util.Map.Entry;
import okhttp3.MultipartBody;
/**
- * IBM Watson™ Discovery for IBM Cloud Pak for Data is a cognitive search and content
- * analytics engine that you can add to applications to identify patterns, trends and actionable
- * insights to drive better decision-making. Securely unify structured and unstructured data with
- * pre-enriched content, and use a simplified query language to eliminate the need for manual
+ * IBM Watson™ Discovery is a cognitive search and content analytics engine that you can add to applications to
+ * identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and
+ * unstructured data with pre-enriched content, and use a simplified query language to eliminate the need for manual
* filtering of results.
*
* @version v2
@@ -64,27 +83,26 @@ public class Discovery extends BaseService {
private static final String DEFAULT_SERVICE_NAME = "discovery";
+ private static final String DEFAULT_SERVICE_URL = "https://api.us-south.discovery.watson.cloud.ibm.com";
+
private String versionDate;
- /**
+/**
* Constructs a new `Discovery` client using the DEFAULT_SERVICE_NAME.
*
- * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
- * will keep your API calls from failing when the service introduces breaking changes.
+ * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
+ * calls from failing when the service introduces breaking changes.
*/
public Discovery(String versionDate) {
- this(
- versionDate,
- DEFAULT_SERVICE_NAME,
- ConfigBasedAuthenticatorFactory.getAuthenticator(DEFAULT_SERVICE_NAME));
+ this(versionDate, DEFAULT_SERVICE_NAME, ConfigBasedAuthenticatorFactory.getAuthenticator(DEFAULT_SERVICE_NAME));
}
/**
- * Constructs a new `Discovery` client with the DEFAULT_SERVICE_NAME and the specified
- * Authenticator.
+ * Constructs a new `Discovery` client with the DEFAULT_SERVICE_NAME
+ * and the specified Authenticator.
*
- * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
- * will keep your API calls from failing when the service introduces breaking changes.
+ * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
+ * calls from failing when the service introduces breaking changes.
* @param authenticator the Authenticator instance to be configured for this service
*/
public Discovery(String versionDate, Authenticator authenticator) {
@@ -94,8 +112,8 @@ public Discovery(String versionDate, Authenticator authenticator) {
/**
* Constructs a new `Discovery` client with the specified serviceName.
*
- * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
- * will keep your API calls from failing when the service introduces breaking changes.
+ * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
+ * calls from failing when the service introduces breaking changes.
* @param serviceName The name of the service to configure.
*/
public Discovery(String versionDate, String serviceName) {
@@ -103,17 +121,18 @@ public Discovery(String versionDate, String serviceName) {
}
/**
- * Constructs a new `Discovery` client with the specified Authenticator and serviceName.
+ * Constructs a new `Discovery` client with the specified Authenticator
+ * and serviceName.
*
- * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
- * will keep your API calls from failing when the service introduces breaking changes.
+ * @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
+ * calls from failing when the service introduces breaking changes.
* @param serviceName The name of the service to configure.
* @param authenticator the Authenticator instance to be configured for this service
*/
public Discovery(String versionDate, String serviceName, Authenticator authenticator) {
super(serviceName, authenticator);
- com.ibm.cloud.sdk.core.util.Validator.isTrue(
- (versionDate != null) && !versionDate.isEmpty(), "version cannot be null.");
+ setServiceUrl(DEFAULT_SERVICE_URL);
+ com.ibm.cloud.sdk.core.util.Validator.isTrue((versionDate != null) && !versionDate.isEmpty(), "version cannot be null.");
this.versionDate = versionDate;
this.configureService(serviceName);
}
@@ -121,21 +140,17 @@ public Discovery(String versionDate, String serviceName, Authenticator authentic
/**
* List collections.
*
- * Lists existing collections for the specified project.
+ * Lists existing collections for the specified project.
*
- * @param listCollectionsOptions the {@link ListCollectionsOptions} containing the options for the
- * call
+ * @param listCollectionsOptions the {@link ListCollectionsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ListCollectionsResponse}
*/
- public ServiceCall By using this method, you can construct queries. For details, see the [Discovery
- * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts).
+ * By using this method, you can construct queries. For details, see the [Discovery
+ * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts). The default query
+ * parameters are defined by the settings for this project, see the [Discovery
+ * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-project-defaults) for an overview of
+ * the standard default settings, and see [the Projects API documentation](#create-project) for details about how to
+ * set custom default query settings.
*
* @param queryOptions the {@link QueryOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link QueryResponse}
*/
public ServiceCall Returns completion query suggestions for the specified prefix.
+ * Returns completion query suggestions for the specified prefix.
*
- * @param getAutocompletionOptions the {@link GetAutocompletionOptions} containing the options for
- * the call
+ * @param getAutocompletionOptions the {@link GetAutocompletionOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Completions}
*/
- public ServiceCall Queries for notices (errors or warnings) that might have been generated by the system.
- * Notices are generated when ingesting documents and performing relevance training.
+ * Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when
+ * ingesting documents and performing relevance training.
*
* @param queryNoticesOptions the {@link QueryNoticesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link QueryNoticesResponse}
*/
public ServiceCall Gets a list of the unique fields (and their types) stored in the the specified collections.
+ * Gets a list of the unique fields (and their types) stored in the the specified collections.
*
* @param listFieldsOptions the {@link ListFieldsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ListFieldsResponse}
*/
public ServiceCall Returns default configuration settings for components.
+ * Returns default configuration settings for components.
*
- * @param getComponentSettingsOptions the {@link GetComponentSettingsOptions} containing the
- * options for the call
+ * @param getComponentSettingsOptions the {@link GetComponentSettingsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ComponentSettingsResponse}
*/
- public ServiceCall Add a document to a collection with optional metadata.
+ * Add a document to a collection with optional metadata.
*
- * Returns immediately after the system has accepted the document for processing.
+ * Returns immediately after the system has accepted the document for processing.
*
- * * The user must provide document content, metadata, or both. If the request is missing both
- * document content and metadata, it is rejected.
+ * * The user must provide document content, metadata, or both. If the request is missing both document content and
+ * metadata, it is rejected.
*
- * * The user can set the **Content-Type** parameter on the **file** part to indicate the media
- * type of the document. If the **Content-Type** parameter is missing or is one of the generic
- * media types (for example, `application/octet-stream`), then the service attempts to
- * automatically detect the document's media type.
+ * * The user can set the **Content-Type** parameter on the **file** part to indicate the media type of the
+ * document. If the **Content-Type** parameter is missing or is one of the generic media types (for example,
+ * `application/octet-stream`), then the service attempts to automatically detect the document's media type.
*
- * * The following field names are reserved and will be filtered out if present after
- * normalization: `id`, `score`, `highlight`, and any field with the prefix of: `_`, `+`, or `-`
+ * * The following field names are reserved and will be filtered out if present after normalization: `id`, `score`,
+ * `highlight`, and any field with the prefix of: `_`, `+`, or `-`
*
- * * Fields with empty name values after normalization are filtered out before indexing.
+ * * Fields with empty name values after normalization are filtered out before indexing.
*
- * * Fields containing the following characters after normalization are filtered out before
- * indexing: `#` and `,`
+ * * Fields containing the following characters after normalization are filtered out before indexing: `#` and `,`
*
- * If the document is uploaded to a collection that has it's data shared with another
- * collection, the **X-Watson-Discovery-Force** header must be set to `true`.
+ * If the document is uploaded to a collection that has it's data shared with another collection, the
+ * **X-Watson-Discovery-Force** header must be set to `true`.
*
- * **Note:** Documents can be added with a specific **document_id** by using the
+ * **Note:** Documents can be added with a specific **document_id** by using the
* **_/v2/projects/{project_id}/collections/{collection_id}/documents** method.
*
- * **Note:** This operation only works on collections created to accept direct file uploads. It
- * cannot be used to modify a collection that connects to an external source such as Microsoft
- * SharePoint.
+ * **Note:** This operation only works on collections created to accept direct file uploads. It cannot be used to
+ * modify a collection that connects to an external source such as Microsoft SharePoint.
*
* @param addDocumentOptions the {@link AddDocumentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link DocumentAccepted}
*/
public ServiceCall Replace an existing document or add a document with a specified **document_id**. Starts
- * ingesting a document with optional metadata.
+ * Replace an existing document or add a document with a specified **document_id**. Starts ingesting a document with
+ * optional metadata.
*
- * If the document is uploaded to a collection that has it's data shared with another
- * collection, the **X-Watson-Discovery-Force** header must be set to `true`.
+ * If the document is uploaded to a collection that has it's data shared with another collection, the
+ * **X-Watson-Discovery-Force** header must be set to `true`.
*
- * **Note:** When uploading a new document with this method it automatically replaces any
- * document stored with the same **document_id** if it exists.
+ * **Note:** When uploading a new document with this method it automatically replaces any document stored with the
+ * same **document_id** if it exists.
*
- * **Note:** This operation only works on collections created to accept direct file uploads. It
- * cannot be used to modify a collection that connects to an external source such as Microsoft
- * SharePoint.
+ * **Note:** This operation only works on collections created to accept direct file uploads. It cannot be used to
+ * modify a collection that connects to an external source such as Microsoft SharePoint.
*
- * **Note:** If an uploaded document is segmented, all segments will be overwritten, even if
- * the updated version of the document has fewer segments.
+ * **Note:** If an uploaded document is segmented, all segments will be overwritten, even if the updated version of
+ * the document has fewer segments.
*
- * @param updateDocumentOptions the {@link UpdateDocumentOptions} containing the options for the
- * call
+ * @param updateDocumentOptions the {@link UpdateDocumentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link DocumentAccepted}
*/
public ServiceCall If the given document ID is invalid, or if the document is not found, then the a success
- * response is returned (HTTP status code `200`) with the status set to 'deleted'.
+ * If the given document ID is invalid, or if the document is not found, then the a success response is returned (HTTP
+ * status code `200`) with the status set to 'deleted'.
*
- * **Note:** This operation only works on collections created to accept direct file uploads. It
- * cannot be used to modify a collection that connects to an external source such as Microsoft
- * SharePoint.
+ * **Note:** This operation only works on collections created to accept direct file uploads. It cannot be used to
+ * modify a collection that connects to an external source such as Microsoft SharePoint.
*
- * **Note:** Segments of an uploaded document cannot be deleted individually. Delete all
- * segments by deleting using the `parent_document_id` of a segment result.
+ * **Note:** Segments of an uploaded document cannot be deleted individually. Delete all segments by deleting using
+ * the `parent_document_id` of a segment result.
*
- * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the
- * call
+ * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link DeleteDocumentResponse}
*/
- public ServiceCall List the training queries for the specified project.
+ * List the training queries for the specified project.
*
- * @param listTrainingQueriesOptions the {@link ListTrainingQueriesOptions} containing the options
- * for the call
+ * @param listTrainingQueriesOptions the {@link ListTrainingQueriesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link TrainingQuerySet}
*/
- public ServiceCall Removes all training queries for the specified project.
+ * Removes all training queries for the specified project.
*
- * @param deleteTrainingQueriesOptions the {@link DeleteTrainingQueriesOptions} containing the
- * options for the call
+ * @param deleteTrainingQueriesOptions the {@link DeleteTrainingQueriesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of Void
*/
- public ServiceCall Add a query to the training data for this project. The query can contain a filter and
- * natural language query.
+ * Add a query to the training data for this project. The query can contain a filter and natural language query.
*
- * @param createTrainingQueryOptions the {@link CreateTrainingQueryOptions} containing the options
- * for the call
+ * @param createTrainingQueryOptions the {@link CreateTrainingQueryOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link TrainingQuery}
*/
- public ServiceCall Get details for a specific training data query, including the query string and all examples.
+ * Get details for a specific training data query, including the query string and all examples.
*
- * @param getTrainingQueryOptions the {@link GetTrainingQueryOptions} containing the options for
- * the call
+ * @param getTrainingQueryOptions the {@link GetTrainingQueryOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link TrainingQuery}
*/
- public ServiceCall