AWS SDK for C++

AWS SDK for C++ Version 1.11.850

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 inline virtual bool IsLongPollingOperation() const override { return true; }
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 ReceiveMessageRequest& WithQueueUrl(QueueUrlT&& value) {
54 SetQueueUrl(std::forward<QueueUrlT>(value));
55 return *this;
56 }
58
60
89 inline const Aws::Vector<MessageSystemAttributeName>& GetMessageSystemAttributeNames() const { return m_messageSystemAttributeNames; }
90 inline bool MessageSystemAttributeNamesHasBeenSet() const { return m_messageSystemAttributeNamesHasBeenSet; }
91 template <typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
92 void SetMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) {
93 m_messageSystemAttributeNamesHasBeenSet = true;
94 m_messageSystemAttributeNames = std::forward<MessageSystemAttributeNamesT>(value);
95 }
96 template <typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
97 ReceiveMessageRequest& WithMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) {
98 SetMessageSystemAttributeNames(std::forward<MessageSystemAttributeNamesT>(value));
99 return *this;
100 }
102 m_messageSystemAttributeNamesHasBeenSet = true;
103 m_messageSystemAttributeNames.push_back(value);
104 return *this;
105 }
107
109
125 inline const Aws::Vector<Aws::String>& GetMessageAttributeNames() const { return m_messageAttributeNames; }
126 inline bool MessageAttributeNamesHasBeenSet() const { return m_messageAttributeNamesHasBeenSet; }
127 template <typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
128 void SetMessageAttributeNames(MessageAttributeNamesT&& value) {
129 m_messageAttributeNamesHasBeenSet = true;
130 m_messageAttributeNames = std::forward<MessageAttributeNamesT>(value);
131 }
132 template <typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
133 ReceiveMessageRequest& WithMessageAttributeNames(MessageAttributeNamesT&& value) {
134 SetMessageAttributeNames(std::forward<MessageAttributeNamesT>(value));
135 return *this;
136 }
137 template <typename MessageAttributeNamesT = Aws::String>
138 ReceiveMessageRequest& AddMessageAttributeNames(MessageAttributeNamesT&& value) {
139 m_messageAttributeNamesHasBeenSet = true;
140 m_messageAttributeNames.emplace_back(std::forward<MessageAttributeNamesT>(value));
141 return *this;
142 }
144
146
151 inline int GetMaxNumberOfMessages() const { return m_maxNumberOfMessages; }
152 inline bool MaxNumberOfMessagesHasBeenSet() const { return m_maxNumberOfMessagesHasBeenSet; }
153 inline void SetMaxNumberOfMessages(int value) {
154 m_maxNumberOfMessagesHasBeenSet = true;
155 m_maxNumberOfMessages = value;
156 }
159 return *this;
160 }
162
164
188 inline int GetVisibilityTimeout() const { return m_visibilityTimeout; }
189 inline bool VisibilityTimeoutHasBeenSet() const { return m_visibilityTimeoutHasBeenSet; }
190 inline void SetVisibilityTimeout(int value) {
191 m_visibilityTimeoutHasBeenSet = true;
192 m_visibilityTimeout = value;
193 }
196 return *this;
197 }
199
201
216 inline int GetWaitTimeSeconds() const { return m_waitTimeSeconds; }
217 inline bool WaitTimeSecondsHasBeenSet() const { return m_waitTimeSecondsHasBeenSet; }
218 inline void SetWaitTimeSeconds(int value) {
219 m_waitTimeSecondsHasBeenSet = true;
220 m_waitTimeSeconds = value;
221 }
223 SetWaitTimeSeconds(value);
224 return *this;
225 }
227
229
274 inline const Aws::String& GetReceiveRequestAttemptId() const { return m_receiveRequestAttemptId; }
275 inline bool ReceiveRequestAttemptIdHasBeenSet() const { return m_receiveRequestAttemptIdHasBeenSet; }
276 template <typename ReceiveRequestAttemptIdT = Aws::String>
277 void SetReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) {
278 m_receiveRequestAttemptIdHasBeenSet = true;
279 m_receiveRequestAttemptId = std::forward<ReceiveRequestAttemptIdT>(value);
280 }
281 template <typename ReceiveRequestAttemptIdT = Aws::String>
282 ReceiveMessageRequest& WithReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) {
283 SetReceiveRequestAttemptId(std::forward<ReceiveRequestAttemptIdT>(value));
284 return *this;
285 }
287 private:
288 Aws::String m_queueUrl;
289
290 Aws::Vector<MessageSystemAttributeName> m_messageSystemAttributeNames;
291
292 Aws::Vector<Aws::String> m_messageAttributeNames;
293
294 int m_maxNumberOfMessages{0};
295
296 int m_visibilityTimeout{0};
297
298 int m_waitTimeSeconds{0};
299
300 Aws::String m_receiveRequestAttemptId;
301 bool m_queueUrlHasBeenSet = false;
302 bool m_messageSystemAttributeNamesHasBeenSet = false;
303 bool m_messageAttributeNamesHasBeenSet = false;
304 bool m_maxNumberOfMessagesHasBeenSet = false;
305 bool m_visibilityTimeoutHasBeenSet = false;
306 bool m_waitTimeSecondsHasBeenSet = false;
307 bool m_receiveRequestAttemptIdHasBeenSet = false;
308};
309
310} // namespace Model
311} // namespace SQS
312} // 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
virtual bool IsLongPollingOperation() const override
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