/** * 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 PinpointSMSVoiceV2 { namespace Model { /** */ class SendTextMessageRequest : public PinpointSMSVoiceV2Request { public: AWS_PINPOINTSMSVOICEV2_API SendTextMessageRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SendTextMessage"; } AWS_PINPOINTSMSVOICEV2_API Aws::String SerializePayload() const override; AWS_PINPOINTSMSVOICEV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The destination phone number in E.164 format.

*/ inline const Aws::String& GetDestinationPhoneNumber() const{ return m_destinationPhoneNumber; } /** *

The destination phone number in E.164 format.

*/ inline bool DestinationPhoneNumberHasBeenSet() const { return m_destinationPhoneNumberHasBeenSet; } /** *

The destination phone number in E.164 format.

*/ inline void SetDestinationPhoneNumber(const Aws::String& value) { m_destinationPhoneNumberHasBeenSet = true; m_destinationPhoneNumber = value; } /** *

The destination phone number in E.164 format.

*/ inline void SetDestinationPhoneNumber(Aws::String&& value) { m_destinationPhoneNumberHasBeenSet = true; m_destinationPhoneNumber = std::move(value); } /** *

The destination phone number in E.164 format.

*/ inline void SetDestinationPhoneNumber(const char* value) { m_destinationPhoneNumberHasBeenSet = true; m_destinationPhoneNumber.assign(value); } /** *

The destination phone number in E.164 format.

*/ inline SendTextMessageRequest& WithDestinationPhoneNumber(const Aws::String& value) { SetDestinationPhoneNumber(value); return *this;} /** *

The destination phone number in E.164 format.

*/ inline SendTextMessageRequest& WithDestinationPhoneNumber(Aws::String&& value) { SetDestinationPhoneNumber(std::move(value)); return *this;} /** *

The destination phone number in E.164 format.

*/ inline SendTextMessageRequest& WithDestinationPhoneNumber(const char* value) { SetDestinationPhoneNumber(value); return *this;} /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline const Aws::String& GetOriginationIdentity() const{ return m_originationIdentity; } /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline bool OriginationIdentityHasBeenSet() const { return m_originationIdentityHasBeenSet; } /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline void SetOriginationIdentity(const Aws::String& value) { m_originationIdentityHasBeenSet = true; m_originationIdentity = value; } /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline void SetOriginationIdentity(Aws::String&& value) { m_originationIdentityHasBeenSet = true; m_originationIdentity = std::move(value); } /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline void SetOriginationIdentity(const char* value) { m_originationIdentityHasBeenSet = true; m_originationIdentity.assign(value); } /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline SendTextMessageRequest& WithOriginationIdentity(const Aws::String& value) { SetOriginationIdentity(value); return *this;} /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline SendTextMessageRequest& WithOriginationIdentity(Aws::String&& value) { SetOriginationIdentity(std::move(value)); return *this;} /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

*/ inline SendTextMessageRequest& WithOriginationIdentity(const char* value) { SetOriginationIdentity(value); return *this;} /** *

The body of the text message.

*/ inline const Aws::String& GetMessageBody() const{ return m_messageBody; } /** *

The body of the text message.

*/ inline bool MessageBodyHasBeenSet() const { return m_messageBodyHasBeenSet; } /** *

The body of the text message.

*/ inline void SetMessageBody(const Aws::String& value) { m_messageBodyHasBeenSet = true; m_messageBody = value; } /** *

The body of the text message.

*/ inline void SetMessageBody(Aws::String&& value) { m_messageBodyHasBeenSet = true; m_messageBody = std::move(value); } /** *

The body of the text message.

*/ inline void SetMessageBody(const char* value) { m_messageBodyHasBeenSet = true; m_messageBody.assign(value); } /** *

The body of the text message.

*/ inline SendTextMessageRequest& WithMessageBody(const Aws::String& value) { SetMessageBody(value); return *this;} /** *

The body of the text message.

*/ inline SendTextMessageRequest& WithMessageBody(Aws::String&& value) { SetMessageBody(std::move(value)); return *this;} /** *

The body of the text message.

*/ inline SendTextMessageRequest& WithMessageBody(const char* value) { SetMessageBody(value); return *this;} /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline const MessageType& GetMessageType() const{ return m_messageType; } /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline bool MessageTypeHasBeenSet() const { return m_messageTypeHasBeenSet; } /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline void SetMessageType(const MessageType& value) { m_messageTypeHasBeenSet = true; m_messageType = value; } /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline void SetMessageType(MessageType&& value) { m_messageTypeHasBeenSet = true; m_messageType = std::move(value); } /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline SendTextMessageRequest& WithMessageType(const MessageType& value) { SetMessageType(value); return *this;} /** *

The type of message. Valid values are TRANSACTIONAL for messages that are * critical or time-sensitive and PROMOTIONAL for messages that aren't critical or * time-sensitive.

*/ inline SendTextMessageRequest& WithMessageType(MessageType&& value) { SetMessageType(std::move(value)); return *this;} /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline const Aws::String& GetKeyword() const{ return m_keyword; } /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline bool KeywordHasBeenSet() const { return m_keywordHasBeenSet; } /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline void SetKeyword(const Aws::String& value) { m_keywordHasBeenSet = true; m_keyword = value; } /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline void SetKeyword(Aws::String&& value) { m_keywordHasBeenSet = true; m_keyword = std::move(value); } /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline void SetKeyword(const char* value) { m_keywordHasBeenSet = true; m_keyword.assign(value); } /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline SendTextMessageRequest& WithKeyword(const Aws::String& value) { SetKeyword(value); return *this;} /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline SendTextMessageRequest& WithKeyword(Aws::String&& value) { SetKeyword(std::move(value)); return *this;} /** *

When you register a short code in the US, you must specify a program name. If * you don���t have a US short code, omit this attribute.

*/ inline SendTextMessageRequest& WithKeyword(const char* value) { SetKeyword(value); return *this;} /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline const Aws::String& GetConfigurationSetName() const{ return m_configurationSetName; } /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline bool ConfigurationSetNameHasBeenSet() const { return m_configurationSetNameHasBeenSet; } /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline void SetConfigurationSetName(const Aws::String& value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName = value; } /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline void SetConfigurationSetName(Aws::String&& value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName = std::move(value); } /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline void SetConfigurationSetName(const char* value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName.assign(value); } /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline SendTextMessageRequest& WithConfigurationSetName(const Aws::String& value) { SetConfigurationSetName(value); return *this;} /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline SendTextMessageRequest& WithConfigurationSetName(Aws::String&& value) { SetConfigurationSetName(std::move(value)); return *this;} /** *

The name of the configuration set to use. This can be either the * ConfigurationSetName or ConfigurationSetArn.

*/ inline SendTextMessageRequest& WithConfigurationSetName(const char* value) { SetConfigurationSetName(value); return *this;} /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline const Aws::String& GetMaxPrice() const{ return m_maxPrice; } /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline bool MaxPriceHasBeenSet() const { return m_maxPriceHasBeenSet; } /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline void SetMaxPrice(const Aws::String& value) { m_maxPriceHasBeenSet = true; m_maxPrice = value; } /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline void SetMaxPrice(Aws::String&& value) { m_maxPriceHasBeenSet = true; m_maxPrice = std::move(value); } /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline void SetMaxPrice(const char* value) { m_maxPriceHasBeenSet = true; m_maxPrice.assign(value); } /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline SendTextMessageRequest& WithMaxPrice(const Aws::String& value) { SetMaxPrice(value); return *this;} /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline SendTextMessageRequest& WithMaxPrice(Aws::String&& value) { SetMaxPrice(std::move(value)); return *this;} /** *

The maximum amount that you want to spend, in US dollars, per each text * message part. A text message can contain multiple parts.

*/ inline SendTextMessageRequest& WithMaxPrice(const char* value) { SetMaxPrice(value); return *this;} /** *

How long the text message is valid for. By default this is 72 hours.

*/ inline int GetTimeToLive() const{ return m_timeToLive; } /** *

How long the text message is valid for. By default this is 72 hours.

*/ inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; } /** *

How long the text message is valid for. By default this is 72 hours.

*/ inline void SetTimeToLive(int value) { m_timeToLiveHasBeenSet = true; m_timeToLive = value; } /** *

How long the text message is valid for. By default this is 72 hours.

*/ inline SendTextMessageRequest& WithTimeToLive(int value) { SetTimeToLive(value); return *this;} /** *

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

You can specify custom data in this field. If you do, that data is logged to * the event destination.

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

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline const Aws::Map& GetDestinationCountryParameters() const{ return m_destinationCountryParameters; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline bool DestinationCountryParametersHasBeenSet() const { return m_destinationCountryParametersHasBeenSet; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline void SetDestinationCountryParameters(const Aws::Map& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters = value; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline void SetDestinationCountryParameters(Aws::Map&& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters = std::move(value); } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& WithDestinationCountryParameters(const Aws::Map& value) { SetDestinationCountryParameters(value); return *this;} /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& WithDestinationCountryParameters(Aws::Map&& value) { SetDestinationCountryParameters(std::move(value)); return *this;} /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(const DestinationCountryParameterKey& key, const Aws::String& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(key, value); return *this; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(DestinationCountryParameterKey&& key, const Aws::String& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(std::move(key), value); return *this; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(const DestinationCountryParameterKey& key, Aws::String&& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(key, std::move(value)); return *this; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(DestinationCountryParameterKey&& key, Aws::String&& value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(DestinationCountryParameterKey&& key, const char* value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(std::move(key), value); return *this; } /** *

This field is used for any country-specific registration requirements. * Currently, this setting is only used when you send messages to recipients in * India using a sender ID. For more information see Special * requirements for sending SMS messages to recipients in India.

*/ inline SendTextMessageRequest& AddDestinationCountryParameters(const DestinationCountryParameterKey& key, const char* value) { m_destinationCountryParametersHasBeenSet = true; m_destinationCountryParameters.emplace(key, value); return *this; } /** *

When set to true, the message is checked and validated, but isn't sent to the * end recipient.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

When set to true, the message is checked and validated, but isn't sent to the * end recipient.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

When set to true, the message is checked and validated, but isn't sent to the * end recipient.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

When set to true, the message is checked and validated, but isn't sent to the * end recipient.

*/ inline SendTextMessageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_destinationPhoneNumber; bool m_destinationPhoneNumberHasBeenSet = false; Aws::String m_originationIdentity; bool m_originationIdentityHasBeenSet = false; Aws::String m_messageBody; bool m_messageBodyHasBeenSet = false; MessageType m_messageType; bool m_messageTypeHasBeenSet = false; Aws::String m_keyword; bool m_keywordHasBeenSet = false; Aws::String m_configurationSetName; bool m_configurationSetNameHasBeenSet = false; Aws::String m_maxPrice; bool m_maxPriceHasBeenSet = false; int m_timeToLive; bool m_timeToLiveHasBeenSet = false; Aws::Map m_context; bool m_contextHasBeenSet = false; Aws::Map m_destinationCountryParameters; bool m_destinationCountryParametersHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace PinpointSMSVoiceV2 } // namespace Aws