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

Obtains information from the user. To define a prompt, provide one or more * messages and specify the number of attempts to get information from the user. If * you provide more than one message, Amazon Lex chooses one of the messages to use * to prompt the user. For more information, see how-it-works.

See * Also:

AWS * API Reference

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

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline const Aws::Vector& GetMessages() const{ return m_messages; } /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; } /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline void SetMessages(const Aws::Vector& value) { m_messagesHasBeenSet = true; m_messages = value; } /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline void SetMessages(Aws::Vector&& value) { m_messagesHasBeenSet = true; m_messages = std::move(value); } /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline Prompt& WithMessages(const Aws::Vector& value) { SetMessages(value); return *this;} /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline Prompt& WithMessages(Aws::Vector&& value) { SetMessages(std::move(value)); return *this;} /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline Prompt& AddMessages(const Message& value) { m_messagesHasBeenSet = true; m_messages.push_back(value); return *this; } /** *

An array of objects, each of which provides a message string and its type. * You can specify the message string in plain text or in Speech Synthesis Markup * Language (SSML).

*/ inline Prompt& AddMessages(Message&& value) { m_messagesHasBeenSet = true; m_messages.push_back(std::move(value)); return *this; } /** *

The number of times to prompt the user for information.

*/ inline int GetMaxAttempts() const{ return m_maxAttempts; } /** *

The number of times to prompt the user for information.

*/ inline bool MaxAttemptsHasBeenSet() const { return m_maxAttemptsHasBeenSet; } /** *

The number of times to prompt the user for information.

*/ inline void SetMaxAttempts(int value) { m_maxAttemptsHasBeenSet = true; m_maxAttempts = value; } /** *

The number of times to prompt the user for information.

*/ inline Prompt& WithMaxAttempts(int value) { SetMaxAttempts(value); return *this;} /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline const Aws::String& GetResponseCard() const{ return m_responseCard; } /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline bool ResponseCardHasBeenSet() const { return m_responseCardHasBeenSet; } /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline void SetResponseCard(const Aws::String& value) { m_responseCardHasBeenSet = true; m_responseCard = value; } /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline void SetResponseCard(Aws::String&& value) { m_responseCardHasBeenSet = true; m_responseCard = std::move(value); } /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline void SetResponseCard(const char* value) { m_responseCardHasBeenSet = true; m_responseCard.assign(value); } /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline Prompt& WithResponseCard(const Aws::String& value) { SetResponseCard(value); return *this;} /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline Prompt& WithResponseCard(Aws::String&& value) { SetResponseCard(std::move(value)); return *this;} /** *

A response card. Amazon Lex uses this prompt at runtime, in the * PostText API response. It substitutes session attributes and slot * values for placeholders in the response card. For more information, see * ex-resp-card.

*/ inline Prompt& WithResponseCard(const char* value) { SetResponseCard(value); return *this;} private: Aws::Vector m_messages; bool m_messagesHasBeenSet = false; int m_maxAttempts; bool m_maxAttemptsHasBeenSet = false; Aws::String m_responseCard; bool m_responseCardHasBeenSet = false; }; } // namespace Model } // namespace LexModelBuildingService } // namespace Aws