/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace SQS { 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 SendMessage.

*

Name, type, value and the message * body must not be empty or null. All parts of the message attribute, including * Name, Type, and Value, are part of the * message size restriction (256 KiB or 262,144 bytes).

See Also:

* AWS * API Reference

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

Strings are Unicode with UTF-8 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 UTF-8 binary encoding. For a list of code values, * see ASCII * Printable Characters.

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

Strings are Unicode with UTF-8 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 UTF-8 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 UTF-8 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 UTF-8 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 UTF-8 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 UTF-8 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, such as compressed data, * encrypted data, or images.

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

Binary type attributes can store any binary data, such as compressed data, * encrypted data, or images.

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

Binary type attributes can store any binary data, such as 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, such as 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, such as 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, such as compressed data, * encrypted data, or images.

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

Not implemented. Reserved for future use.

*/ inline const Aws::Vector& GetStringListValues() const{ return m_stringListValues; } /** *

Not implemented. Reserved for future use.

*/ inline bool StringListValuesHasBeenSet() const { return m_stringListValuesHasBeenSet; } /** *

Not implemented. Reserved for future use.

*/ inline void SetStringListValues(const Aws::Vector& value) { m_stringListValuesHasBeenSet = true; m_stringListValues = value; } /** *

Not implemented. Reserved for future use.

*/ inline void SetStringListValues(Aws::Vector&& value) { m_stringListValuesHasBeenSet = true; m_stringListValues = std::move(value); } /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& WithStringListValues(const Aws::Vector& value) { SetStringListValues(value); return *this;} /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& WithStringListValues(Aws::Vector&& value) { SetStringListValues(std::move(value)); return *this;} /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& AddStringListValues(const Aws::String& value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(value); return *this; } /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& AddStringListValues(Aws::String&& value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(std::move(value)); return *this; } /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& AddStringListValues(const char* value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(value); return *this; } /** *

Not implemented. Reserved for future use.

*/ inline const Aws::Vector& GetBinaryListValues() const{ return m_binaryListValues; } /** *

Not implemented. Reserved for future use.

*/ inline bool BinaryListValuesHasBeenSet() const { return m_binaryListValuesHasBeenSet; } /** *

Not implemented. Reserved for future use.

*/ inline void SetBinaryListValues(const Aws::Vector& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues = value; } /** *

Not implemented. Reserved for future use.

*/ inline void SetBinaryListValues(Aws::Vector&& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues = std::move(value); } /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& WithBinaryListValues(const Aws::Vector& value) { SetBinaryListValues(value); return *this;} /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& WithBinaryListValues(Aws::Vector&& value) { SetBinaryListValues(std::move(value)); return *this;} /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& AddBinaryListValues(const Aws::Utils::ByteBuffer& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues.push_back(value); return *this; } /** *

Not implemented. Reserved for future use.

*/ inline MessageAttributeValue& AddBinaryListValues(Aws::Utils::ByteBuffer&& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues.push_back(std::move(value)); return *this; } /** *

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

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

Amazon SQS supports the following logical data types: String, * Number, and Binary. For the Number data * type, you must use StringValue.

You can also append custom * labels. For more information, see Amazon * SQS Message Attributes in the Amazon SQS Developer Guide.

*/ inline MessageAttributeValue& WithDataType(const char* value) { SetDataType(value); return *this;} private: Aws::String m_stringValue; bool m_stringValueHasBeenSet = false; Aws::Utils::ByteBuffer m_binaryValue; bool m_binaryValueHasBeenSet = false; Aws::Vector m_stringListValues; bool m_stringListValuesHasBeenSet = false; Aws::Vector m_binaryListValues; bool m_binaryListValuesHasBeenSet = false; Aws::String m_dataType; bool m_dataTypeHasBeenSet = false; }; } // namespace Model } // namespace SQS } // namespace Aws