AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
Message.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/sqs/SQS_EXPORTS.h>
10#include <aws/sqs/model/MessageAttributeValue.h>
11#include <aws/sqs/model/MessageSystemAttributeName.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace SQS {
23namespace Model {
24
30class Message {
31 public:
32 AWS_SQS_API Message() = default;
33 AWS_SQS_API Message(Aws::Utils::Json::JsonView jsonValue);
36
38
43 inline const Aws::String& GetMessageId() const { return m_messageId; }
44 inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; }
45 template <typename MessageIdT = Aws::String>
46 void SetMessageId(MessageIdT&& value) {
47 m_messageIdHasBeenSet = true;
48 m_messageId = std::forward<MessageIdT>(value);
49 }
50 template <typename MessageIdT = Aws::String>
51 Message& WithMessageId(MessageIdT&& value) {
52 SetMessageId(std::forward<MessageIdT>(value));
53 return *this;
54 }
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) {
67 m_receiptHandleHasBeenSet = true;
68 m_receiptHandle = std::forward<ReceiptHandleT>(value);
69 }
70 template <typename ReceiptHandleT = Aws::String>
71 Message& WithReceiptHandle(ReceiptHandleT&& value) {
72 SetReceiptHandle(std::forward<ReceiptHandleT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetMD5OfBody() const { return m_mD5OfBody; }
82 inline bool MD5OfBodyHasBeenSet() const { return m_mD5OfBodyHasBeenSet; }
83 template <typename MD5OfBodyT = Aws::String>
84 void SetMD5OfBody(MD5OfBodyT&& value) {
85 m_mD5OfBodyHasBeenSet = true;
86 m_mD5OfBody = std::forward<MD5OfBodyT>(value);
87 }
88 template <typename MD5OfBodyT = Aws::String>
89 Message& WithMD5OfBody(MD5OfBodyT&& value) {
90 SetMD5OfBody(std::forward<MD5OfBodyT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetBody() const { return m_body; }
100 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
101 template <typename BodyT = Aws::String>
102 void SetBody(BodyT&& value) {
103 m_bodyHasBeenSet = true;
104 m_body = std::forward<BodyT>(value);
105 }
106 template <typename BodyT = Aws::String>
107 Message& WithBody(BodyT&& value) {
108 SetBody(std::forward<BodyT>(value));
109 return *this;
110 }
112
114
128 inline const Aws::Map<MessageSystemAttributeName, Aws::String>& GetAttributes() const { return m_attributes; }
129 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
130 template <typename AttributesT = Aws::Map<MessageSystemAttributeName, Aws::String>>
131 void SetAttributes(AttributesT&& value) {
132 m_attributesHasBeenSet = true;
133 m_attributes = std::forward<AttributesT>(value);
134 }
135 template <typename AttributesT = Aws::Map<MessageSystemAttributeName, Aws::String>>
136 Message& WithAttributes(AttributesT&& value) {
137 SetAttributes(std::forward<AttributesT>(value));
138 return *this;
139 }
141 m_attributesHasBeenSet = true;
142 m_attributes.emplace(key, value);
143 return *this;
144 }
146
148
154 inline const Aws::String& GetMD5OfMessageAttributes() const { return m_mD5OfMessageAttributes; }
155 inline bool MD5OfMessageAttributesHasBeenSet() const { return m_mD5OfMessageAttributesHasBeenSet; }
156 template <typename MD5OfMessageAttributesT = Aws::String>
157 void SetMD5OfMessageAttributes(MD5OfMessageAttributesT&& value) {
158 m_mD5OfMessageAttributesHasBeenSet = true;
159 m_mD5OfMessageAttributes = std::forward<MD5OfMessageAttributesT>(value);
160 }
161 template <typename MD5OfMessageAttributesT = Aws::String>
162 Message& WithMD5OfMessageAttributes(MD5OfMessageAttributesT&& value) {
163 SetMD5OfMessageAttributes(std::forward<MD5OfMessageAttributesT>(value));
164 return *this;
165 }
167
169
175 inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const { return m_messageAttributes; }
176 inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; }
177 template <typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
178 void SetMessageAttributes(MessageAttributesT&& value) {
179 m_messageAttributesHasBeenSet = true;
180 m_messageAttributes = std::forward<MessageAttributesT>(value);
181 }
182 template <typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
183 Message& WithMessageAttributes(MessageAttributesT&& value) {
184 SetMessageAttributes(std::forward<MessageAttributesT>(value));
185 return *this;
186 }
187 template <typename MessageAttributesKeyT = Aws::String, typename MessageAttributesValueT = MessageAttributeValue>
188 Message& AddMessageAttributes(MessageAttributesKeyT&& key, MessageAttributesValueT&& value) {
189 m_messageAttributesHasBeenSet = true;
190 m_messageAttributes.emplace(std::forward<MessageAttributesKeyT>(key), std::forward<MessageAttributesValueT>(value));
191 return *this;
192 }
194 private:
195 Aws::String m_messageId;
196
197 Aws::String m_receiptHandle;
198
199 Aws::String m_mD5OfBody;
200
201 Aws::String m_body;
202
204
205 Aws::String m_mD5OfMessageAttributes;
206
208 bool m_messageIdHasBeenSet = false;
209 bool m_receiptHandleHasBeenSet = false;
210 bool m_mD5OfBodyHasBeenSet = false;
211 bool m_bodyHasBeenSet = false;
212 bool m_attributesHasBeenSet = false;
213 bool m_mD5OfMessageAttributesHasBeenSet = false;
214 bool m_messageAttributesHasBeenSet = false;
215};
216
217} // namespace Model
218} // namespace SQS
219} // namespace Aws
void SetReceiptHandle(ReceiptHandleT &&value)
Definition Message.h:66
const Aws::String & GetMD5OfMessageAttributes() const
Definition Message.h:154
void SetMD5OfMessageAttributes(MD5OfMessageAttributesT &&value)
Definition Message.h:157
bool BodyHasBeenSet() const
Definition Message.h:100
bool MessageIdHasBeenSet() const
Definition Message.h:44
Message & AddMessageAttributes(MessageAttributesKeyT &&key, MessageAttributesValueT &&value)
Definition Message.h:188
bool MD5OfBodyHasBeenSet() const
Definition Message.h:82
Message & WithMD5OfBody(MD5OfBodyT &&value)
Definition Message.h:89
const Aws::String & GetMD5OfBody() const
Definition Message.h:81
bool MD5OfMessageAttributesHasBeenSet() const
Definition Message.h:155
Message & WithMessageId(MessageIdT &&value)
Definition Message.h:51
Message & WithReceiptHandle(ReceiptHandleT &&value)
Definition Message.h:71
Message & WithMD5OfMessageAttributes(MD5OfMessageAttributesT &&value)
Definition Message.h:162
void SetMessageId(MessageIdT &&value)
Definition Message.h:46
Message & WithMessageAttributes(MessageAttributesT &&value)
Definition Message.h:183
void SetAttributes(AttributesT &&value)
Definition Message.h:131
Message & AddAttributes(MessageSystemAttributeName key, Aws::String value)
Definition Message.h:140
bool MessageAttributesHasBeenSet() const
Definition Message.h:176
void SetMessageAttributes(MessageAttributesT &&value)
Definition Message.h:178
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:128
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:84
void SetBody(BodyT &&value)
Definition Message.h:102
const Aws::String & GetBody() const
Definition Message.h:99
AWS_SQS_API Message(Aws::Utils::Json::JsonView jsonValue)
bool AttributesHasBeenSet() const
Definition Message.h:129
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
Definition Message.h:175
Message & WithBody(BodyT &&value)
Definition Message.h:107
const Aws::String & GetMessageId() const
Definition Message.h:43
Message & WithAttributes(AttributesT &&value)
Definition Message.h:136
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