AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Message.h
1
6#pragma once
7#include <aws/sqs/SQS_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/sqs/model/MessageSystemAttributeName.h>
11#include <aws/sqs/model/MessageAttributeValue.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace SQS
25{
26namespace Model
27{
28
34 class Message
35 {
36 public:
37 AWS_SQS_API Message() = default;
38 AWS_SQS_API Message(Aws::Utils::Json::JsonView jsonValue);
41
42
44
49 inline const Aws::String& GetMessageId() const { return m_messageId; }
50 inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; }
51 template<typename MessageIdT = Aws::String>
52 void SetMessageId(MessageIdT&& value) { m_messageIdHasBeenSet = true; m_messageId = std::forward<MessageIdT>(value); }
53 template<typename MessageIdT = Aws::String>
54 Message& WithMessageId(MessageIdT&& value) { SetMessageId(std::forward<MessageIdT>(value)); return *this;}
56
58
63 inline const Aws::String& GetReceiptHandle() const { return m_receiptHandle; }
64 inline bool ReceiptHandleHasBeenSet() const { return m_receiptHandleHasBeenSet; }
65 template<typename ReceiptHandleT = Aws::String>
66 void SetReceiptHandle(ReceiptHandleT&& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = std::forward<ReceiptHandleT>(value); }
67 template<typename ReceiptHandleT = Aws::String>
68 Message& WithReceiptHandle(ReceiptHandleT&& value) { SetReceiptHandle(std::forward<ReceiptHandleT>(value)); return *this;}
70
72
75 inline const Aws::String& GetMD5OfBody() const { return m_mD5OfBody; }
76 inline bool MD5OfBodyHasBeenSet() const { return m_mD5OfBodyHasBeenSet; }
77 template<typename MD5OfBodyT = Aws::String>
78 void SetMD5OfBody(MD5OfBodyT&& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = std::forward<MD5OfBodyT>(value); }
79 template<typename MD5OfBodyT = Aws::String>
80 Message& WithMD5OfBody(MD5OfBodyT&& value) { SetMD5OfBody(std::forward<MD5OfBodyT>(value)); return *this;}
82
84
87 inline const Aws::String& GetBody() const { return m_body; }
88 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
89 template<typename BodyT = Aws::String>
90 void SetBody(BodyT&& value) { m_bodyHasBeenSet = true; m_body = std::forward<BodyT>(value); }
91 template<typename BodyT = Aws::String>
92 Message& WithBody(BodyT&& value) { SetBody(std::forward<BodyT>(value)); return *this;}
94
96
110 inline const Aws::Map<MessageSystemAttributeName, Aws::String>& GetAttributes() const { return m_attributes; }
111 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
112 template<typename AttributesT = Aws::Map<MessageSystemAttributeName, Aws::String>>
113 void SetAttributes(AttributesT&& value) { m_attributesHasBeenSet = true; m_attributes = std::forward<AttributesT>(value); }
114 template<typename AttributesT = Aws::Map<MessageSystemAttributeName, Aws::String>>
115 Message& WithAttributes(AttributesT&& value) { SetAttributes(std::forward<AttributesT>(value)); return *this;}
117 m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this;
118 }
120
122
128 inline const Aws::String& GetMD5OfMessageAttributes() const { return m_mD5OfMessageAttributes; }
129 inline bool MD5OfMessageAttributesHasBeenSet() const { return m_mD5OfMessageAttributesHasBeenSet; }
130 template<typename MD5OfMessageAttributesT = Aws::String>
131 void SetMD5OfMessageAttributes(MD5OfMessageAttributesT&& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = std::forward<MD5OfMessageAttributesT>(value); }
132 template<typename MD5OfMessageAttributesT = Aws::String>
133 Message& WithMD5OfMessageAttributes(MD5OfMessageAttributesT&& value) { SetMD5OfMessageAttributes(std::forward<MD5OfMessageAttributesT>(value)); return *this;}
135
137
143 inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const { return m_messageAttributes; }
144 inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; }
145 template<typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
146 void SetMessageAttributes(MessageAttributesT&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = std::forward<MessageAttributesT>(value); }
147 template<typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
148 Message& WithMessageAttributes(MessageAttributesT&& value) { SetMessageAttributes(std::forward<MessageAttributesT>(value)); return *this;}
149 template<typename MessageAttributesKeyT = Aws::String, typename MessageAttributesValueT = MessageAttributeValue>
150 Message& AddMessageAttributes(MessageAttributesKeyT&& key, MessageAttributesValueT&& value) {
151 m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::forward<MessageAttributesKeyT>(key), std::forward<MessageAttributesValueT>(value)); return *this;
152 }
154 private:
155
156 Aws::String m_messageId;
157 bool m_messageIdHasBeenSet = false;
158
159 Aws::String m_receiptHandle;
160 bool m_receiptHandleHasBeenSet = false;
161
162 Aws::String m_mD5OfBody;
163 bool m_mD5OfBodyHasBeenSet = false;
164
165 Aws::String m_body;
166 bool m_bodyHasBeenSet = false;
167
169 bool m_attributesHasBeenSet = false;
170
171 Aws::String m_mD5OfMessageAttributes;
172 bool m_mD5OfMessageAttributesHasBeenSet = false;
173
175 bool m_messageAttributesHasBeenSet = false;
176 };
177
178} // namespace Model
179} // namespace SQS
180} // namespace Aws
void SetReceiptHandle(ReceiptHandleT &&value)
Definition Message.h:66
const Aws::String & GetMD5OfMessageAttributes() const
Definition Message.h:128
void SetMD5OfMessageAttributes(MD5OfMessageAttributesT &&value)
Definition Message.h:131
bool BodyHasBeenSet() const
Definition Message.h:88
bool MessageIdHasBeenSet() const
Definition Message.h:50
Message & AddMessageAttributes(MessageAttributesKeyT &&key, MessageAttributesValueT &&value)
Definition Message.h:150
bool MD5OfBodyHasBeenSet() const
Definition Message.h:76
Message & WithMD5OfBody(MD5OfBodyT &&value)
Definition Message.h:80
const Aws::String & GetMD5OfBody() const
Definition Message.h:75
bool MD5OfMessageAttributesHasBeenSet() const
Definition Message.h:129
Message & WithMessageId(MessageIdT &&value)
Definition Message.h:54
Message & WithReceiptHandle(ReceiptHandleT &&value)
Definition Message.h:68
Message & WithMD5OfMessageAttributes(MD5OfMessageAttributesT &&value)
Definition Message.h:133
void SetMessageId(MessageIdT &&value)
Definition Message.h:52
Message & WithMessageAttributes(MessageAttributesT &&value)
Definition Message.h:148
void SetAttributes(AttributesT &&value)
Definition Message.h:113
Message & AddAttributes(MessageSystemAttributeName key, Aws::String value)
Definition Message.h:116
bool MessageAttributesHasBeenSet() const
Definition Message.h:144
void SetMessageAttributes(MessageAttributesT &&value)
Definition Message.h:146
AWS_SQS_API Aws::Utils::Json::JsonValue Jsonize() const
bool ReceiptHandleHasBeenSet() const
Definition Message.h:64
const Aws::Map< MessageSystemAttributeName, Aws::String > & GetAttributes() const
Definition Message.h:110
AWS_SQS_API Message()=default
const Aws::String & GetReceiptHandle() const
Definition Message.h:63
AWS_SQS_API Message & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetMD5OfBody(MD5OfBodyT &&value)
Definition Message.h:78
void SetBody(BodyT &&value)
Definition Message.h:90
const Aws::String & GetBody() const
Definition Message.h:87
AWS_SQS_API Message(Aws::Utils::Json::JsonView jsonValue)
bool AttributesHasBeenSet() const
Definition Message.h:111
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
Definition Message.h:143
Message & WithBody(BodyT &&value)
Definition Message.h:92
const Aws::String & GetMessageId() const
Definition Message.h:49
Message & WithAttributes(AttributesT &&value)
Definition Message.h:115
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue