Struct aws_sdk_lexruntime::model::DialogAction
source · [−]#[non_exhaustive]pub struct DialogAction {
pub type: Option<DialogActionType>,
pub intent_name: Option<String>,
pub slots: Option<HashMap<String, String>>,
pub slot_to_elicit: Option<String>,
pub fulfillment_state: Option<FulfillmentState>,
pub message: Option<String>,
pub message_format: Option<MessageFormatType>,
}
Expand description
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.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.type: Option<DialogActionType>
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.
intent_name: Option<String>
The name of the intent.
slots: Option<HashMap<String, String>>
Map of the slots that have been gathered and their values.
slot_to_elicit: Option<String>
The name of the slot that should be elicited from the user.
fulfillment_state: Option<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.
message: Option<String>
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.
message_format: Option<MessageFormatType>
-
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.
Implementations
sourceimpl DialogAction
impl DialogAction
sourcepub fn type(&self) -> Option<&DialogActionType>
pub fn type(&self) -> Option<&DialogActionType>
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.
sourcepub fn intent_name(&self) -> Option<&str>
pub fn intent_name(&self) -> Option<&str>
The name of the intent.
sourcepub fn slots(&self) -> Option<&HashMap<String, String>>
pub fn slots(&self) -> Option<&HashMap<String, String>>
Map of the slots that have been gathered and their values.
sourcepub fn slot_to_elicit(&self) -> Option<&str>
pub fn slot_to_elicit(&self) -> Option<&str>
The name of the slot that should be elicited from the user.
sourcepub fn fulfillment_state(&self) -> Option<&FulfillmentState>
pub fn fulfillment_state(&self) -> Option<&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.
sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
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.
sourcepub fn message_format(&self) -> Option<&MessageFormatType>
pub fn message_format(&self) -> Option<&MessageFormatType>
-
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.
sourceimpl DialogAction
impl DialogAction
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DialogAction
Trait Implementations
sourceimpl Clone for DialogAction
impl Clone for DialogAction
sourcefn clone(&self) -> DialogAction
fn clone(&self) -> DialogAction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DialogAction
impl Debug for DialogAction
sourceimpl PartialEq<DialogAction> for DialogAction
impl PartialEq<DialogAction> for DialogAction
sourcefn eq(&self, other: &DialogAction) -> bool
fn eq(&self, other: &DialogAction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DialogAction) -> bool
fn ne(&self, other: &DialogAction) -> bool
This method tests for !=
.
impl StructuralPartialEq for DialogAction
Auto Trait Implementations
impl RefUnwindSafe for DialogAction
impl Send for DialogAction
impl Sync for DialogAction
impl Unpin for DialogAction
impl UnwindSafe for DialogAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more