/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace SNS { namespace Model { /** *

The user-specified message attribute value. For string data types, the value * attribute has the same restrictions on the content as the message body. For more * information, see Publish.

*

Name, type, and value must not be empty or null. In addition, the message * body should not be empty or null. All parts of the message attribute, including * name, type, and value, are included in the message size restriction, which is * currently 256 KB (262,144 bytes). For more information, see Amazon * SNS message attributes and Publishing * to a mobile phone in the Amazon SNS Developer Guide.

See * Also:

AWS * API Reference

*/ class MessageAttributeValue { public: AWS_SNS_API MessageAttributeValue(); AWS_SNS_API MessageAttributeValue(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SNS_API MessageAttributeValue& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SNS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_SNS_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline const Aws::String& GetDataType() const{ return m_dataType; } /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline bool DataTypeHasBeenSet() const { return m_dataTypeHasBeenSet; } /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline void SetDataType(const Aws::String& value) { m_dataTypeHasBeenSet = true; m_dataType = value; } /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline void SetDataType(Aws::String&& value) { m_dataTypeHasBeenSet = true; m_dataType = std::move(value); } /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline void SetDataType(const char* value) { m_dataTypeHasBeenSet = true; m_dataType.assign(value); } /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline MessageAttributeValue& WithDataType(const Aws::String& value) { SetDataType(value); return *this;} /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline MessageAttributeValue& WithDataType(Aws::String&& value) { SetDataType(std::move(value)); return *this;} /** *

Amazon SNS supports the following logical data types: String, String.Array, * Number, and Binary. For more information, see Message * Attribute Data Types.

*/ inline MessageAttributeValue& WithDataType(const char* value) { SetDataType(value); return *this;} /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline const Aws::String& GetStringValue() const{ return m_stringValue; } /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; } /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline void SetStringValue(const Aws::String& value) { m_stringValueHasBeenSet = true; m_stringValue = value; } /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline void SetStringValue(Aws::String&& value) { m_stringValueHasBeenSet = true; m_stringValue = std::move(value); } /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline void SetStringValue(const char* value) { m_stringValueHasBeenSet = true; m_stringValue.assign(value); } /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline MessageAttributeValue& WithStringValue(const Aws::String& value) { SetStringValue(value); return *this;} /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline MessageAttributeValue& WithStringValue(Aws::String&& value) { SetStringValue(std::move(value)); return *this;} /** *

Strings are Unicode with UTF8 binary encoding. For a list of code values, see * ASCII * Printable Characters.

*/ inline MessageAttributeValue& WithStringValue(const char* value) { SetStringValue(value); return *this;} /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline const Aws::Utils::ByteBuffer& GetBinaryValue() const{ return m_binaryValue; } /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline bool BinaryValueHasBeenSet() const { return m_binaryValueHasBeenSet; } /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline void SetBinaryValue(const Aws::Utils::ByteBuffer& value) { m_binaryValueHasBeenSet = true; m_binaryValue = value; } /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline void SetBinaryValue(Aws::Utils::ByteBuffer&& value) { m_binaryValueHasBeenSet = true; m_binaryValue = std::move(value); } /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline MessageAttributeValue& WithBinaryValue(const Aws::Utils::ByteBuffer& value) { SetBinaryValue(value); return *this;} /** *

Binary type attributes can store any binary data, for example, compressed * data, encrypted data, or images.

*/ inline MessageAttributeValue& WithBinaryValue(Aws::Utils::ByteBuffer&& value) { SetBinaryValue(std::move(value)); return *this;} private: Aws::String m_dataType; bool m_dataTypeHasBeenSet = false; Aws::String m_stringValue; bool m_stringValueHasBeenSet = false; Aws::Utils::ByteBuffer m_binaryValue; bool m_binaryValueHasBeenSet = false; }; } // namespace Model } // namespace SNS } // namespace Aws