/** * 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 #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Pinpoint { namespace Model { /** *

Specifies the configuration and other settings for a message.

See * Also:

AWS * API Reference

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

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline const Aws::Map& GetAddresses() const{ return m_addresses; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline bool AddressesHasBeenSet() const { return m_addressesHasBeenSet; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline void SetAddresses(const Aws::Map& value) { m_addressesHasBeenSet = true; m_addresses = value; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline void SetAddresses(Aws::Map&& value) { m_addressesHasBeenSet = true; m_addresses = std::move(value); } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& WithAddresses(const Aws::Map& value) { SetAddresses(value); return *this;} /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& WithAddresses(Aws::Map&& value) { SetAddresses(std::move(value)); return *this;} /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(const Aws::String& key, const AddressConfiguration& value) { m_addressesHasBeenSet = true; m_addresses.emplace(key, value); return *this; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(Aws::String&& key, const AddressConfiguration& value) { m_addressesHasBeenSet = true; m_addresses.emplace(std::move(key), value); return *this; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(const Aws::String& key, AddressConfiguration&& value) { m_addressesHasBeenSet = true; m_addresses.emplace(key, std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(Aws::String&& key, AddressConfiguration&& value) { m_addressesHasBeenSet = true; m_addresses.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(const char* key, AddressConfiguration&& value) { m_addressesHasBeenSet = true; m_addresses.emplace(key, std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an address and each value is an * AddressConfiguration * object. An address can be a push notification token, a phone number, or an email * address. You can use an AddressConfiguration * object to tailor the message for an address by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddAddresses(const char* key, const AddressConfiguration& value) { m_addressesHasBeenSet = true; m_addresses.emplace(key, value); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline const Aws::Map& GetContext() const{ return m_context; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline void SetContext(const Aws::Map& value) { m_contextHasBeenSet = true; m_context = value; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline void SetContext(Aws::Map&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& WithContext(const Aws::Map& value) { SetContext(value); return *this;} /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& WithContext(Aws::Map&& value) { SetContext(std::move(value)); return *this;} /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(const Aws::String& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(Aws::String&& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(const Aws::String& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(Aws::String&& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(const char* key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(Aws::String&& key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

A map of custom attributes to attach to the message. For a push notification, * this payload is added to the data.pinpoint object. For an email or text message, * this payload is added to email/SMS delivery receipt event attributes.

*/ inline MessageRequest& AddContext(const char* key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline const Aws::Map& GetEndpoints() const{ return m_endpoints; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline bool EndpointsHasBeenSet() const { return m_endpointsHasBeenSet; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline void SetEndpoints(const Aws::Map& value) { m_endpointsHasBeenSet = true; m_endpoints = value; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline void SetEndpoints(Aws::Map&& value) { m_endpointsHasBeenSet = true; m_endpoints = std::move(value); } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& WithEndpoints(const Aws::Map& value) { SetEndpoints(value); return *this;} /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& WithEndpoints(Aws::Map&& value) { SetEndpoints(std::move(value)); return *this;} /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(const Aws::String& key, const EndpointSendConfiguration& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(key, value); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(Aws::String&& key, const EndpointSendConfiguration& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(std::move(key), value); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(const Aws::String& key, EndpointSendConfiguration&& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(key, std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(Aws::String&& key, EndpointSendConfiguration&& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(const char* key, EndpointSendConfiguration&& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(key, std::move(value)); return *this; } /** *

A map of key-value pairs, where each key is an endpoint ID and each value is * an EndpointSendConfiguration * object. You can use an EndpointSendConfiguration * object to tailor the message for an endpoint by specifying settings such as * content overrides and message variables.

*/ inline MessageRequest& AddEndpoints(const char* key, const EndpointSendConfiguration& value) { m_endpointsHasBeenSet = true; m_endpoints.emplace(key, value); return *this; } /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline const DirectMessageConfiguration& GetMessageConfiguration() const{ return m_messageConfiguration; } /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline bool MessageConfigurationHasBeenSet() const { return m_messageConfigurationHasBeenSet; } /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline void SetMessageConfiguration(const DirectMessageConfiguration& value) { m_messageConfigurationHasBeenSet = true; m_messageConfiguration = value; } /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline void SetMessageConfiguration(DirectMessageConfiguration&& value) { m_messageConfigurationHasBeenSet = true; m_messageConfiguration = std::move(value); } /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline MessageRequest& WithMessageConfiguration(const DirectMessageConfiguration& value) { SetMessageConfiguration(value); return *this;} /** *

The settings and content for the default message and any default messages * that you defined for specific channels.

*/ inline MessageRequest& WithMessageConfiguration(DirectMessageConfiguration&& value) { SetMessageConfiguration(std::move(value)); return *this;} /** *

The message template to use for the message.

*/ inline const TemplateConfiguration& GetTemplateConfiguration() const{ return m_templateConfiguration; } /** *

The message template to use for the message.

*/ inline bool TemplateConfigurationHasBeenSet() const { return m_templateConfigurationHasBeenSet; } /** *

The message template to use for the message.

*/ inline void SetTemplateConfiguration(const TemplateConfiguration& value) { m_templateConfigurationHasBeenSet = true; m_templateConfiguration = value; } /** *

The message template to use for the message.

*/ inline void SetTemplateConfiguration(TemplateConfiguration&& value) { m_templateConfigurationHasBeenSet = true; m_templateConfiguration = std::move(value); } /** *

The message template to use for the message.

*/ inline MessageRequest& WithTemplateConfiguration(const TemplateConfiguration& value) { SetTemplateConfiguration(value); return *this;} /** *

The message template to use for the message.

*/ inline MessageRequest& WithTemplateConfiguration(TemplateConfiguration&& value) { SetTemplateConfiguration(std::move(value)); return *this;} /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline const Aws::String& GetTraceId() const{ return m_traceId; } /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline bool TraceIdHasBeenSet() const { return m_traceIdHasBeenSet; } /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline void SetTraceId(const Aws::String& value) { m_traceIdHasBeenSet = true; m_traceId = value; } /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline void SetTraceId(Aws::String&& value) { m_traceIdHasBeenSet = true; m_traceId = std::move(value); } /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline void SetTraceId(const char* value) { m_traceIdHasBeenSet = true; m_traceId.assign(value); } /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline MessageRequest& WithTraceId(const Aws::String& value) { SetTraceId(value); return *this;} /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline MessageRequest& WithTraceId(Aws::String&& value) { SetTraceId(std::move(value)); return *this;} /** *

The unique identifier for tracing the message. This identifier is visible to * message recipients.

*/ inline MessageRequest& WithTraceId(const char* value) { SetTraceId(value); return *this;} private: Aws::Map m_addresses; bool m_addressesHasBeenSet = false; Aws::Map m_context; bool m_contextHasBeenSet = false; Aws::Map m_endpoints; bool m_endpointsHasBeenSet = false; DirectMessageConfiguration m_messageConfiguration; bool m_messageConfigurationHasBeenSet = false; TemplateConfiguration m_templateConfiguration; bool m_templateConfigurationHasBeenSet = false; Aws::String m_traceId; bool m_traceIdHasBeenSet = false; }; } // namespace Model } // namespace Pinpoint } // namespace Aws