public class PostTextResult extends Object implements Serializable
| Constructor and Description |
|---|
PostTextResult() |
| Modifier and Type | Method and Description |
|---|---|
PostTextResult |
addsessionAttributesEntry(String key,
String value)
Map of key value pairs representing the session specific context
information.
|
PostTextResult |
addslotsEntry(String key,
String value)
Intent slots (name/value pairs) Amazon Lex detected so far from the user
input in the conversation.
|
PostTextResult |
clearsessionAttributesEntries()
Removes all the entries added into sessionAttributes.
|
PostTextResult |
clearslotsEntries()
Removes all the entries added into slots.
|
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. |
public String getIntentName()
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
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 PostTextResult withIntentName(String intentName)
Intent Amazon Lex inferred from the user input text. This is one of the intents configured for the bot.
Returns a reference to this object so that method calls can be chained together.
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.
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.
Returns a reference to this object so that method calls can be chained together.
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)
Intent slots (name/value pairs) Amazon Lex detected so far from the user input in the conversation.
The method adds a new key-value pair into slots parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into slots.value - The corresponding value of the entry to be added into slots.public PostTextResult clearslotsEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,String> getSessionAttributes()
Map of key value pairs representing the session specific context information.
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.
Returns a reference to this object so that method calls can be chained together.
sessionAttributes - Map of key value pairs representing the session specific context information.
public PostTextResult addsessionAttributesEntry(String key, String value)
Map of key value pairs representing the session specific context information.
The method adds a new key-value pair into sessionAttributes parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into sessionAttributes.value - The corresponding value of the entry to be added into
sessionAttributes.public PostTextResult clearsessionAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
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.
Constraints:
Length: 1 - 1024
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 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.
Constraints:
Length: 1 - 1024
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 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1024
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 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.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
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.
DialogStatepublic 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.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
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.
DialogStatepublic 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
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.
DialogStatepublic 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.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
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.
DialogStatepublic 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
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.
DialogStatepublic String getSlotToElicit()
If dialogState value is ElicitSlot, returns the
name of the slot for which Amazon Lex is eliciting a value.
If dialogState value is ElicitSlot,
returns the name of the slot for which Amazon Lex is eliciting a
value.
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 PostTextResult withSlotToElicit(String slotToElicit)
If dialogState value is ElicitSlot, returns the
name of the slot for which Amazon Lex is eliciting a value.
Returns a reference to this object so that method calls can be chained together.
slotToElicit -
If dialogState value is ElicitSlot,
returns the name of the slot for which Amazon Lex is eliciting
a value.
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.
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 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 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.
Returns a reference to this object so that method calls can be chained together.
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 ObjectObject.toString()Copyright © 2017. All rights reserved.