AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
SendMessageRequest.h
1
6#pragma once
7#include <aws/sqs/SQS_EXPORTS.h>
8#include <aws/sqs/SQSRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/sqs/model/MessageAttributeValue.h>
12#include <aws/sqs/model/MessageSystemAttributeNameForSends.h>
13#include <aws/sqs/model/MessageSystemAttributeValue.h>
14#include <utility>
15
16namespace Aws
17{
18namespace SQS
19{
20namespace Model
21{
22
29 {
30 public:
31 AWS_SQS_API SendMessageRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "SendMessage"; }
38
39 AWS_SQS_API Aws::String SerializePayload() const override;
40
42
43
45
49 inline const Aws::String& GetQueueUrl() const { return m_queueUrl; }
50 inline bool QueueUrlHasBeenSet() const { return m_queueUrlHasBeenSet; }
51 template<typename QueueUrlT = Aws::String>
52 void SetQueueUrl(QueueUrlT&& value) { m_queueUrlHasBeenSet = true; m_queueUrl = std::forward<QueueUrlT>(value); }
53 template<typename QueueUrlT = Aws::String>
54 SendMessageRequest& WithQueueUrl(QueueUrlT&& value) { SetQueueUrl(std::forward<QueueUrlT>(value)); return *this;}
56
58
72 inline const Aws::String& GetMessageBody() const { return m_messageBody; }
73 inline bool MessageBodyHasBeenSet() const { return m_messageBodyHasBeenSet; }
74 template<typename MessageBodyT = Aws::String>
75 void SetMessageBody(MessageBodyT&& value) { m_messageBodyHasBeenSet = true; m_messageBody = std::forward<MessageBodyT>(value); }
76 template<typename MessageBodyT = Aws::String>
77 SendMessageRequest& WithMessageBody(MessageBodyT&& value) { SetMessageBody(std::forward<MessageBodyT>(value)); return *this;}
79
81
90 inline int GetDelaySeconds() const { return m_delaySeconds; }
91 inline bool DelaySecondsHasBeenSet() const { return m_delaySecondsHasBeenSet; }
92 inline void SetDelaySeconds(int value) { m_delaySecondsHasBeenSet = true; m_delaySeconds = value; }
93 inline SendMessageRequest& WithDelaySeconds(int value) { SetDelaySeconds(value); return *this;}
95
97
103 inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const { return m_messageAttributes; }
104 inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; }
105 template<typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
106 void SetMessageAttributes(MessageAttributesT&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = std::forward<MessageAttributesT>(value); }
107 template<typename MessageAttributesT = Aws::Map<Aws::String, MessageAttributeValue>>
108 SendMessageRequest& WithMessageAttributes(MessageAttributesT&& value) { SetMessageAttributes(std::forward<MessageAttributesT>(value)); return *this;}
109 template<typename MessageAttributesKeyT = Aws::String, typename MessageAttributesValueT = MessageAttributeValue>
110 SendMessageRequest& AddMessageAttributes(MessageAttributesKeyT&& key, MessageAttributesValueT&& value) {
111 m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::forward<MessageAttributesKeyT>(key), std::forward<MessageAttributesValueT>(value)); return *this;
112 }
114
116
126 inline bool MessageSystemAttributesHasBeenSet() const { return m_messageSystemAttributesHasBeenSet; }
127 template<typename MessageSystemAttributesT = Aws::Map<MessageSystemAttributeNameForSends, MessageSystemAttributeValue>>
128 void SetMessageSystemAttributes(MessageSystemAttributesT&& value) { m_messageSystemAttributesHasBeenSet = true; m_messageSystemAttributes = std::forward<MessageSystemAttributesT>(value); }
129 template<typename MessageSystemAttributesT = Aws::Map<MessageSystemAttributeNameForSends, MessageSystemAttributeValue>>
130 SendMessageRequest& WithMessageSystemAttributes(MessageSystemAttributesT&& value) { SetMessageSystemAttributes(std::forward<MessageSystemAttributesT>(value)); return *this;}
132 m_messageSystemAttributesHasBeenSet = true; m_messageSystemAttributes.emplace(key, value); return *this;
133 }
135
137
180 inline const Aws::String& GetMessageDeduplicationId() const { return m_messageDeduplicationId; }
181 inline bool MessageDeduplicationIdHasBeenSet() const { return m_messageDeduplicationIdHasBeenSet; }
182 template<typename MessageDeduplicationIdT = Aws::String>
183 void SetMessageDeduplicationId(MessageDeduplicationIdT&& value) { m_messageDeduplicationIdHasBeenSet = true; m_messageDeduplicationId = std::forward<MessageDeduplicationIdT>(value); }
184 template<typename MessageDeduplicationIdT = Aws::String>
185 SendMessageRequest& WithMessageDeduplicationId(MessageDeduplicationIdT&& value) { SetMessageDeduplicationId(std::forward<MessageDeduplicationIdT>(value)); return *this;}
187
189
228 inline const Aws::String& GetMessageGroupId() const { return m_messageGroupId; }
229 inline bool MessageGroupIdHasBeenSet() const { return m_messageGroupIdHasBeenSet; }
230 template<typename MessageGroupIdT = Aws::String>
231 void SetMessageGroupId(MessageGroupIdT&& value) { m_messageGroupIdHasBeenSet = true; m_messageGroupId = std::forward<MessageGroupIdT>(value); }
232 template<typename MessageGroupIdT = Aws::String>
233 SendMessageRequest& WithMessageGroupId(MessageGroupIdT&& value) { SetMessageGroupId(std::forward<MessageGroupIdT>(value)); return *this;}
235 private:
236
237 Aws::String m_queueUrl;
238 bool m_queueUrlHasBeenSet = false;
239
240 Aws::String m_messageBody;
241 bool m_messageBodyHasBeenSet = false;
242
243 int m_delaySeconds{0};
244 bool m_delaySecondsHasBeenSet = false;
245
247 bool m_messageAttributesHasBeenSet = false;
248
250 bool m_messageSystemAttributesHasBeenSet = false;
251
252 Aws::String m_messageDeduplicationId;
253 bool m_messageDeduplicationIdHasBeenSet = false;
254
255 Aws::String m_messageGroupId;
256 bool m_messageGroupIdHasBeenSet = false;
257 };
258
259} // namespace Model
260} // namespace SQS
261} // 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