@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PostTextResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
Constructor and Description |
---|
PostTextResult() |
Modifier and Type | Method and Description |
---|---|
PostTextResult |
addSessionAttributesEntry(String key,
String value) |
PostTextResult |
addSlotsEntry(String key,
String value) |
PostTextResult |
clearSessionAttributesEntries()
Removes all the entries added into SessionAttributes.
|
PostTextResult |
clearSlotsEntries()
Removes all the entries added into Slots.
|
PostTextResult |
clone() |
boolean |
equals(Object obj) |
String |
getDialogState()
Represents the message type to be conveyed to the user.
|
String |
getIntentName()
Intent Amazon Lex inferred from the user input text.
|
String |
getMessage()
Prompt (or statement) to convey to the user.
|
ResponseCard |
getResponseCard()
Represents the options that the user has to respond to the current prompt.
|
Map<String,String> |
getSessionAttributes()
Map of key value pairs representing the session specific context information.
|
Map<String,String> |
getSlots()
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
|
String |
getSlotToElicit()
If
dialogState value is ElicitSlot , returns the name of the slot for which Amazon Lex
is eliciting a value. |
int |
hashCode() |
void |
setDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user.
|
void |
setDialogState(String dialogState)
Represents the message type to be conveyed to the user.
|
void |
setIntentName(String intentName)
Intent Amazon Lex inferred from the user input text.
|
void |
setMessage(String message)
Prompt (or statement) to convey to the user.
|
void |
setResponseCard(ResponseCard responseCard)
Represents the options that the user has to respond to the current prompt.
|
void |
setSessionAttributes(Map<String,String> sessionAttributes)
Map of key value pairs representing the session specific context information.
|
void |
setSlots(Map<String,String> slots)
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
|
void |
setSlotToElicit(String slotToElicit)
If
dialogState value is ElicitSlot , returns the name of the slot for which Amazon Lex
is eliciting a value. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
PostTextResult |
withDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user.
|
PostTextResult |
withDialogState(String dialogState)
Represents the message type to be conveyed to the user.
|
PostTextResult |
withIntentName(String intentName)
Intent Amazon Lex inferred from the user input text.
|
PostTextResult |
withMessage(String message)
Prompt (or statement) to convey to the user.
|
PostTextResult |
withResponseCard(ResponseCard responseCard)
Represents the options that the user has to respond to the current prompt.
|
PostTextResult |
withSessionAttributes(Map<String,String> sessionAttributes)
Map of key value pairs representing the session specific context information.
|
PostTextResult |
withSlots(Map<String,String> slots)
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
|
PostTextResult |
withSlotToElicit(String slotToElicit)
If
dialogState value is ElicitSlot , returns the name of the slot for which Amazon Lex
is eliciting a value. |
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadata
public void setIntentName(String intentName)
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
intentName
- Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.public String getIntentName()
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
public PostTextResult withIntentName(String intentName)
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
intentName
- Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.public Map<String,String> getSlots()
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
public void setSlots(Map<String,String> slots)
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
slots
- Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.public PostTextResult withSlots(Map<String,String> slots)
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
slots
- Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.public PostTextResult addSlotsEntry(String key, String value)
public PostTextResult clearSlotsEntries()
public Map<String,String> getSessionAttributes()
Map of key value pairs representing the session specific context information.
public void setSessionAttributes(Map<String,String> sessionAttributes)
Map of key value pairs representing the session specific context information.
sessionAttributes
- Map of key value pairs representing the session specific context information.public PostTextResult withSessionAttributes(Map<String,String> sessionAttributes)
Map of key value pairs representing the session specific context information.
sessionAttributes
- Map of key value pairs representing the session specific context information.public PostTextResult addSessionAttributesEntry(String key, String value)
public PostTextResult clearSessionAttributesEntries()
public void setMessage(String message)
Prompt (or statement) to convey to the user. This is based on the application configuration and context. For
example, if Amazon Lex did not understand the user intent, it sends the clarificationPrompt
configured for the application. In another example, if the intent requires confirmation before taking the
fulfillment action, it sends the confirmationPrompt
. Suppose the Lambda function successfully
fulfilled the intent, and sent a message to convey to the user. In that situation, Amazon Lex sends that message
in the response.
message
- Prompt (or statement) to convey to the user. This is based on the application configuration and context.
For example, if Amazon Lex did not understand the user intent, it sends the
clarificationPrompt
configured for the application. In another example, if the intent
requires confirmation before taking the fulfillment action, it sends the confirmationPrompt
.
Suppose the Lambda function successfully fulfilled the intent, and sent a message to convey to the user.
In that situation, Amazon Lex sends that message in the response.public String getMessage()
Prompt (or statement) to convey to the user. This is based on the application configuration and context. For
example, if Amazon Lex did not understand the user intent, it sends the clarificationPrompt
configured for the application. In another example, if the intent requires confirmation before taking the
fulfillment action, it sends the confirmationPrompt
. Suppose the Lambda function successfully
fulfilled the intent, and sent a message to convey to the user. In that situation, Amazon Lex sends that message
in the response.
clarificationPrompt
configured for the application. In another example, if the intent
requires confirmation before taking the fulfillment action, it sends the confirmationPrompt
.
Suppose the Lambda function successfully fulfilled the intent, and sent a message to convey to the user.
In that situation, Amazon Lex sends that message in the response.public PostTextResult withMessage(String message)
Prompt (or statement) to convey to the user. This is based on the application configuration and context. For
example, if Amazon Lex did not understand the user intent, it sends the clarificationPrompt
configured for the application. In another example, if the intent requires confirmation before taking the
fulfillment action, it sends the confirmationPrompt
. Suppose the Lambda function successfully
fulfilled the intent, and sent a message to convey to the user. In that situation, Amazon Lex sends that message
in the response.
message
- Prompt (or statement) to convey to the user. This is based on the application configuration and context.
For example, if Amazon Lex did not understand the user intent, it sends the
clarificationPrompt
configured for the application. In another example, if the intent
requires confirmation before taking the fulfillment action, it sends the confirmationPrompt
.
Suppose the Lambda function successfully fulfilled the intent, and sent a message to convey to the user.
In that situation, Amazon Lex sends that message in the response.public void setDialogState(String dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not understand
the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If Amazon Lex
doesn't understand the intent, it returns this dialogState
. Another example is when your intent is
configured with a follow up prompt. For example, after OrderPizza intent is fulfilled, the intent might have a
follow up prompt such as " Do you want to order a drink or desert?" In this case, Amazon Lex returns this
dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to go
ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no reply,
the user might provide a response with additional slot information (either new slot information or changes to the
existing slot values). For example, "Yes, but change to thick crust." Amazon Lex understands the additional
information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example, suppose
Amazon Lex asks, "What size pizza would you like?" A user might reply with "Medium pepperoni pizza." Amazon Lex
recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to the
client. If not, Amazon Lex looks for conclusionStatement
that you configured for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent. This is
the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this dialogState
are: after the configured number of attempts the user didn't provide an appropriate response, or the Lambda
function failed to fulfill an intent.
dialogState
- Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not
understand the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If
Amazon Lex doesn't understand the intent, it returns this dialogState
. Another example is
when your intent is configured with a follow up prompt. For example, after OrderPizza intent is fulfilled,
the intent might have a follow up prompt such as " Do you want to order a drink or desert?" In this case,
Amazon Lex returns this dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to
go ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no
reply, the user might provide a response with additional slot information (either new slot information or
changes to the existing slot values). For example, "Yes, but change to thick crust." Amazon Lex
understands the additional information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example,
suppose Amazon Lex asks, "What size pizza would you like?" A user might reply with
"Medium pepperoni pizza." Amazon Lex recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to
the client. If not, Amazon Lex looks for conclusionStatement
that you configured for the
intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent.
This is the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this
dialogState
are: after the configured number of attempts the user didn't provide an
appropriate response, or the Lambda function failed to fulfill an intent.
DialogState
public String getDialogState()
Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not understand
the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If Amazon Lex
doesn't understand the intent, it returns this dialogState
. Another example is when your intent is
configured with a follow up prompt. For example, after OrderPizza intent is fulfilled, the intent might have a
follow up prompt such as " Do you want to order a drink or desert?" In this case, Amazon Lex returns this
dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to go
ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no reply,
the user might provide a response with additional slot information (either new slot information or changes to the
existing slot values). For example, "Yes, but change to thick crust." Amazon Lex understands the additional
information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example, suppose
Amazon Lex asks, "What size pizza would you like?" A user might reply with "Medium pepperoni pizza." Amazon Lex
recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to the
client. If not, Amazon Lex looks for conclusionStatement
that you configured for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent. This is
the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this dialogState
are: after the configured number of attempts the user didn't provide an appropriate response, or the Lambda
function failed to fulfill an intent.
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not
understand the first utterances such as "I want to order pizza", which indicates the OrderPizza intent.
If Amazon Lex doesn't understand the intent, it returns this dialogState
. Another example is
when your intent is configured with a follow up prompt. For example, after OrderPizza intent is
fulfilled, the intent might have a follow up prompt such as " Do you want to order a drink or desert?" In
this case, Amazon Lex returns this dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether
to go ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a
yes/no reply, the user might provide a response with additional slot information (either new slot
information or changes to the existing slot values). For example, "Yes, but change to thick crust."
Amazon Lex understands the additional information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example,
suppose Amazon Lex asks, "What size pizza would you like?" A user might reply with
"Medium pepperoni pizza." Amazon Lex recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If
Lambda function returns a statement/message to convey the fulfillment result, Amazon Lex passes this
string to the client. If not, Amazon Lex looks for conclusionStatement
that you configured
for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent.
This is the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this
dialogState
are: after the configured number of attempts the user didn't provide an
appropriate response, or the Lambda function failed to fulfill an intent.
DialogState
public PostTextResult withDialogState(String dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not understand
the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If Amazon Lex
doesn't understand the intent, it returns this dialogState
. Another example is when your intent is
configured with a follow up prompt. For example, after OrderPizza intent is fulfilled, the intent might have a
follow up prompt such as " Do you want to order a drink or desert?" In this case, Amazon Lex returns this
dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to go
ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no reply,
the user might provide a response with additional slot information (either new slot information or changes to the
existing slot values). For example, "Yes, but change to thick crust." Amazon Lex understands the additional
information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example, suppose
Amazon Lex asks, "What size pizza would you like?" A user might reply with "Medium pepperoni pizza." Amazon Lex
recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to the
client. If not, Amazon Lex looks for conclusionStatement
that you configured for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent. This is
the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this dialogState
are: after the configured number of attempts the user didn't provide an appropriate response, or the Lambda
function failed to fulfill an intent.
dialogState
- Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not
understand the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If
Amazon Lex doesn't understand the intent, it returns this dialogState
. Another example is
when your intent is configured with a follow up prompt. For example, after OrderPizza intent is fulfilled,
the intent might have a follow up prompt such as " Do you want to order a drink or desert?" In this case,
Amazon Lex returns this dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to
go ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no
reply, the user might provide a response with additional slot information (either new slot information or
changes to the existing slot values). For example, "Yes, but change to thick crust." Amazon Lex
understands the additional information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example,
suppose Amazon Lex asks, "What size pizza would you like?" A user might reply with
"Medium pepperoni pizza." Amazon Lex recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to
the client. If not, Amazon Lex looks for conclusionStatement
that you configured for the
intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent.
This is the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this
dialogState
are: after the configured number of attempts the user didn't provide an
appropriate response, or the Lambda function failed to fulfill an intent.
DialogState
public void setDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not understand
the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If Amazon Lex
doesn't understand the intent, it returns this dialogState
. Another example is when your intent is
configured with a follow up prompt. For example, after OrderPizza intent is fulfilled, the intent might have a
follow up prompt such as " Do you want to order a drink or desert?" In this case, Amazon Lex returns this
dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to go
ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no reply,
the user might provide a response with additional slot information (either new slot information or changes to the
existing slot values). For example, "Yes, but change to thick crust." Amazon Lex understands the additional
information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example, suppose
Amazon Lex asks, "What size pizza would you like?" A user might reply with "Medium pepperoni pizza." Amazon Lex
recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to the
client. If not, Amazon Lex looks for conclusionStatement
that you configured for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent. This is
the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this dialogState
are: after the configured number of attempts the user didn't provide an appropriate response, or the Lambda
function failed to fulfill an intent.
dialogState
- Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not
understand the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If
Amazon Lex doesn't understand the intent, it returns this dialogState
. Another example is
when your intent is configured with a follow up prompt. For example, after OrderPizza intent is fulfilled,
the intent might have a follow up prompt such as " Do you want to order a drink or desert?" In this case,
Amazon Lex returns this dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to
go ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no
reply, the user might provide a response with additional slot information (either new slot information or
changes to the existing slot values). For example, "Yes, but change to thick crust." Amazon Lex
understands the additional information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example,
suppose Amazon Lex asks, "What size pizza would you like?" A user might reply with
"Medium pepperoni pizza." Amazon Lex recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to
the client. If not, Amazon Lex looks for conclusionStatement
that you configured for the
intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent.
This is the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this
dialogState
are: after the configured number of attempts the user didn't provide an
appropriate response, or the Lambda function failed to fulfill an intent.
DialogState
public PostTextResult withDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not understand
the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If Amazon Lex
doesn't understand the intent, it returns this dialogState
. Another example is when your intent is
configured with a follow up prompt. For example, after OrderPizza intent is fulfilled, the intent might have a
follow up prompt such as " Do you want to order a drink or desert?" In this case, Amazon Lex returns this
dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to go
ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no reply,
the user might provide a response with additional slot information (either new slot information or changes to the
existing slot values). For example, "Yes, but change to thick crust." Amazon Lex understands the additional
information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example, suppose
Amazon Lex asks, "What size pizza would you like?" A user might reply with "Medium pepperoni pizza." Amazon Lex
recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to the
client. If not, Amazon Lex looks for conclusionStatement
that you configured for the intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent. This is
the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this dialogState
are: after the configured number of attempts the user didn't provide an appropriate response, or the Lambda
function failed to fulfill an intent.
dialogState
- Represents the message type to be conveyed to the user. For example:
ElicitIntent
– Amazon Lex wants to elicit user intent. For example, Amazon Lex did not
understand the first utterances such as "I want to order pizza", which indicates the OrderPizza intent. If
Amazon Lex doesn't understand the intent, it returns this dialogState
. Another example is
when your intent is configured with a follow up prompt. For example, after OrderPizza intent is fulfilled,
the intent might have a follow up prompt such as " Do you want to order a drink or desert?" In this case,
Amazon Lex returns this dialogState
.
ConfirmIntent
– Amazon Lex is expecting a yes/no response from the user indicating whether to
go ahead and fulfill the intent (for example, OK to go ahead and order the pizza). In addition to a yes/no
reply, the user might provide a response with additional slot information (either new slot information or
changes to the existing slot values). For example, "Yes, but change to thick crust." Amazon Lex
understands the additional information and updates the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "Do you want to place this pizza order?" A user might reply with "No, I want to order a drink." Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot
– Amazon Lex is expecting a value of a slot for the current intent. For example,
suppose Amazon Lex asks, "What size pizza would you like?" A user might reply with
"Medium pepperoni pizza." Amazon Lex recognizes the size and the topping as the two separate slot values.
Fulfilled
– Conveys that the Lambda function has successfully fulfilled the intent. If Lambda
function returns a statement/message to convey the fulfillment result, Amazon Lex passes this string to
the client. If not, Amazon Lex looks for conclusionStatement
that you configured for the
intent.
If both the Lambda function statement and the conclusionStatement
are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment
– conveys that the client has to do the fulfillment work for the intent.
This is the case when the current intent is configured with ReturnIntent
as the
fulfillmentActivity
, where Amazon Lex returns this state to client.
Failed
– Conversation with the user failed. Some of the reasons for this
dialogState
are: after the configured number of attempts the user didn't provide an
appropriate response, or the Lambda function failed to fulfill an intent.
DialogState
public void setSlotToElicit(String slotToElicit)
If dialogState
value is ElicitSlot
, returns the name of the slot for which Amazon Lex
is eliciting a value.
slotToElicit
- If dialogState
value is ElicitSlot
, returns the name of the slot for which
Amazon Lex is eliciting a value.public String getSlotToElicit()
If dialogState
value is ElicitSlot
, returns the name of the slot for which Amazon Lex
is eliciting a value.
dialogState
value is ElicitSlot
, returns the name of the slot for which
Amazon Lex is eliciting a value.public PostTextResult withSlotToElicit(String slotToElicit)
If dialogState
value is ElicitSlot
, returns the name of the slot for which Amazon Lex
is eliciting a value.
slotToElicit
- If dialogState
value is ElicitSlot
, returns the name of the slot for which
Amazon Lex is eliciting a value.public void setResponseCard(ResponseCard responseCard)
Represents the options that the user has to respond to the current prompt. Amazon Lex sends this in the response
only if the dialogState
value indicates that a user response is expected.
responseCard
- Represents the options that the user has to respond to the current prompt. Amazon Lex sends this in the
response only if the dialogState
value indicates that a user response is expected.public ResponseCard getResponseCard()
Represents the options that the user has to respond to the current prompt. Amazon Lex sends this in the response
only if the dialogState
value indicates that a user response is expected.
dialogState
value indicates that a user response is expected.public PostTextResult withResponseCard(ResponseCard responseCard)
Represents the options that the user has to respond to the current prompt. Amazon Lex sends this in the response
only if the dialogState
value indicates that a user response is expected.
responseCard
- Represents the options that the user has to respond to the current prompt. Amazon Lex sends this in the
response only if the dialogState
value indicates that a user response is expected.public String toString()
toString
in class Object
Object.toString()
public PostTextResult clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.