public class DialogAction
extends java.lang.Object
implements java.io.Serializable
Describes the next action that the bot should take in its interaction with
the user and provides information about the context in which the action takes
place. Use the DialogAction
data type to set the interaction to
a specific state, or to return the interaction to a previous state.
Constructor and Description |
---|
DialogAction() |
Modifier and Type | Method and Description |
---|---|
DialogAction |
addslotsEntry(java.lang.String key,
java.lang.String value)
Map of the slots that have been gathered and their values.
|
DialogAction |
clearslotsEntries()
Removes all the entries added into slots.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getFulfillmentState()
The fulfillment state of the intent.
|
java.lang.String |
getIntentName()
The name of the intent.
|
java.lang.String |
getMessage()
The message that should be shown to the user.
|
java.lang.String |
getMessageFormat()
|
java.util.Map<java.lang.String,java.lang.String> |
getSlots()
Map of the slots that have been gathered and their values.
|
java.lang.String |
getSlotToElicit()
The name of the slot that should be elicited from the user.
|
java.lang.String |
getType()
The next action that the bot should take in its interaction with the
user.
|
int |
hashCode() |
void |
setFulfillmentState(FulfillmentState fulfillmentState)
The fulfillment state of the intent.
|
void |
setFulfillmentState(java.lang.String fulfillmentState)
The fulfillment state of the intent.
|
void |
setIntentName(java.lang.String intentName)
The name of the intent.
|
void |
setMessage(java.lang.String message)
The message that should be shown to the user.
|
void |
setMessageFormat(MessageFormatType messageFormat)
|
void |
setMessageFormat(java.lang.String messageFormat)
|
void |
setSlots(java.util.Map<java.lang.String,java.lang.String> slots)
Map of the slots that have been gathered and their values.
|
void |
setSlotToElicit(java.lang.String slotToElicit)
The name of the slot that should be elicited from the user.
|
void |
setType(DialogActionType type)
The next action that the bot should take in its interaction with the
user.
|
void |
setType(java.lang.String type)
The next action that the bot should take in its interaction with the
user.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DialogAction |
withFulfillmentState(FulfillmentState fulfillmentState)
The fulfillment state of the intent.
|
DialogAction |
withFulfillmentState(java.lang.String fulfillmentState)
The fulfillment state of the intent.
|
DialogAction |
withIntentName(java.lang.String intentName)
The name of the intent.
|
DialogAction |
withMessage(java.lang.String message)
The message that should be shown to the user.
|
DialogAction |
withMessageFormat(MessageFormatType messageFormat)
|
DialogAction |
withMessageFormat(java.lang.String messageFormat)
|
DialogAction |
withSlots(java.util.Map<java.lang.String,java.lang.String> slots)
Map of the slots that have been gathered and their values.
|
DialogAction |
withSlotToElicit(java.lang.String slotToElicit)
The name of the slot that should be elicited from the user.
|
DialogAction |
withType(DialogActionType type)
The next action that the bot should take in its interaction with the
user.
|
DialogAction |
withType(java.lang.String type)
The next action that the bot should take in its interaction with the
user.
|
public java.lang.String getType()
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user if the
intent is complete and ready to be fulfilled. This is a yes/no question
such as "Place the order?"
Close
- Indicates that the there will not be a response from
the user. For example, the statement "Your order has been placed" does
not require a response.
Delegate
- The next action is determined by Amazon Lex.
ElicitIntent
- The next action is to determine the intent
that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot value from
the user.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, Close,
Delegate
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user
if the intent is complete and ready to be fulfilled. This is a
yes/no question such as "Place the order?"
Close
- Indicates that the there will not be a
response from the user. For example, the statement
"Your order has been placed" does not require a response.
Delegate
- The next action is determined by Amazon
Lex.
ElicitIntent
- The next action is to determine the
intent that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot
value from the user.
DialogActionType
public void setType(java.lang.String type)
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user if the
intent is complete and ready to be fulfilled. This is a yes/no question
such as "Place the order?"
Close
- Indicates that the there will not be a response from
the user. For example, the statement "Your order has been placed" does
not require a response.
Delegate
- The next action is determined by Amazon Lex.
ElicitIntent
- The next action is to determine the intent
that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot value from
the user.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, Close,
Delegate
type
- The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the
user if the intent is complete and ready to be fulfilled. This
is a yes/no question such as "Place the order?"
Close
- Indicates that the there will not be a
response from the user. For example, the statement
"Your order has been placed" does not require a response.
Delegate
- The next action is determined by
Amazon Lex.
ElicitIntent
- The next action is to determine
the intent that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot
value from the user.
DialogActionType
public DialogAction withType(java.lang.String type)
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user if the
intent is complete and ready to be fulfilled. This is a yes/no question
such as "Place the order?"
Close
- Indicates that the there will not be a response from
the user. For example, the statement "Your order has been placed" does
not require a response.
Delegate
- The next action is determined by Amazon Lex.
ElicitIntent
- The next action is to determine the intent
that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot value from
the user.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, Close,
Delegate
type
- The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the
user if the intent is complete and ready to be fulfilled. This
is a yes/no question such as "Place the order?"
Close
- Indicates that the there will not be a
response from the user. For example, the statement
"Your order has been placed" does not require a response.
Delegate
- The next action is determined by
Amazon Lex.
ElicitIntent
- The next action is to determine
the intent that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot
value from the user.
DialogActionType
public void setType(DialogActionType type)
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user if the
intent is complete and ready to be fulfilled. This is a yes/no question
such as "Place the order?"
Close
- Indicates that the there will not be a response from
the user. For example, the statement "Your order has been placed" does
not require a response.
Delegate
- The next action is determined by Amazon Lex.
ElicitIntent
- The next action is to determine the intent
that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot value from
the user.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, Close,
Delegate
type
- The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the
user if the intent is complete and ready to be fulfilled. This
is a yes/no question such as "Place the order?"
Close
- Indicates that the there will not be a
response from the user. For example, the statement
"Your order has been placed" does not require a response.
Delegate
- The next action is determined by
Amazon Lex.
ElicitIntent
- The next action is to determine
the intent that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot
value from the user.
DialogActionType
public DialogAction withType(DialogActionType type)
The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the user if the
intent is complete and ready to be fulfilled. This is a yes/no question
such as "Place the order?"
Close
- Indicates that the there will not be a response from
the user. For example, the statement "Your order has been placed" does
not require a response.
Delegate
- The next action is determined by Amazon Lex.
ElicitIntent
- The next action is to determine the intent
that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot value from
the user.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, Close,
Delegate
type
- The next action that the bot should take in its interaction with the user. The possible values are:
ConfirmIntent
- The next action is asking the
user if the intent is complete and ready to be fulfilled. This
is a yes/no question such as "Place the order?"
Close
- Indicates that the there will not be a
response from the user. For example, the statement
"Your order has been placed" does not require a response.
Delegate
- The next action is determined by
Amazon Lex.
ElicitIntent
- The next action is to determine
the intent that the user wants to fulfill.
ElicitSlot
- The next action is to elicit a slot
value from the user.
DialogActionType
public java.lang.String getIntentName()
The name of the intent.
The name of the intent.
public void setIntentName(java.lang.String intentName)
The name of the intent.
intentName
- The name of the intent.
public DialogAction withIntentName(java.lang.String intentName)
The name of the intent.
Returns a reference to this object so that method calls can be chained together.
intentName
- The name of the intent.
public java.util.Map<java.lang.String,java.lang.String> getSlots()
Map of the slots that have been gathered and their values.
Map of the slots that have been gathered and their values.
public void setSlots(java.util.Map<java.lang.String,java.lang.String> slots)
Map of the slots that have been gathered and their values.
slots
- Map of the slots that have been gathered and their values.
public DialogAction withSlots(java.util.Map<java.lang.String,java.lang.String> slots)
Map of the slots that have been gathered and their values.
Returns a reference to this object so that method calls can be chained together.
slots
- Map of the slots that have been gathered and their values.
public DialogAction addslotsEntry(java.lang.String key, java.lang.String value)
Map of the slots that have been gathered and their values.
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 DialogAction clearslotsEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String getSlotToElicit()
The name of the slot that should be elicited from the user.
The name of the slot that should be elicited from the user.
public void setSlotToElicit(java.lang.String slotToElicit)
The name of the slot that should be elicited from the user.
slotToElicit
- The name of the slot that should be elicited from the user.
public DialogAction withSlotToElicit(java.lang.String slotToElicit)
The name of the slot that should be elicited from the user.
Returns a reference to this object so that method calls can be chained together.
slotToElicit
- The name of the slot that should be elicited from the user.
public java.lang.String getFulfillmentState()
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the intent
failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda function
associated with the intent.
ReadyForFulfillment
- All of the information necessary for
the intent is present and the intent ready to be fulfilled by the client
application.
Constraints:
Allowed Values: Fulfilled, Failed, ReadyForFulfillment
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the
intent failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda
function associated with the intent.
ReadyForFulfillment
- All of the information
necessary for the intent is present and the intent ready to be
fulfilled by the client application.
FulfillmentState
public void setFulfillmentState(java.lang.String fulfillmentState)
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the intent
failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda function
associated with the intent.
ReadyForFulfillment
- All of the information necessary for
the intent is present and the intent ready to be fulfilled by the client
application.
Constraints:
Allowed Values: Fulfilled, Failed, ReadyForFulfillment
fulfillmentState
- The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the
intent failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the
Lambda function associated with the intent.
ReadyForFulfillment
- All of the information
necessary for the intent is present and the intent ready to be
fulfilled by the client application.
FulfillmentState
public DialogAction withFulfillmentState(java.lang.String fulfillmentState)
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the intent
failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda function
associated with the intent.
ReadyForFulfillment
- All of the information necessary for
the intent is present and the intent ready to be fulfilled by the client
application.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Fulfilled, Failed, ReadyForFulfillment
fulfillmentState
- The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the
intent failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the
Lambda function associated with the intent.
ReadyForFulfillment
- All of the information
necessary for the intent is present and the intent ready to be
fulfilled by the client application.
FulfillmentState
public void setFulfillmentState(FulfillmentState fulfillmentState)
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the intent
failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda function
associated with the intent.
ReadyForFulfillment
- All of the information necessary for
the intent is present and the intent ready to be fulfilled by the client
application.
Constraints:
Allowed Values: Fulfilled, Failed, ReadyForFulfillment
fulfillmentState
- The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the
intent failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the
Lambda function associated with the intent.
ReadyForFulfillment
- All of the information
necessary for the intent is present and the intent ready to be
fulfilled by the client application.
FulfillmentState
public DialogAction withFulfillmentState(FulfillmentState fulfillmentState)
The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the intent
failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the Lambda function
associated with the intent.
ReadyForFulfillment
- All of the information necessary for
the intent is present and the intent ready to be fulfilled by the client
application.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Fulfilled, Failed, ReadyForFulfillment
fulfillmentState
- The fulfillment state of the intent. The possible values are:
Failed
- The Lambda function associated with the
intent failed to fulfill the intent.
Fulfilled
- The intent has fulfilled by the
Lambda function associated with the intent.
ReadyForFulfillment
- All of the information
necessary for the intent is present and the intent ready to be
fulfilled by the client application.
FulfillmentState
public java.lang.String getMessage()
The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
Constraints:
Length: 1 - 1024
The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
public void setMessage(java.lang.String message)
The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
Constraints:
Length: 1 - 1024
message
- The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
public DialogAction withMessage(java.lang.String message)
The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1024
message
- The message that should be shown to the user. If you don't specify a message, Amazon Lex will use the message configured for the intent.
public java.lang.String getMessageFormat()
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for the
client.
SSML
- The message contains text formatted for voice output.
Composite
- The message contains an escaped JSON object
containing one or more messages. For more information, see Message Groups.
Constraints:
Allowed Values: PlainText, CustomPayload, SSML, Composite
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for
the client.
SSML
- The message contains text formatted for voice
output.
Composite
- The message contains an escaped JSON
object containing one or more messages. For more information, see
Message Groups.
MessageFormatType
public void setMessageFormat(java.lang.String messageFormat)
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for the
client.
SSML
- The message contains text formatted for voice output.
Composite
- The message contains an escaped JSON object
containing one or more messages. For more information, see Message Groups.
Constraints:
Allowed Values: PlainText, CustomPayload, SSML, Composite
messageFormat
-
PlainText
- The message contains plain UTF-8
text.
CustomPayload
- The message is a custom format
for the client.
SSML
- The message contains text formatted for
voice output.
Composite
- The message contains an escaped JSON
object containing one or more messages. For more information,
see Message Groups.
MessageFormatType
public DialogAction withMessageFormat(java.lang.String messageFormat)
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for the
client.
SSML
- The message contains text formatted for voice output.
Composite
- The message contains an escaped JSON object
containing one or more messages. For more information, see Message Groups.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PlainText, CustomPayload, SSML, Composite
messageFormat
-
PlainText
- The message contains plain UTF-8
text.
CustomPayload
- The message is a custom format
for the client.
SSML
- The message contains text formatted for
voice output.
Composite
- The message contains an escaped JSON
object containing one or more messages. For more information,
see Message Groups.
MessageFormatType
public void setMessageFormat(MessageFormatType messageFormat)
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for the
client.
SSML
- The message contains text formatted for voice output.
Composite
- The message contains an escaped JSON object
containing one or more messages. For more information, see Message Groups.
Constraints:
Allowed Values: PlainText, CustomPayload, SSML, Composite
messageFormat
-
PlainText
- The message contains plain UTF-8
text.
CustomPayload
- The message is a custom format
for the client.
SSML
- The message contains text formatted for
voice output.
Composite
- The message contains an escaped JSON
object containing one or more messages. For more information,
see Message Groups.
MessageFormatType
public DialogAction withMessageFormat(MessageFormatType messageFormat)
PlainText
- The message contains plain UTF-8 text.
CustomPayload
- The message is a custom format for the
client.
SSML
- The message contains text formatted for voice output.
Composite
- The message contains an escaped JSON object
containing one or more messages. For more information, see Message Groups.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PlainText, CustomPayload, SSML, Composite
messageFormat
-
PlainText
- The message contains plain UTF-8
text.
CustomPayload
- The message is a custom format
for the client.
SSML
- The message contains text formatted for
voice output.
Composite
- The message contains an escaped JSON
object containing one or more messages. For more information,
see Message Groups.
MessageFormatType
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.