public class ConversationService extends WatsonService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION_DATE_2016_07_11
The Constant VERSION_DATE_2016-07-11.
|
static java.lang.String |
VERSION_DATE_2016_09_20
The Constant VERSION_DATE_2016-09-20.
|
static java.lang.String |
VERSION_DATE_2017_02_03
The Constant VERSION_DATE_2017-02-03.
|
static java.lang.String |
VERSION_DATE_2017_04_21
The Constant VERSION_DATE_2017-04-21.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
ConversationService(java.lang.String versionDate)
Returns an instance of the Conversation Service using the service's default endpoint (URL).
|
ConversationService(java.lang.String versionDate,
java.lang.String username,
java.lang.String password)
Returns an instance of the Conversation Service using the service's default endpoint (URL), username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<ExampleResponse> |
createCounterexample(java.lang.String workspaceId,
java.lang.String text)
Create counterexample.
|
ServiceCall<EntityResponse> |
createEntity(CreateEntityOptions createEntityOptions)
Create entity.
|
ServiceCall<ExampleResponse> |
createExample(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String text)
Create user input example.
|
ServiceCall<IntentResponse> |
createIntent(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String description,
java.util.List<CreateExample> examples)
Create intent.
|
ServiceCall<SynonymResponse> |
createSynonym(CreateSynonymOptions createSynonymOptions)
Add entity value synonym.
|
ServiceCall<ValueResponse> |
createValue(CreateValueOptions createValueOptions)
Add entity value.
|
ServiceCall<WorkspaceResponse> |
createWorkspace(CreateWorkspace body)
Create workspace.
|
ServiceCall<java.lang.Void> |
deleteCounterexample(java.lang.String workspaceId,
java.lang.String text)
Delete counterexample.
|
ServiceCall<java.lang.Void> |
deleteEntity(DeleteEntityOptions deleteEntityOptions)
Delete entity.
|
ServiceCall<java.lang.Void> |
deleteExample(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String text)
Delete user input example.
|
ServiceCall<java.lang.Void> |
deleteIntent(java.lang.String workspaceId,
java.lang.String intent)
Delete intent.
|
ServiceCall<java.lang.Void> |
deleteSynonym(DeleteSynonymOptions deleteSynonymOptions)
Delete entity value synonym.
|
ServiceCall<java.lang.Void> |
deleteValue(DeleteValueOptions deleteValueOptions)
Delete entity value.
|
ServiceCall<java.lang.Void> |
deleteWorkspace(java.lang.String workspaceId)
Delete workspace.
|
ServiceCall<ExampleResponse> |
getCounterexample(java.lang.String workspaceId,
java.lang.String text)
Get counterexample.
|
ServiceCall<EntityExportResponse> |
getEntity(GetEntityOptions getEntityOptions)
Get entity.
|
ServiceCall<ExampleResponse> |
getExample(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String text)
Get user input example.
|
ServiceCall<IntentExportResponse> |
getIntent(java.lang.String workspaceId,
java.lang.String intent,
java.lang.Boolean export)
Get intent.
|
ServiceCall<SynonymResponse> |
getSynonym(GetSynonymOptions getSynonymOptions)
Get entity value synonym.
|
ServiceCall<ValueExportResponse> |
getValue(GetValueOptions getValueOptions)
Get entity value.
|
ServiceCall<WorkspaceExportResponse> |
getWorkspace(java.lang.String workspaceId,
java.lang.Boolean export)
Get information about a workspace.
|
ServiceCall<CounterexampleCollectionResponse> |
listCounterexamples(java.lang.String workspaceId,
java.lang.Long pageLimit,
java.lang.Boolean includeCount,
java.lang.String sort,
java.lang.String cursor)
List counterexamples.
|
ServiceCall<EntityCollectionResponse> |
listEntities(ListEntitiesOptions listEntitiesOptions)
List entities.
|
ServiceCall<ExampleCollectionResponse> |
listExamples(java.lang.String workspaceId,
java.lang.String intent,
java.lang.Long pageLimit,
java.lang.Boolean includeCount,
java.lang.String sort,
java.lang.String cursor)
List user input examples.
|
ServiceCall<IntentCollectionResponse> |
listIntents(java.lang.String workspaceId,
java.lang.Boolean export,
java.lang.Long pageLimit,
java.lang.Boolean includeCount,
java.lang.String sort,
java.lang.String cursor)
List intents.
|
ServiceCall<LogCollectionResponse> |
listLogs(ListLogsOptions listLogsOptions)
List log events.
|
ServiceCall<SynonymCollectionResponse> |
listSynonyms(ListSynonymsOptions listSynonymsOptions)
List entity value synonyms.
|
ServiceCall<ValueCollectionResponse> |
listValues(ListValuesOptions listValuesOptions)
List entity values.
|
ServiceCall<WorkspaceCollectionResponse> |
listWorkspaces(java.lang.Long pageLimit,
java.lang.Boolean includeCount,
java.lang.String sort,
java.lang.String cursor)
List workspaces.
|
ServiceCall<MessageResponse> |
message(java.lang.String workspaceId,
MessageRequest request)
Sends a message to the service through a
MessageRequest . |
ServiceCall<ExampleResponse> |
updateCounterexample(java.lang.String workspaceId,
java.lang.String text,
java.lang.String newText)
Update counterexample.
|
ServiceCall<EntityResponse> |
updateEntity(UpdateEntityOptions updateEntityOptions)
Update entity.
|
ServiceCall<ExampleResponse> |
updateExample(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String text,
java.lang.String newText)
Update user input example.
|
ServiceCall<IntentResponse> |
updateIntent(java.lang.String workspaceId,
java.lang.String intent,
java.lang.String newIntent,
java.lang.String newDescription,
java.util.List<CreateExample> newExamples)
Update intent.
|
ServiceCall<SynonymResponse> |
updateSynonym(UpdateSynonymOptions updateSynonymOptions)
Update entity value synonym.
|
ServiceCall<ValueResponse> |
updateValue(UpdateValueOptions updateValueOptions)
Update entity value.
|
ServiceCall<WorkspaceResponse> |
updateWorkspace(java.lang.String workspaceId,
UpdateWorkspace body)
Update workspace.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public static final java.lang.String VERSION_DATE_2017_04_21
public static final java.lang.String VERSION_DATE_2017_02_03
public static final java.lang.String VERSION_DATE_2016_09_20
public static final java.lang.String VERSION_DATE_2016_07_11
public ConversationService(java.lang.String versionDate)
versionDate
- Version of the API which is to be invoked by the REST client.public ConversationService(java.lang.String versionDate, java.lang.String username, java.lang.String password)
versionDate
- Version of the API which is to be invoked by the REST client.username
- the usernamepassword
- the passwordpublic ServiceCall<MessageResponse> message(java.lang.String workspaceId, MessageRequest request)
MessageRequest
.workspaceId
- the workspace idrequest
- the requestpublic ServiceCall<ExampleResponse> createCounterexample(java.lang.String workspaceId, java.lang.String text)
workspaceId
- The workspace ID.text
- The text of a user input example.ExampleResponse
with the responsepublic ServiceCall<java.lang.Void> deleteCounterexample(java.lang.String workspaceId, java.lang.String text)
workspaceId
- The workspace ID.text
- The text of a user input counterexample (for example, `What are you wearing?`).public ServiceCall<ExampleResponse> getCounterexample(java.lang.String workspaceId, java.lang.String text)
workspaceId
- The workspace ID.text
- The text of a user input counterexample (for example, `What are you wearing?`).ExampleResponse
with the responsepublic ServiceCall<CounterexampleCollectionResponse> listCounterexamples(java.lang.String workspaceId, java.lang.Long pageLimit, java.lang.Boolean includeCount, java.lang.String sort, java.lang.String cursor)
workspaceId
- The workspace ID.pageLimit
- The number of records to return in each page of results. The default page limit is 100.includeCount
- Whether to include information about the number of records returned.sort
- The sort order that determines the behavior of the pagination cursor.cursor
- A token identifying the last value from the previous page of results.CounterexampleCollectionResponse
with the responsepublic ServiceCall<ExampleResponse> updateCounterexample(java.lang.String workspaceId, java.lang.String text, java.lang.String newText)
workspaceId
- The workspace ID.text
- The text of a user input counterexample (for example, `What are you wearing?`).newText
- The text of the user input example.ExampleResponse
with the responsepublic ServiceCall<ExampleResponse> createExample(java.lang.String workspaceId, java.lang.String intent, java.lang.String text)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).text
- The text of a user input example.ExampleResponse
with the responsepublic ServiceCall<java.lang.Void> deleteExample(java.lang.String workspaceId, java.lang.String intent, java.lang.String text)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).text
- The text of the user input example.public ServiceCall<ExampleResponse> getExample(java.lang.String workspaceId, java.lang.String intent, java.lang.String text)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).text
- The text of the user input example.ExampleResponse
with the responsepublic ServiceCall<ExampleCollectionResponse> listExamples(java.lang.String workspaceId, java.lang.String intent, java.lang.Long pageLimit, java.lang.Boolean includeCount, java.lang.String sort, java.lang.String cursor)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).pageLimit
- The number of records to return in each page of results. The default page limit is 100.includeCount
- Whether to include information about the number of records returned.sort
- The sort order that determines the behavior of the pagination cursor.cursor
- A token identifying the last value from the previous page of results.ExampleCollectionResponse
with the responsepublic ServiceCall<ExampleResponse> updateExample(java.lang.String workspaceId, java.lang.String intent, java.lang.String text, java.lang.String newText)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).text
- The text of the user input example.newText
- The text of the user input example.ExampleResponse
with the responsepublic ServiceCall<IntentResponse> createIntent(java.lang.String workspaceId, java.lang.String intent, java.lang.String description, java.util.List<CreateExample> examples)
workspaceId
- The workspace ID.intent
- The name of the intent.description
- The description of the intent.examples
- An array of user input examples.IntentResponse
with the responsepublic ServiceCall<java.lang.Void> deleteIntent(java.lang.String workspaceId, java.lang.String intent)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).public ServiceCall<IntentExportResponse> getIntent(java.lang.String workspaceId, java.lang.String intent, java.lang.Boolean export)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).export
- Whether to include all element content in the returned data. If export=`false`, the returned
data includes only information about the element itself. If export=`true`, all content,
including subelements, is included. The default value is `false`.IntentExportResponse
with the responsepublic ServiceCall<IntentCollectionResponse> listIntents(java.lang.String workspaceId, java.lang.Boolean export, java.lang.Long pageLimit, java.lang.Boolean includeCount, java.lang.String sort, java.lang.String cursor)
workspaceId
- The workspace ID.export
- Whether to include all element content in the returned data. If export=`false`, the returned
data includes only information about the element itself. If export=`true`, all content,
including subelements, is included. The default value is `false`.pageLimit
- The number of records to return in each page of results. The default page limit is 100.includeCount
- Whether to include information about the number of records returned.sort
- The sort order that determines the behavior of the pagination cursor.cursor
- A token identifying the last value from the previous page of results.IntentCollectionResponse
with the responsepublic ServiceCall<IntentResponse> updateIntent(java.lang.String workspaceId, java.lang.String intent, java.lang.String newIntent, java.lang.String newDescription, java.util.List<CreateExample> newExamples)
workspaceId
- The workspace ID.intent
- The intent name (for example, `pizza_order`).newIntent
- The name of the intent.newDescription
- The description of the intent.newExamples
- An array of user input examples for the intent.IntentResponse
with the responsepublic ServiceCall<WorkspaceResponse> createWorkspace(CreateWorkspace body)
body
- Valid JSON data defining the content of the new workspace.WorkspaceResponse
with the responsepublic ServiceCall<java.lang.Void> deleteWorkspace(java.lang.String workspaceId)
workspaceId
- The workspace ID.public ServiceCall<WorkspaceExportResponse> getWorkspace(java.lang.String workspaceId, java.lang.Boolean export)
workspaceId
- The workspace ID.export
- Whether to include all element content in the returned data. If export=`false`, the returned
data includes only information about the element itself. If export=`true`, all content,
including subelements, is included. The default value is `false`.WorkspaceExportResponse
with the responsepublic ServiceCall<WorkspaceCollectionResponse> listWorkspaces(java.lang.Long pageLimit, java.lang.Boolean includeCount, java.lang.String sort, java.lang.String cursor)
pageLimit
- The number of records to return in each page of results. The default page limit is 100.includeCount
- Whether to include information about the number of records returned.sort
- The sort order that determines the behavior of the pagination cursor.cursor
- A token identifying the last value from the previous page of results.WorkspaceCollectionResponse
with the responsepublic ServiceCall<WorkspaceResponse> updateWorkspace(java.lang.String workspaceId, UpdateWorkspace body)
workspaceId
- The workspace ID.body
- Valid JSON data defining the new workspace content. Any elements included in the new JSON
will completely replace the existing elements, including all subelements. Previously existing
subelements are not retained unless they are included in the new JSON.WorkspaceResponse
with the responsepublic ServiceCall<EntityResponse> createEntity(CreateEntityOptions createEntityOptions)
createEntityOptions
- the CreateEntityOptions
containing the options for the callEntityResponse
with the responsepublic ServiceCall<java.lang.Void> deleteEntity(DeleteEntityOptions deleteEntityOptions)
deleteEntityOptions
- the DeleteEntityOptions
containing the options for the callpublic ServiceCall<EntityExportResponse> getEntity(GetEntityOptions getEntityOptions)
getEntityOptions
- the GetEntityOptions
containing the options for the callEntityExportResponse
with the responsepublic ServiceCall<EntityCollectionResponse> listEntities(ListEntitiesOptions listEntitiesOptions)
listEntitiesOptions
- the ListEntitiesOptions
containing the options for the callEntityCollectionResponse
with the responsepublic ServiceCall<EntityResponse> updateEntity(UpdateEntityOptions updateEntityOptions)
updateEntityOptions
- the UpdateEntityOptions
containing the options for the callEntityResponse
with the responsepublic ServiceCall<LogCollectionResponse> listLogs(ListLogsOptions listLogsOptions)
listLogsOptions
- the ListLogsOptions
containing the options for the callLogCollectionResponse
with the responsepublic ServiceCall<SynonymResponse> createSynonym(CreateSynonymOptions createSynonymOptions)
createSynonymOptions
- the CreateSynonymOptions
containing the options for the callSynonymResponse
with the responsepublic ServiceCall<java.lang.Void> deleteSynonym(DeleteSynonymOptions deleteSynonymOptions)
deleteSynonymOptions
- the DeleteSynonymOptions
containing the options for the callpublic ServiceCall<SynonymResponse> getSynonym(GetSynonymOptions getSynonymOptions)
getSynonymOptions
- the GetSynonymOptions
containing the options for the callSynonymResponse
with the responsepublic ServiceCall<SynonymCollectionResponse> listSynonyms(ListSynonymsOptions listSynonymsOptions)
listSynonymsOptions
- the ListSynonymsOptions
containing the options for the callSynonymCollectionResponse
with the responsepublic ServiceCall<SynonymResponse> updateSynonym(UpdateSynonymOptions updateSynonymOptions)
updateSynonymOptions
- the UpdateSynonymOptions
containing the options for the callSynonymResponse
with the responsepublic ServiceCall<ValueResponse> createValue(CreateValueOptions createValueOptions)
createValueOptions
- the CreateValueOptions
containing the options for the callValueResponse
with the responsepublic ServiceCall<java.lang.Void> deleteValue(DeleteValueOptions deleteValueOptions)
deleteValueOptions
- the DeleteValueOptions
containing the options for the callpublic ServiceCall<ValueExportResponse> getValue(GetValueOptions getValueOptions)
getValueOptions
- the GetValueOptions
containing the options for the callValueExportResponse
with the responsepublic ServiceCall<ValueCollectionResponse> listValues(ListValuesOptions listValuesOptions)
listValuesOptions
- the ListValuesOptions
containing the options for the callValueCollectionResponse
with the responsepublic ServiceCall<ValueResponse> updateValue(UpdateValueOptions updateValueOptions)
updateValueOptions
- the UpdateValueOptions
containing the options for the callValueResponse
with the response