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