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

An Amazon SQS message.

See Also:

AWS API * Reference

*/ class Message { public: AWS_SQS_API Message(); AWS_SQS_API Message(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SQS_API Message& 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; /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline const Aws::String& GetMessageId() const{ return m_messageId; } /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; } /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; } /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = std::move(value); } /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); } /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline Message& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;} /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline Message& WithMessageId(Aws::String&& value) { SetMessageId(std::move(value)); return *this;} /** *

A unique identifier for the message. A MessageIdis considered * unique across all Amazon Web Services accounts for an extended period of * time.

*/ inline Message& WithMessageId(const char* value) { SetMessageId(value); return *this;} /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline const Aws::String& GetReceiptHandle() const{ return m_receiptHandle; } /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline bool ReceiptHandleHasBeenSet() const { return m_receiptHandleHasBeenSet; } /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline void SetReceiptHandle(const Aws::String& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = value; } /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline void SetReceiptHandle(Aws::String&& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = std::move(value); } /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline void SetReceiptHandle(const char* value) { m_receiptHandleHasBeenSet = true; m_receiptHandle.assign(value); } /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline Message& WithReceiptHandle(const Aws::String& value) { SetReceiptHandle(value); return *this;} /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline Message& WithReceiptHandle(Aws::String&& value) { SetReceiptHandle(std::move(value)); return *this;} /** *

An identifier associated with the act of receiving the message. A new receipt * handle is returned every time you receive a message. When deleting a message, * you provide the last received receipt handle to delete the message.

*/ inline Message& WithReceiptHandle(const char* value) { SetReceiptHandle(value); return *this;} /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline const Aws::String& GetMD5OfBody() const{ return m_mD5OfBody; } /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline bool MD5OfBodyHasBeenSet() const { return m_mD5OfBodyHasBeenSet; } /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline void SetMD5OfBody(const Aws::String& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = value; } /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline void SetMD5OfBody(Aws::String&& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = std::move(value); } /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline void SetMD5OfBody(const char* value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody.assign(value); } /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline Message& WithMD5OfBody(const Aws::String& value) { SetMD5OfBody(value); return *this;} /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline Message& WithMD5OfBody(Aws::String&& value) { SetMD5OfBody(std::move(value)); return *this;} /** *

An MD5 digest of the non-URL-encoded message body string.

*/ inline Message& WithMD5OfBody(const char* value) { SetMD5OfBody(value); return *this;} /** *

The message's contents (not URL-encoded).

*/ inline const Aws::String& GetBody() const{ return m_body; } /** *

The message's contents (not URL-encoded).

*/ inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; } /** *

The message's contents (not URL-encoded).

*/ inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; } /** *

The message's contents (not URL-encoded).

*/ inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = std::move(value); } /** *

The message's contents (not URL-encoded).

*/ inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); } /** *

The message's contents (not URL-encoded).

*/ inline Message& WithBody(const Aws::String& value) { SetBody(value); return *this;} /** *

The message's contents (not URL-encoded).

*/ inline Message& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;} /** *

The message's contents (not URL-encoded).

*/ inline Message& WithBody(const char* value) { SetBody(value); return *this;} /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(const MessageSystemAttributeName& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(MessageSystemAttributeName&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(const MessageSystemAttributeName& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(MessageSystemAttributeName&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(MessageSystemAttributeName&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A map of the attributes requested in ReceiveMessage to * their respective values. Supported attributes:

  • * ApproximateReceiveCount

  • * ApproximateFirstReceiveTimestamp

  • * MessageDeduplicationId

  • * MessageGroupId

  • SenderId

  • *
  • SentTimestamp

  • * SequenceNumber

* ApproximateFirstReceiveTimestamp and SentTimestamp are * each returned as an integer representing the epoch time in * milliseconds.

*/ inline Message& AddAttributes(const MessageSystemAttributeName& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline const Aws::String& GetMD5OfMessageAttributes() const{ return m_mD5OfMessageAttributes; } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline bool MD5OfMessageAttributesHasBeenSet() const { return m_mD5OfMessageAttributesHasBeenSet; } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline void SetMD5OfMessageAttributes(const Aws::String& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = value; } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline void SetMD5OfMessageAttributes(Aws::String&& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = std::move(value); } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline void SetMD5OfMessageAttributes(const char* value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes.assign(value); } /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline Message& WithMD5OfMessageAttributes(const Aws::String& value) { SetMD5OfMessageAttributes(value); return *this;} /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline Message& WithMD5OfMessageAttributes(Aws::String&& value) { SetMD5OfMessageAttributes(std::move(value)); return *this;} /** *

An MD5 digest of the non-URL-encoded message attribute string. You can use * this attribute to verify that Amazon SQS received the message correctly. Amazon * SQS URL-decodes the message before creating the MD5 digest. For information * about MD5, see RFC1321.

*/ inline Message& WithMD5OfMessageAttributes(const char* value) { SetMD5OfMessageAttributes(value); return *this;} /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline const Aws::Map& GetMessageAttributes() const{ return m_messageAttributes; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline void SetMessageAttributes(const Aws::Map& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline void SetMessageAttributes(Aws::Map&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = std::move(value); } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& WithMessageAttributes(const Aws::Map& value) { SetMessageAttributes(value); return *this;} /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& WithMessageAttributes(Aws::Map&& value) { SetMessageAttributes(std::move(value)); return *this;} /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), value); return *this; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), std::move(value)); return *this; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; } /** *

Each message attribute consists of a Name, Type, * and Value. For more information, see Amazon * SQS message attributes in the Amazon SQS Developer Guide.

*/ inline Message& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; } private: Aws::String m_messageId; bool m_messageIdHasBeenSet = false; Aws::String m_receiptHandle; bool m_receiptHandleHasBeenSet = false; Aws::String m_mD5OfBody; bool m_mD5OfBodyHasBeenSet = false; Aws::String m_body; bool m_bodyHasBeenSet = false; Aws::Map m_attributes; bool m_attributesHasBeenSet = false; Aws::String m_mD5OfMessageAttributes; bool m_mD5OfMessageAttributesHasBeenSet = false; Aws::Map m_messageAttributes; bool m_messageAttributesHasBeenSet = false; }; } // namespace Model } // namespace SQS } // namespace Aws