public class MessageResponse extends GenericModel
ConversationService.message(String, MessageRequest).| Constructor and Description |
|---|
MessageResponse() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getContext()
Returns the context as returned by the service.
|
List<Entity> |
getEntities()
Returns the list of entities as detected by the service.
|
Map<String,Object> |
getInput()
Gets the input.
|
String |
getInputText()
Gets the input text.
|
List<Intent> |
getIntents()
Returns the list of intents as detected by the service.
|
Map<String,Object> |
getOutput()
Returns the output as returned by the service, may be null.
|
List<String> |
getText()
A convenience method for getting the text property from the output object.
|
String |
getTextConcatenated(String separator)
A convenience method for getting the text property from the output object.
|
void |
setContext(Map<String,Object> context)
Sets the context as determined by the service.
|
void |
setEntities(List<Entity> entities)
Sets a list of entities as detected by the service.
|
void |
setInput(Map<String,Object> input)
Sets the input.
|
void |
setIntents(List<Intent> intents)
Sets a list of intents as detected by the service.
|
void |
setOutput(Map<String,Object> output)
Sets the output as returned by the service.
|
equals, hashCode, toStringpublic Map<String,Object> getContext()
public List<Entity> getEntities()
Entity objectspublic List<Intent> getIntents()
Intent objects.public Map<String,Object> getOutput()
public void setContext(Map<String,Object> context)
context - a map of key value pairspublic void setEntities(List<Entity> entities)
entities - an array of entitiespublic void setIntents(List<Intent> intents)
intents - an array of intentspublic void setOutput(Map<String,Object> output)
output - a map of outputs as defined by the conversation designerpublic List<String> getText()
List<?> text = null;
Map<String, Object> output = response.getOutput();
if (output != null) {
text = (List<?>) output.get("text");
}
public String getTextConcatenated(String separator)
separator - the separatorpublic void setInput(Map<String,Object> input)
input - the inputpublic String getInputText()
Copyright © 2015–2016 IBM Watson. All rights reserved.