AWS SDK for C++

AWS SDK for C++ Version 1.11.762

Loading...
Searching...
No Matches
ReceiveMessageRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/sqs/SQSRequest.h>
10#include <aws/sqs/SQS_EXPORTS.h>
11#include <aws/sqs/model/MessageSystemAttributeName.h>
12
13#include <utility>
14
15namespace Aws {
16namespace SQS {
17namespace Model {
18
26 public:
27 AWS_SQS_API ReceiveMessageRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "ReceiveMessage"; }
34
35 AWS_SQS_API Aws::String SerializePayload() const override;
36
38
40
44 inline const Aws::String& GetQueueUrl() const { return m_queueUrl; }
45 inline bool QueueUrlHasBeenSet() const { return m_queueUrlHasBeenSet; }
46 template <typename QueueUrlT = Aws::String>
47 void SetQueueUrl(QueueUrlT&& value) {
48 m_queueUrlHasBeenSet = true;
49 m_queueUrl = std::forward<QueueUrlT>(value);
50 }
51 template <typename QueueUrlT = Aws::String>
52 ReceiveMessageRequest& WithQueueUrl(QueueUrlT&& value) {
53 SetQueueUrl(std::forward<QueueUrlT>(value));
54 return *this;
55 }
57
59
88 inline const Aws::Vector<MessageSystemAttributeName>& GetMessageSystemAttributeNames() const { return m_messageSystemAttributeNames; }
89 inline bool MessageSystemAttributeNamesHasBeenSet() const { return m_messageSystemAttributeNamesHasBeenSet; }
90 template <typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
91 void SetMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) {
92 m_messageSystemAttributeNamesHasBeenSet = true;
93 m_messageSystemAttributeNames = std::forward<MessageSystemAttributeNamesT>(value);
94 }
95 template <typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
96 ReceiveMessageRequest& WithMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) {
97 SetMessageSystemAttributeNames(std::forward<MessageSystemAttributeNamesT>(value));
98 return *this;
99 }
101 m_messageSystemAttributeNamesHasBeenSet = true;
102 m_messageSystemAttributeNames.push_back(value);
103 return *this;
104 }
106
108
124 inline const Aws::Vector<Aws::String>& GetMessageAttributeNames() const { return m_messageAttributeNames; }
125 inline bool MessageAttributeNamesHasBeenSet() const { return m_messageAttributeNamesHasBeenSet; }
126 template <typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
127 void SetMessageAttributeNames(MessageAttributeNamesT&& value) {
128 m_messageAttributeNamesHasBeenSet = true;
129 m_messageAttributeNames = std::forward<MessageAttributeNamesT>(value);
130 }
131 template <typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
132 ReceiveMessageRequest& WithMessageAttributeNames(MessageAttributeNamesT&& value) {
133 SetMessageAttributeNames(std::forward<MessageAttributeNamesT>(value));
134 return *this;
135 }
136 template <typename MessageAttributeNamesT = Aws::String>
137 ReceiveMessageRequest& AddMessageAttributeNames(MessageAttributeNamesT&& value) {
138 m_messageAttributeNamesHasBeenSet = true;
139 m_messageAttributeNames.emplace_back(std::forward<MessageAttributeNamesT>(value));
140 return *this;
141 }
143
145
150 inline int GetMaxNumberOfMessages() const { return m_maxNumberOfMessages; }
151 inline bool MaxNumberOfMessagesHasBeenSet() const { return m_maxNumberOfMessagesHasBeenSet; }
152 inline void SetMaxNumberOfMessages(int value) {
153 m_maxNumberOfMessagesHasBeenSet = true;
154 m_maxNumberOfMessages = value;
155 }
158 return *this;
159 }
161
163
187 inline int GetVisibilityTimeout() const { return m_visibilityTimeout; }
188 inline bool VisibilityTimeoutHasBeenSet() const { return m_visibilityTimeoutHasBeenSet; }
189 inline void SetVisibilityTimeout(int value) {
190 m_visibilityTimeoutHasBeenSet = true;
191 m_visibilityTimeout = value;
192 }
195 return *this;
196 }
198
200
215 inline int GetWaitTimeSeconds() const { return m_waitTimeSeconds; }
216 inline bool WaitTimeSecondsHasBeenSet() const { return m_waitTimeSecondsHasBeenSet; }
217 inline void SetWaitTimeSeconds(int value) {
218 m_waitTimeSecondsHasBeenSet = true;
219 m_waitTimeSeconds = value;
220 }
222 SetWaitTimeSeconds(value);
223 return *this;
224 }
226
228
273 inline const Aws::String& GetReceiveRequestAttemptId() const { return m_receiveRequestAttemptId; }
274 inline bool ReceiveRequestAttemptIdHasBeenSet() const { return m_receiveRequestAttemptIdHasBeenSet; }
275 template <typename ReceiveRequestAttemptIdT = Aws::String>
276 void SetReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) {
277 m_receiveRequestAttemptIdHasBeenSet = true;
278 m_receiveRequestAttemptId = std::forward<ReceiveRequestAttemptIdT>(value);
279 }
280 template <typename ReceiveRequestAttemptIdT = Aws::String>
281 ReceiveMessageRequest& WithReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) {
282 SetReceiveRequestAttemptId(std::forward<ReceiveRequestAttemptIdT>(value));
283 return *this;
284 }
286 private:
287 Aws::String m_queueUrl;
288
289 Aws::Vector<MessageSystemAttributeName> m_messageSystemAttributeNames;
290
291 Aws::Vector<Aws::String> m_messageAttributeNames;
292
293 int m_maxNumberOfMessages{0};
294
295 int m_visibilityTimeout{0};
296
297 int m_waitTimeSeconds{0};
298
299 Aws::String m_receiveRequestAttemptId;
300 bool m_queueUrlHasBeenSet = false;
301 bool m_messageSystemAttributeNamesHasBeenSet = false;
302 bool m_messageAttributeNamesHasBeenSet = false;
303 bool m_maxNumberOfMessagesHasBeenSet = false;
304 bool m_visibilityTimeoutHasBeenSet = false;
305 bool m_waitTimeSecondsHasBeenSet = false;
306 bool m_receiveRequestAttemptIdHasBeenSet = false;
307};
308
309} // namespace Model
310} // namespace SQS
311} // namespace Aws
const Aws::Vector< MessageSystemAttributeName > & GetMessageSystemAttributeNames() const
void SetReceiveRequestAttemptId(ReceiveRequestAttemptIdT &&value)
ReceiveMessageRequest & WithMessageAttributeNames(MessageAttributeNamesT &&value)
ReceiveMessageRequest & WithReceiveRequestAttemptId(ReceiveRequestAttemptIdT &&value)
ReceiveMessageRequest & WithMessageSystemAttributeNames(MessageSystemAttributeNamesT &&value)
void SetMessageAttributeNames(MessageAttributeNamesT &&value)
ReceiveMessageRequest & AddMessageSystemAttributeNames(MessageSystemAttributeName value)
AWS_SQS_API Aws::String SerializePayload() const override
const Aws::String & GetReceiveRequestAttemptId() const
ReceiveMessageRequest & WithVisibilityTimeout(int value)
const Aws::Vector< Aws::String > & GetMessageAttributeNames() const
ReceiveMessageRequest & WithWaitTimeSeconds(int value)
void SetMessageSystemAttributeNames(MessageSystemAttributeNamesT &&value)
AWS_SQS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ReceiveMessageRequest & AddMessageAttributeNames(MessageAttributeNamesT &&value)
AWS_SQS_API ReceiveMessageRequest()=default
ReceiveMessageRequest & WithMaxNumberOfMessages(int value)
ReceiveMessageRequest & WithQueueUrl(QueueUrlT &&value)
virtual const char * GetServiceRequestName() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector