/** * 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 LexRuntimeV2 { namespace Model { /** *

The initial event sent from the application to Amazon Lex V2 to configure the * conversation, including session and request attributes and the response content * type.

See Also:

AWS * API Reference

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

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline const Aws::Map& GetRequestAttributes() const{ return m_requestAttributes; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline bool RequestAttributesHasBeenSet() const { return m_requestAttributesHasBeenSet; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline void SetRequestAttributes(const Aws::Map& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes = value; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline void SetRequestAttributes(Aws::Map&& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes = std::move(value); } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& WithRequestAttributes(const Aws::Map& value) { SetRequestAttributes(value); return *this;} /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& WithRequestAttributes(Aws::Map&& value) { SetRequestAttributes(std::move(value)); return *this;} /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(const Aws::String& key, const Aws::String& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(key, value); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(Aws::String&& key, const Aws::String& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(std::move(key), value); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(const Aws::String& key, Aws::String&& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(key, std::move(value)); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(Aws::String&& key, Aws::String&& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(std::move(key), std::move(value)); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(const char* key, Aws::String&& value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(key, std::move(value)); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(Aws::String&& key, const char* value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(std::move(key), value); return *this; } /** *

Request-specific information passed between the client application and Amazon * Lex V2.

The namespace x-amz-lex: is reserved for special * attributes. Don't create any request attributes for prefix * x-amz-lex:.

*/ inline ConfigurationEvent& AddRequestAttributes(const char* key, const char* value) { m_requestAttributesHasBeenSet = true; m_requestAttributes.emplace(key, value); return *this; } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline const Aws::String& GetResponseContentType() const{ return m_responseContentType; } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline bool ResponseContentTypeHasBeenSet() const { return m_responseContentTypeHasBeenSet; } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline void SetResponseContentType(const Aws::String& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = value; } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline void SetResponseContentType(Aws::String&& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = std::move(value); } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline void SetResponseContentType(const char* value) { m_responseContentTypeHasBeenSet = true; m_responseContentType.assign(value); } /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline ConfigurationEvent& WithResponseContentType(const Aws::String& value) { SetResponseContentType(value); return *this;} /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline ConfigurationEvent& WithResponseContentType(Aws::String&& value) { SetResponseContentType(std::move(value)); return *this;} /** *

The message that Amazon Lex V2 returns in the response can be either text or * speech based on the responseContentType value.

  • If * the value is text/plain;charset=utf-8, Amazon Lex V2 returns text * in the response.

  • If the value begins with audio/, * Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to * generate the speech using the configuration that you specified in the * requestContentType parameter. For example, if you specify * audio/mpeg as the value, Amazon Lex V2 returns speech in the MPEG * format.

  • If the value is audio/pcm, the speech * returned is audio/pcm in 16-bit, little-endian format.

  • The * following are the accepted values:

    • audio/mpeg

    • *

      audio/ogg

    • audio/pcm

    • audio/ * (defaults to * mpeg)

    • text/plain; charset=utf-8

*/ inline ConfigurationEvent& WithResponseContentType(const char* value) { SetResponseContentType(value); return *this;} inline const SessionState& GetSessionState() const{ return m_sessionState; } inline bool SessionStateHasBeenSet() const { return m_sessionStateHasBeenSet; } inline void SetSessionState(const SessionState& value) { m_sessionStateHasBeenSet = true; m_sessionState = value; } inline void SetSessionState(SessionState&& value) { m_sessionStateHasBeenSet = true; m_sessionState = std::move(value); } inline ConfigurationEvent& WithSessionState(const SessionState& value) { SetSessionState(value); return *this;} inline ConfigurationEvent& WithSessionState(SessionState&& value) { SetSessionState(std::move(value)); return *this;} /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline const Aws::Vector& GetWelcomeMessages() const{ return m_welcomeMessages; } /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline bool WelcomeMessagesHasBeenSet() const { return m_welcomeMessagesHasBeenSet; } /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline void SetWelcomeMessages(const Aws::Vector& value) { m_welcomeMessagesHasBeenSet = true; m_welcomeMessages = value; } /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline void SetWelcomeMessages(Aws::Vector&& value) { m_welcomeMessagesHasBeenSet = true; m_welcomeMessages = std::move(value); } /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline ConfigurationEvent& WithWelcomeMessages(const Aws::Vector& value) { SetWelcomeMessages(value); return *this;} /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline ConfigurationEvent& WithWelcomeMessages(Aws::Vector&& value) { SetWelcomeMessages(std::move(value)); return *this;} /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline ConfigurationEvent& AddWelcomeMessages(const Message& value) { m_welcomeMessagesHasBeenSet = true; m_welcomeMessages.push_back(value); return *this; } /** *

A list of messages to send to the user.

If you set the * welcomeMessage field, you must also set the * DialogAction structure's * type field.

*/ inline ConfigurationEvent& AddWelcomeMessages(Message&& value) { m_welcomeMessagesHasBeenSet = true; m_welcomeMessages.push_back(std::move(value)); return *this; } /** *

Determines whether Amazon Lex V2 should send audio responses to the client * application.

Set this field to false when the client is operating in a * playback mode where audio responses are played to the user. If the client isn't * operating in playback mode, such as a text chat application, set this to true so * that Amazon Lex V2 doesn't wait for the prompt to finish playing on the * client.

*/ inline bool GetDisablePlayback() const{ return m_disablePlayback; } /** *

Determines whether Amazon Lex V2 should send audio responses to the client * application.

Set this field to false when the client is operating in a * playback mode where audio responses are played to the user. If the client isn't * operating in playback mode, such as a text chat application, set this to true so * that Amazon Lex V2 doesn't wait for the prompt to finish playing on the * client.

*/ inline bool DisablePlaybackHasBeenSet() const { return m_disablePlaybackHasBeenSet; } /** *

Determines whether Amazon Lex V2 should send audio responses to the client * application.

Set this field to false when the client is operating in a * playback mode where audio responses are played to the user. If the client isn't * operating in playback mode, such as a text chat application, set this to true so * that Amazon Lex V2 doesn't wait for the prompt to finish playing on the * client.

*/ inline void SetDisablePlayback(bool value) { m_disablePlaybackHasBeenSet = true; m_disablePlayback = value; } /** *

Determines whether Amazon Lex V2 should send audio responses to the client * application.

Set this field to false when the client is operating in a * playback mode where audio responses are played to the user. If the client isn't * operating in playback mode, such as a text chat application, set this to true so * that Amazon Lex V2 doesn't wait for the prompt to finish playing on the * client.

*/ inline ConfigurationEvent& WithDisablePlayback(bool value) { SetDisablePlayback(value); return *this;} /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline const Aws::String& GetEventId() const{ return m_eventId; } /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; } /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline void SetEventId(const Aws::String& value) { m_eventIdHasBeenSet = true; m_eventId = value; } /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline void SetEventId(Aws::String&& value) { m_eventIdHasBeenSet = true; m_eventId = std::move(value); } /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline void SetEventId(const char* value) { m_eventIdHasBeenSet = true; m_eventId.assign(value); } /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline ConfigurationEvent& WithEventId(const Aws::String& value) { SetEventId(value); return *this;} /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline ConfigurationEvent& WithEventId(Aws::String&& value) { SetEventId(std::move(value)); return *this;} /** *

A unique identifier that your application assigns to the event. You can use * this to identify events in logs.

*/ inline ConfigurationEvent& WithEventId(const char* value) { SetEventId(value); return *this;} /** *

A timestamp set by the client of the date and time that the event was sent to * Amazon Lex V2.

*/ inline long long GetClientTimestampMillis() const{ return m_clientTimestampMillis; } /** *

A timestamp set by the client of the date and time that the event was sent to * Amazon Lex V2.

*/ inline bool ClientTimestampMillisHasBeenSet() const { return m_clientTimestampMillisHasBeenSet; } /** *

A timestamp set by the client of the date and time that the event was sent to * Amazon Lex V2.

*/ inline void SetClientTimestampMillis(long long value) { m_clientTimestampMillisHasBeenSet = true; m_clientTimestampMillis = value; } /** *

A timestamp set by the client of the date and time that the event was sent to * Amazon Lex V2.

*/ inline ConfigurationEvent& WithClientTimestampMillis(long long value) { SetClientTimestampMillis(value); return *this;} private: Aws::Map m_requestAttributes; bool m_requestAttributesHasBeenSet = false; Aws::String m_responseContentType; bool m_responseContentTypeHasBeenSet = false; SessionState m_sessionState; bool m_sessionStateHasBeenSet = false; Aws::Vector m_welcomeMessages; bool m_welcomeMessagesHasBeenSet = false; bool m_disablePlayback; bool m_disablePlaybackHasBeenSet = false; Aws::String m_eventId; bool m_eventIdHasBeenSet = false; long long m_clientTimestampMillis; bool m_clientTimestampMillisHasBeenSet = false; }; } // namespace Model } // namespace LexRuntimeV2 } // namespace Aws