public class Response extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Response(PostContentResult result)
Uses the service response to create an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getAudioResponse()
Returns a stream containing audio response from the service.
|
String |
getContentType()
The response type from Amazon Lex service.
|
String |
getDialogState()
Returns the dialog state.
|
String |
getInputTranscript()
Transcript of the voice input to the operation.
|
String |
getIntentName() |
Map<String,String> |
getSessionAttributes()
Returns session attributes.
|
Map<String,String> |
getSlots()
Returns a Map of key value pair of the slots which are filled.
|
String |
getSlotToIllicit()
Returns the name of the slot which is required from the user.
|
String |
getTextResponse()
Returns a text response from the service.
|
protected Response(PostContentResult result)
result - response from the service.public String getDialogState()
DialogState.Failed: Amazon Lex
service is unable to continue with the current transaction. The text
response and audio response, if available, will have further details.
DialogState.Fulfilled: Amazon
Lex service was able to successfully complete the current transaction.
The text response and audio response, if available, will have further
details.
DialogState.ReadyForFulfillment
: Amazon Lex service has all the details (read intent and all associated
slots) to fulfill the current transaction. However the transaction was
not fulfilled because the means for fulfillment was not set or client
side fulfillment was requested. Use getIntentName() for
the intent identified by the service.
getSessionAttributes() will contain the slots for
fulfillment.
DialogState.ConfirmIntent,
DialogState.ElicitIntent,
com.amazonaws.services.lexrts.model.DialogState#ElicitParameter:
Amazon Lex requires further input from the user to continue with this
transaction. The intent - getIntentName(), parameter -
Response#getParameterToIllicit(), will provide more context.
String.public Map<String,String> getSessionAttributes()
Map.public InputStream getAudioResponse()
getContentType().InputStream.public String getTextResponse()
String.public String getSlotToIllicit()
getDialogState() for context.String.public String getContentType()
public String getIntentName()
public Map<String,String> getSlots()
public String getInputTranscript()
Copyright © 2018. All rights reserved.