AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
SendMessageRequest.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/SQSRequest.h>
10#include <aws/sqs/SQS_EXPORTS.h>
11#include <aws/sqs/model/MessageAttributeValue.h>
12#include <aws/sqs/model/MessageSystemAttributeNameForSends.h>
13#include <aws/sqs/model/MessageSystemAttributeValue.h>
14
15#include <utility>
16
17namespace Aws {
18namespace SQS {
19namespace Model {
20
27 public:
28 AWS_SQS_API SendMessageRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "SendMessage"; }
35
36 AWS_SQS_API Aws::String SerializePayload() const override;
37
39
41
45 inline const Aws::String& GetQueueUrl() const { return m_queueUrl; }
46 inline bool QueueUrlHasBeenSet() const { return m_queueUrlHasBeenSet; }
47 template <typename QueueUrlT = Aws::String>
48 void SetQueueUrl(QueueUrlT&& value) {
49 m_queueUrlHasBeenSet = true;
50 m_queueUrl = std::forward<QueueUrlT>(value);
51 }
52 template <typename QueueUrlT = Aws::String>
53 SendMessageRequest& WithQueueUrl(QueueUrlT&& value) {
54 SetQueueUrl(std::forward<QueueUrlT>(value));
55 return *this;
56 }
58
60
73 inline const Aws::String& GetMessageBody() const { return m_messageBody; }
74 inline bool MessageBodyHasBeenSet() const { return m_messageBodyHasBeenSet; }
75 template <typename MessageBodyT = Aws::String>
76 void SetMessageBody(MessageBodyT&& value) {
77 m_messageBodyHasBeenSet = true;
78 m_messageBody = std::forward<MessageBodyT>(value);
79 }
80 template <typename MessageBodyT = Aws::String>
81 SendMessageRequest& WithMessageBody(MessageBodyT&& value) {
82 SetMessageBody(std::forward<MessageBodyT>(value));
83 return *this;
84 }
86
88
97 inline int GetDelaySeconds() const { return m_delaySeconds; }
98 inline bool DelaySecondsHasBeenSet() const { return m_delaySecondsHasBeenSet; }
99 inline void SetDelaySeconds(int value) {
100 m_delaySecondsHasBeenSet = true;
101 m_delaySeconds = value;
102 }
104 SetDelaySeconds(value);
105 return *this;
106 }
108
110
116 inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const { return m_messageAttributes; }
117 inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; }
118 template <typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
119 void SetMessageAttributes(MessageAttributesT&& value) {
120 m_messageAttributesHasBeenSet = true;
121 m_messageAttributes = std::forward<MessageAttributesT>(value);
122 }
123 template <typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
124 SendMessageRequest& WithMessageAttributes(MessageAttributesT&& value) {
125 SetMessageAttributes(std::forward<MessageAttributesT>(value));
126 return *this;
127 }
128 template <typename MessageAttributesKeyT = Aws::String, typename MessageAttributesValueT = MessageAttributeValue>
129 SendMessageRequest& AddMessageAttributes(MessageAttributesKeyT&& key, MessageAttributesValueT&& value) {
130 m_messageAttributesHasBeenSet = true;
131 m_messageAttributes.emplace(std::forward<MessageAttributesKeyT>(key), std::forward<MessageAttributesValueT>(value));
132 return *this;
133 }
135
137
147 return m_messageSystemAttributes;
148 }
149 inline bool MessageSystemAttributesHasBeenSet() const { return m_messageSystemAttributesHasBeenSet; }
150 template <typename MessageSystemAttributesT = Aws::Map<MessageSystemAttributeNameForSends, MessageSystemAttributeValue>>
151 void SetMessageSystemAttributes(MessageSystemAttributesT&& value) {
152 m_messageSystemAttributesHasBeenSet = true;
153 m_messageSystemAttributes = std::forward<MessageSystemAttributesT>(value);
154 }
155 template <typename MessageSystemAttributesT = Aws::Map<MessageSystemAttributeNameForSends, MessageSystemAttributeValue>>
156 SendMessageRequest& WithMessageSystemAttributes(MessageSystemAttributesT&& value) {
157 SetMessageSystemAttributes(std::forward<MessageSystemAttributesT>(value));
158 return *this;
159 }
161 m_messageSystemAttributesHasBeenSet = true;
162 m_messageSystemAttributes.emplace(key, value);
163 return *this;
164 }
166
168
211 inline const Aws::String& GetMessageDeduplicationId() const { return m_messageDeduplicationId; }
212 inline bool MessageDeduplicationIdHasBeenSet() const { return m_messageDeduplicationIdHasBeenSet; }
213 template <typename MessageDeduplicationIdT = Aws::String>
214 void SetMessageDeduplicationId(MessageDeduplicationIdT&& value) {
215 m_messageDeduplicationIdHasBeenSet = true;
216 m_messageDeduplicationId = std::forward<MessageDeduplicationIdT>(value);
217 }
218 template <typename MessageDeduplicationIdT = Aws::String>
219 SendMessageRequest& WithMessageDeduplicationId(MessageDeduplicationIdT&& value) {
220 SetMessageDeduplicationId(std::forward<MessageDeduplicationIdT>(value));
221 return *this;
222 }
224
226
265 inline const Aws::String& GetMessageGroupId() const { return m_messageGroupId; }
266 inline bool MessageGroupIdHasBeenSet() const { return m_messageGroupIdHasBeenSet; }
267 template <typename MessageGroupIdT = Aws::String>
268 void SetMessageGroupId(MessageGroupIdT&& value) {
269 m_messageGroupIdHasBeenSet = true;
270 m_messageGroupId = std::forward<MessageGroupIdT>(value);
271 }
272 template <typename MessageGroupIdT = Aws::String>
273 SendMessageRequest& WithMessageGroupId(MessageGroupIdT&& value) {
274 SetMessageGroupId(std::forward<MessageGroupIdT>(value));
275 return *this;
276 }
278 private:
279 Aws::String m_queueUrl;
280
281 Aws::String m_messageBody;
282
283 int m_delaySeconds{0};
284
286
288
289 Aws::String m_messageDeduplicationId;
290
291 Aws::String m_messageGroupId;
292 bool m_queueUrlHasBeenSet = false;
293 bool m_messageBodyHasBeenSet = false;
294 bool m_delaySecondsHasBeenSet = false;
295 bool m_messageAttributesHasBeenSet = false;
296 bool m_messageSystemAttributesHasBeenSet = false;
297 bool m_messageDeduplicationIdHasBeenSet = false;
298 bool m_messageGroupIdHasBeenSet = false;
299};
300
301} // namespace Model
302} // namespace SQS
303} // namespace Aws
void SetMessageSystemAttributes(MessageSystemAttributesT &&value)
void SetMessageGroupId(MessageGroupIdT &&value)
AWS_SQS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
SendMessageRequest & WithMessageBody(MessageBodyT &&value)
SendMessageRequest & WithMessageSystemAttributes(MessageSystemAttributesT &&value)
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
SendMessageRequest & WithMessageDeduplicationId(MessageDeduplicationIdT &&value)
void SetMessageBody(MessageBodyT &&value)
const Aws::String & GetMessageGroupId() const
const Aws::String & GetMessageBody() const
SendMessageRequest & WithMessageGroupId(MessageGroupIdT &&value)
SendMessageRequest & WithDelaySeconds(int value)
const Aws::String & GetMessageDeduplicationId() const
const Aws::Map< MessageSystemAttributeNameForSends, MessageSystemAttributeValue > & GetMessageSystemAttributes() const
SendMessageRequest & WithQueueUrl(QueueUrlT &&value)
virtual const char * GetServiceRequestName() const override
void SetMessageAttributes(MessageAttributesT &&value)
AWS_SQS_API SendMessageRequest()=default
SendMessageRequest & AddMessageSystemAttributes(MessageSystemAttributeNameForSends key, MessageSystemAttributeValue value)
AWS_SQS_API Aws::String SerializePayload() const override
void SetMessageDeduplicationId(MessageDeduplicationIdT &&value)
const Aws::String & GetQueueUrl() const
SendMessageRequest & AddMessageAttributes(MessageAttributesKeyT &&key, MessageAttributesValueT &&value)
SendMessageRequest & WithMessageAttributes(MessageAttributesT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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