public class Response
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getAudioResponse()
Returns a stream containing audio response from the service.
|
java.lang.String |
getContentType()
The response type from Amazon Lex service.
|
java.lang.String |
getDialogState()
Returns the dialog state.
|
java.lang.String |
getInputTranscript()
Transcript of the voice input to the operation.
|
java.lang.String |
getIntentName() |
java.util.Map<java.lang.String,java.lang.String> |
getSessionAttributes()
Returns session attributes.
|
java.util.Map<java.lang.String,java.lang.String> |
getSlots()
Returns a Map of key value pair of the slots which are filled.
|
java.lang.String |
getSlotToIllicit()
Returns the name of the slot which is required from the user.
|
java.lang.String |
getTextResponse()
Returns a text response from the service.
|
public java.lang.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 java.util.Map<java.lang.String,java.lang.String> getSessionAttributes()
Map
.public java.io.InputStream getAudioResponse()
getContentType()
.InputStream
.public java.lang.String getTextResponse()
String
.public java.lang.String getSlotToIllicit()
getDialogState()
for context.String
.public java.lang.String getContentType()
public java.lang.String getIntentName()
public java.util.Map<java.lang.String,java.lang.String> getSlots()
public java.lang.String getInputTranscript()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.