AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
ReceiveMessageRequest.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/AWSVector.h>
11#include <aws/sqs/model/MessageSystemAttributeName.h>
12#include <utility>
13
14namespace Aws
15{
16namespace SQS
17{
18namespace Model
19{
20
28 {
29 public:
30 AWS_SQS_API ReceiveMessageRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "ReceiveMessage"; }
37
38 AWS_SQS_API Aws::String SerializePayload() const override;
39
41
42
44
48 inline const Aws::String& GetQueueUrl() const { return m_queueUrl; }
49 inline bool QueueUrlHasBeenSet() const { return m_queueUrlHasBeenSet; }
50 template<typename QueueUrlT = Aws::String>
51 void SetQueueUrl(QueueUrlT&& value) { m_queueUrlHasBeenSet = true; m_queueUrl = std::forward<QueueUrlT>(value); }
52 template<typename QueueUrlT = Aws::String>
53 ReceiveMessageRequest& WithQueueUrl(QueueUrlT&& value) { SetQueueUrl(std::forward<QueueUrlT>(value)); return *this;}
55
57
86 inline const Aws::Vector<MessageSystemAttributeName>& GetMessageSystemAttributeNames() const { return m_messageSystemAttributeNames; }
87 inline bool MessageSystemAttributeNamesHasBeenSet() const { return m_messageSystemAttributeNamesHasBeenSet; }
88 template<typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
89 void SetMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) { m_messageSystemAttributeNamesHasBeenSet = true; m_messageSystemAttributeNames = std::forward<MessageSystemAttributeNamesT>(value); }
90 template<typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
91 ReceiveMessageRequest& WithMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) { SetMessageSystemAttributeNames(std::forward<MessageSystemAttributeNamesT>(value)); return *this;}
92 inline ReceiveMessageRequest& AddMessageSystemAttributeNames(MessageSystemAttributeName value) { m_messageSystemAttributeNamesHasBeenSet = true; m_messageSystemAttributeNames.push_back(value); return *this; }
94
96
112 inline const Aws::Vector<Aws::String>& GetMessageAttributeNames() const { return m_messageAttributeNames; }
113 inline bool MessageAttributeNamesHasBeenSet() const { return m_messageAttributeNamesHasBeenSet; }
114 template<typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
115 void SetMessageAttributeNames(MessageAttributeNamesT&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames = std::forward<MessageAttributeNamesT>(value); }
116 template<typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
117 ReceiveMessageRequest& WithMessageAttributeNames(MessageAttributeNamesT&& value) { SetMessageAttributeNames(std::forward<MessageAttributeNamesT>(value)); return *this;}
118 template<typename MessageAttributeNamesT = Aws::String>
119 ReceiveMessageRequest& AddMessageAttributeNames(MessageAttributeNamesT&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames.emplace_back(std::forward<MessageAttributeNamesT>(value)); return *this; }
121
123
128 inline int GetMaxNumberOfMessages() const { return m_maxNumberOfMessages; }
129 inline bool MaxNumberOfMessagesHasBeenSet() const { return m_maxNumberOfMessagesHasBeenSet; }
130 inline void SetMaxNumberOfMessages(int value) { m_maxNumberOfMessagesHasBeenSet = true; m_maxNumberOfMessages = value; }
131 inline ReceiveMessageRequest& WithMaxNumberOfMessages(int value) { SetMaxNumberOfMessages(value); return *this;}
133
135
159 inline int GetVisibilityTimeout() const { return m_visibilityTimeout; }
160 inline bool VisibilityTimeoutHasBeenSet() const { return m_visibilityTimeoutHasBeenSet; }
161 inline void SetVisibilityTimeout(int value) { m_visibilityTimeoutHasBeenSet = true; m_visibilityTimeout = value; }
162 inline ReceiveMessageRequest& WithVisibilityTimeout(int value) { SetVisibilityTimeout(value); return *this;}
164
166
181 inline int GetWaitTimeSeconds() const { return m_waitTimeSeconds; }
182 inline bool WaitTimeSecondsHasBeenSet() const { return m_waitTimeSecondsHasBeenSet; }
183 inline void SetWaitTimeSeconds(int value) { m_waitTimeSecondsHasBeenSet = true; m_waitTimeSeconds = value; }
184 inline ReceiveMessageRequest& WithWaitTimeSeconds(int value) { SetWaitTimeSeconds(value); return *this;}
186
188
233 inline const Aws::String& GetReceiveRequestAttemptId() const { return m_receiveRequestAttemptId; }
234 inline bool ReceiveRequestAttemptIdHasBeenSet() const { return m_receiveRequestAttemptIdHasBeenSet; }
235 template<typename ReceiveRequestAttemptIdT = Aws::String>
236 void SetReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) { m_receiveRequestAttemptIdHasBeenSet = true; m_receiveRequestAttemptId = std::forward<ReceiveRequestAttemptIdT>(value); }
237 template<typename ReceiveRequestAttemptIdT = Aws::String>
238 ReceiveMessageRequest& WithReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) { SetReceiveRequestAttemptId(std::forward<ReceiveRequestAttemptIdT>(value)); return *this;}
240 private:
241
242 Aws::String m_queueUrl;
243 bool m_queueUrlHasBeenSet = false;
244
245 Aws::Vector<MessageSystemAttributeName> m_messageSystemAttributeNames;
246 bool m_messageSystemAttributeNamesHasBeenSet = false;
247
248 Aws::Vector<Aws::String> m_messageAttributeNames;
249 bool m_messageAttributeNamesHasBeenSet = false;
250
251 int m_maxNumberOfMessages{0};
252 bool m_maxNumberOfMessagesHasBeenSet = false;
253
254 int m_visibilityTimeout{0};
255 bool m_visibilityTimeoutHasBeenSet = false;
256
257 int m_waitTimeSeconds{0};
258 bool m_waitTimeSecondsHasBeenSet = false;
259
260 Aws::String m_receiveRequestAttemptId;
261 bool m_receiveRequestAttemptIdHasBeenSet = false;
262 };
263
264} // namespace Model
265} // namespace SQS
266} // 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