AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; }
52 inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = std::move(value); }
53 inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); }
54 inline Message& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;}
55 inline Message& WithMessageId(Aws::String&& value) { SetMessageId(std::move(value)); return *this;}
56 inline Message& WithMessageId(const char* value) { SetMessageId(value); return *this;}
58
60
65 inline const Aws::String& GetReceiptHandle() const{ return m_receiptHandle; }
66 inline bool ReceiptHandleHasBeenSet() const { return m_receiptHandleHasBeenSet; }
67 inline void SetReceiptHandle(const Aws::String& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = value; }
68 inline void SetReceiptHandle(Aws::String&& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = std::move(value); }
69 inline void SetReceiptHandle(const char* value) { m_receiptHandleHasBeenSet = true; m_receiptHandle.assign(value); }
70 inline Message& WithReceiptHandle(const Aws::String& value) { SetReceiptHandle(value); return *this;}
71 inline Message& WithReceiptHandle(Aws::String&& value) { SetReceiptHandle(std::move(value)); return *this;}
72 inline Message& WithReceiptHandle(const char* value) { SetReceiptHandle(value); return *this;}
74
76
79 inline const Aws::String& GetMD5OfBody() const{ return m_mD5OfBody; }
80 inline bool MD5OfBodyHasBeenSet() const { return m_mD5OfBodyHasBeenSet; }
81 inline void SetMD5OfBody(const Aws::String& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = value; }
82 inline void SetMD5OfBody(Aws::String&& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = std::move(value); }
83 inline void SetMD5OfBody(const char* value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody.assign(value); }
84 inline Message& WithMD5OfBody(const Aws::String& value) { SetMD5OfBody(value); return *this;}
85 inline Message& WithMD5OfBody(Aws::String&& value) { SetMD5OfBody(std::move(value)); return *this;}
86 inline Message& WithMD5OfBody(const char* value) { SetMD5OfBody(value); return *this;}
88
90
93 inline const Aws::String& GetBody() const{ return m_body; }
94 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
95 inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; }
96 inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = std::move(value); }
97 inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); }
98 inline Message& WithBody(const Aws::String& value) { SetBody(value); return *this;}
99 inline Message& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;}
100 inline Message& WithBody(const char* value) { SetBody(value); return *this;}
102
104
118 inline const Aws::Map<MessageSystemAttributeName, Aws::String>& GetAttributes() const{ return m_attributes; }
119 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
120 inline void SetAttributes(const Aws::Map<MessageSystemAttributeName, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
121 inline void SetAttributes(Aws::Map<MessageSystemAttributeName, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
124 inline Message& AddAttributes(const MessageSystemAttributeName& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
125 inline Message& AddAttributes(MessageSystemAttributeName&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
126 inline Message& AddAttributes(const MessageSystemAttributeName& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
127 inline Message& AddAttributes(MessageSystemAttributeName&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; }
128 inline Message& AddAttributes(MessageSystemAttributeName&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
129 inline Message& AddAttributes(const MessageSystemAttributeName& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
131
133
139 inline const Aws::String& GetMD5OfMessageAttributes() const{ return m_mD5OfMessageAttributes; }
140 inline bool MD5OfMessageAttributesHasBeenSet() const { return m_mD5OfMessageAttributesHasBeenSet; }
141 inline void SetMD5OfMessageAttributes(const Aws::String& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = value; }
142 inline void SetMD5OfMessageAttributes(Aws::String&& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = std::move(value); }
143 inline void SetMD5OfMessageAttributes(const char* value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes.assign(value); }
144 inline Message& WithMD5OfMessageAttributes(const Aws::String& value) { SetMD5OfMessageAttributes(value); return *this;}
145 inline Message& WithMD5OfMessageAttributes(Aws::String&& value) { SetMD5OfMessageAttributes(std::move(value)); return *this;}
146 inline Message& WithMD5OfMessageAttributes(const char* value) { SetMD5OfMessageAttributes(value); return *this;}
148
150
156 inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const{ return m_messageAttributes; }
157 inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; }
158 inline void SetMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
159 inline void SetMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = std::move(value); }
162 inline Message& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; }
163 inline Message& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), value); return *this; }
164 inline Message& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; }
165 inline Message& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), std::move(value)); return *this; }
166 inline Message& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; }
167 inline Message& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; }
169 private:
170
171 Aws::String m_messageId;
172 bool m_messageIdHasBeenSet = false;
173
174 Aws::String m_receiptHandle;
175 bool m_receiptHandleHasBeenSet = false;
176
177 Aws::String m_mD5OfBody;
178 bool m_mD5OfBodyHasBeenSet = false;
179
180 Aws::String m_body;
181 bool m_bodyHasBeenSet = false;
182
184 bool m_attributesHasBeenSet = false;
185
186 Aws::String m_mD5OfMessageAttributes;
187 bool m_mD5OfMessageAttributesHasBeenSet = false;
188
190 bool m_messageAttributesHasBeenSet = false;
191 };
192
193} // namespace Model
194} // namespace SQS
195} // namespace Aws
void SetReceiptHandle(const Aws::String &value)
Definition Message.h:67
Message & AddMessageAttributes(const char *key, MessageAttributeValue &&value)
Definition Message.h:166
Message & AddMessageAttributes(Aws::String &&key, const MessageAttributeValue &value)
Definition Message.h:163
void SetMD5OfMessageAttributes(const char *value)
Definition Message.h:143
void SetBody(Aws::String &&value)
Definition Message.h:96
void SetAttributes(Aws::Map< MessageSystemAttributeName, Aws::String > &&value)
Definition Message.h:121
Message & WithMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
Definition Message.h:161
void SetBody(const char *value)
Definition Message.h:97
void SetMD5OfBody(Aws::String &&value)
Definition Message.h:82
const Aws::String & GetMD5OfMessageAttributes() const
Definition Message.h:139
void SetMessageId(const Aws::String &value)
Definition Message.h:51
bool BodyHasBeenSet() const
Definition Message.h:94
bool MessageIdHasBeenSet() const
Definition Message.h:50
void SetBody(const Aws::String &value)
Definition Message.h:95
bool MD5OfBodyHasBeenSet() const
Definition Message.h:80
const Aws::String & GetMD5OfBody() const
Definition Message.h:79
Message & WithAttributes(const Aws::Map< MessageSystemAttributeName, Aws::String > &value)
Definition Message.h:122
Message & WithMD5OfBody(const char *value)
Definition Message.h:86
bool MD5OfMessageAttributesHasBeenSet() const
Definition Message.h:140
Message & WithMD5OfMessageAttributes(const Aws::String &value)
Definition Message.h:144
Message & AddAttributes(const MessageSystemAttributeName &key, const char *value)
Definition Message.h:129
Message & WithMessageId(const Aws::String &value)
Definition Message.h:54
void SetReceiptHandle(const char *value)
Definition Message.h:69
void SetMessageId(Aws::String &&value)
Definition Message.h:52
void SetMD5OfMessageAttributes(const Aws::String &value)
Definition Message.h:141
Message & WithMD5OfBody(const Aws::String &value)
Definition Message.h:84
void SetAttributes(const Aws::Map< MessageSystemAttributeName, Aws::String > &value)
Definition Message.h:120
Message & WithReceiptHandle(Aws::String &&value)
Definition Message.h:71
Message & AddAttributes(const MessageSystemAttributeName &key, Aws::String &&value)
Definition Message.h:126
Message & AddMessageAttributes(const char *key, const MessageAttributeValue &value)
Definition Message.h:167
Message & AddAttributes(MessageSystemAttributeName &&key, Aws::String &&value)
Definition Message.h:127
bool MessageAttributesHasBeenSet() const
Definition Message.h:157
Message & WithAttributes(Aws::Map< MessageSystemAttributeName, Aws::String > &&value)
Definition Message.h:123
void SetMD5OfMessageAttributes(Aws::String &&value)
Definition Message.h:142
AWS_SQS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetMD5OfBody(const char *value)
Definition Message.h:83
bool ReceiptHandleHasBeenSet() const
Definition Message.h:66
Message & WithMessageId(Aws::String &&value)
Definition Message.h:55
Message & AddAttributes(const MessageSystemAttributeName &key, const Aws::String &value)
Definition Message.h:124
const Aws::Map< MessageSystemAttributeName, Aws::String > & GetAttributes() const
Definition Message.h:118
Message & AddAttributes(MessageSystemAttributeName &&key, const char *value)
Definition Message.h:128
const Aws::String & GetReceiptHandle() const
Definition Message.h:65
void SetMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
Definition Message.h:158
AWS_SQS_API Message & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetMessageId(const char *value)
Definition Message.h:53
Message & WithMessageId(const char *value)
Definition Message.h:56
Message & WithMD5OfMessageAttributes(Aws::String &&value)
Definition Message.h:145
Message & WithBody(Aws::String &&value)
Definition Message.h:99
void SetMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
Definition Message.h:159
Message & WithReceiptHandle(const Aws::String &value)
Definition Message.h:70
Message & WithMD5OfBody(Aws::String &&value)
Definition Message.h:85
Message & WithReceiptHandle(const char *value)
Definition Message.h:72
const Aws::String & GetBody() const
Definition Message.h:93
AWS_SQS_API Message(Aws::Utils::Json::JsonView jsonValue)
Message & WithBody(const char *value)
Definition Message.h:100
bool AttributesHasBeenSet() const
Definition Message.h:119
Message & AddMessageAttributes(const Aws::String &key, const MessageAttributeValue &value)
Definition Message.h:162
Message & AddAttributes(MessageSystemAttributeName &&key, const Aws::String &value)
Definition Message.h:125
Message & AddMessageAttributes(const Aws::String &key, MessageAttributeValue &&value)
Definition Message.h:164
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
Definition Message.h:156
const Aws::String & GetMessageId() const
Definition Message.h:49
Message & WithMD5OfMessageAttributes(const char *value)
Definition Message.h:146
void SetMD5OfBody(const Aws::String &value)
Definition Message.h:81
Message & AddMessageAttributes(Aws::String &&key, MessageAttributeValue &&value)
Definition Message.h:165
void SetReceiptHandle(Aws::String &&value)
Definition Message.h:68
Message & WithMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
Definition Message.h:160
Message & WithBody(const Aws::String &value)
Definition Message.h:98
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