/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace LexRuntimeService { namespace Model { /** *

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.

See * Also:

AWS * API Reference

*/ class DialogAction { public: AWS_LEXRUNTIMESERVICE_API DialogAction(); AWS_LEXRUNTIMESERVICE_API DialogAction(Aws::Utils::Json::JsonView jsonValue); AWS_LEXRUNTIMESERVICE_API DialogAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LEXRUNTIMESERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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.

*/ inline const DialogActionType& GetType() const{ return m_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.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

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.

*/ inline void SetType(const DialogActionType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

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.

*/ inline void SetType(DialogActionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

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.

*/ inline DialogAction& WithType(const DialogActionType& value) { SetType(value); return *this;} /** *

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.

*/ inline DialogAction& WithType(DialogActionType&& value) { SetType(std::move(value)); return *this;} /** *

The name of the intent.

*/ inline const Aws::String& GetIntentName() const{ return m_intentName; } /** *

The name of the intent.

*/ inline bool IntentNameHasBeenSet() const { return m_intentNameHasBeenSet; } /** *

The name of the intent.

*/ inline void SetIntentName(const Aws::String& value) { m_intentNameHasBeenSet = true; m_intentName = value; } /** *

The name of the intent.

*/ inline void SetIntentName(Aws::String&& value) { m_intentNameHasBeenSet = true; m_intentName = std::move(value); } /** *

The name of the intent.

*/ inline void SetIntentName(const char* value) { m_intentNameHasBeenSet = true; m_intentName.assign(value); } /** *

The name of the intent.

*/ inline DialogAction& WithIntentName(const Aws::String& value) { SetIntentName(value); return *this;} /** *

The name of the intent.

*/ inline DialogAction& WithIntentName(Aws::String&& value) { SetIntentName(std::move(value)); return *this;} /** *

The name of the intent.

*/ inline DialogAction& WithIntentName(const char* value) { SetIntentName(value); return *this;} /** *

Map of the slots that have been gathered and their values.

*/ inline const Aws::Map& GetSlots() const{ return m_slots; } /** *

Map of the slots that have been gathered and their values.

*/ inline bool SlotsHasBeenSet() const { return m_slotsHasBeenSet; } /** *

Map of the slots that have been gathered and their values.

*/ inline void SetSlots(const Aws::Map& value) { m_slotsHasBeenSet = true; m_slots = value; } /** *

Map of the slots that have been gathered and their values.

*/ inline void SetSlots(Aws::Map&& value) { m_slotsHasBeenSet = true; m_slots = std::move(value); } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& WithSlots(const Aws::Map& value) { SetSlots(value); return *this;} /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& WithSlots(Aws::Map&& value) { SetSlots(std::move(value)); return *this;} /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(const Aws::String& key, const Aws::String& value) { m_slotsHasBeenSet = true; m_slots.emplace(key, value); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(Aws::String&& key, const Aws::String& value) { m_slotsHasBeenSet = true; m_slots.emplace(std::move(key), value); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(const Aws::String& key, Aws::String&& value) { m_slotsHasBeenSet = true; m_slots.emplace(key, std::move(value)); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(Aws::String&& key, Aws::String&& value) { m_slotsHasBeenSet = true; m_slots.emplace(std::move(key), std::move(value)); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(const char* key, Aws::String&& value) { m_slotsHasBeenSet = true; m_slots.emplace(key, std::move(value)); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(Aws::String&& key, const char* value) { m_slotsHasBeenSet = true; m_slots.emplace(std::move(key), value); return *this; } /** *

Map of the slots that have been gathered and their values.

*/ inline DialogAction& AddSlots(const char* key, const char* value) { m_slotsHasBeenSet = true; m_slots.emplace(key, value); return *this; } /** *

The name of the slot that should be elicited from the user.

*/ inline const Aws::String& GetSlotToElicit() const{ return m_slotToElicit; } /** *

The name of the slot that should be elicited from the user.

*/ inline bool SlotToElicitHasBeenSet() const { return m_slotToElicitHasBeenSet; } /** *

The name of the slot that should be elicited from the user.

*/ inline void SetSlotToElicit(const Aws::String& value) { m_slotToElicitHasBeenSet = true; m_slotToElicit = value; } /** *

The name of the slot that should be elicited from the user.

*/ inline void SetSlotToElicit(Aws::String&& value) { m_slotToElicitHasBeenSet = true; m_slotToElicit = std::move(value); } /** *

The name of the slot that should be elicited from the user.

*/ inline void SetSlotToElicit(const char* value) { m_slotToElicitHasBeenSet = true; m_slotToElicit.assign(value); } /** *

The name of the slot that should be elicited from the user.

*/ inline DialogAction& WithSlotToElicit(const Aws::String& value) { SetSlotToElicit(value); return *this;} /** *

The name of the slot that should be elicited from the user.

*/ inline DialogAction& WithSlotToElicit(Aws::String&& value) { SetSlotToElicit(std::move(value)); return *this;} /** *

The name of the slot that should be elicited from the user.

*/ inline DialogAction& WithSlotToElicit(const char* value) { SetSlotToElicit(value); return *this;} /** *

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.

*/ inline const FulfillmentState& GetFulfillmentState() const{ return m_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.

*/ inline bool FulfillmentStateHasBeenSet() const { return m_fulfillmentStateHasBeenSet; } /** *

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.

*/ inline void SetFulfillmentState(const FulfillmentState& value) { m_fulfillmentStateHasBeenSet = true; m_fulfillmentState = value; } /** *

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.

*/ inline void SetFulfillmentState(FulfillmentState&& value) { m_fulfillmentStateHasBeenSet = true; m_fulfillmentState = std::move(value); } /** *

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.

*/ inline DialogAction& WithFulfillmentState(const FulfillmentState& value) { SetFulfillmentState(value); return *this;} /** *

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.

*/ inline DialogAction& WithFulfillmentState(FulfillmentState&& value) { SetFulfillmentState(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetMessage() const{ return m_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.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

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.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

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.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

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.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

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.

*/ inline DialogAction& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

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.

*/ inline DialogAction& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

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.

*/ inline DialogAction& WithMessage(const char* value) { SetMessage(value); return *this;} /** *
  • 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.

*/ inline const MessageFormatType& GetMessageFormat() const{ return m_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.

*/ inline bool MessageFormatHasBeenSet() const { return m_messageFormatHasBeenSet; } /** *
  • 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.

*/ inline void SetMessageFormat(const MessageFormatType& value) { m_messageFormatHasBeenSet = true; m_messageFormat = value; } /** *
  • 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.

*/ inline void SetMessageFormat(MessageFormatType&& value) { m_messageFormatHasBeenSet = true; m_messageFormat = std::move(value); } /** *
  • 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.

*/ inline DialogAction& WithMessageFormat(const MessageFormatType& value) { SetMessageFormat(value); return *this;} /** *
  • 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.

*/ inline DialogAction& WithMessageFormat(MessageFormatType&& value) { SetMessageFormat(std::move(value)); return *this;} private: DialogActionType m_type; bool m_typeHasBeenSet = false; Aws::String m_intentName; bool m_intentNameHasBeenSet = false; Aws::Map m_slots; bool m_slotsHasBeenSet = false; Aws::String m_slotToElicit; bool m_slotToElicitHasBeenSet = false; FulfillmentState m_fulfillmentState; bool m_fulfillmentStateHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; MessageFormatType m_messageFormat; bool m_messageFormatHasBeenSet = false; }; } // namespace Model } // namespace LexRuntimeService } // namespace Aws