AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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
87 inline const Aws::Vector<MessageSystemAttributeName>& GetMessageSystemAttributeNames() const { return m_messageSystemAttributeNames; }
88 inline bool MessageSystemAttributeNamesHasBeenSet() const { return m_messageSystemAttributeNamesHasBeenSet; }
89 template<typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
90 void SetMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) { m_messageSystemAttributeNamesHasBeenSet = true; m_messageSystemAttributeNames = std::forward<MessageSystemAttributeNamesT>(value); }
91 template<typename MessageSystemAttributeNamesT = Aws::Vector<MessageSystemAttributeName>>
92 ReceiveMessageRequest& WithMessageSystemAttributeNames(MessageSystemAttributeNamesT&& value) { SetMessageSystemAttributeNames(std::forward<MessageSystemAttributeNamesT>(value)); return *this;}
93 inline ReceiveMessageRequest& AddMessageSystemAttributeNames(MessageSystemAttributeName value) { m_messageSystemAttributeNamesHasBeenSet = true; m_messageSystemAttributeNames.push_back(value); return *this; }
95
97
113 inline const Aws::Vector<Aws::String>& GetMessageAttributeNames() const { return m_messageAttributeNames; }
114 inline bool MessageAttributeNamesHasBeenSet() const { return m_messageAttributeNamesHasBeenSet; }
115 template<typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
116 void SetMessageAttributeNames(MessageAttributeNamesT&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames = std::forward<MessageAttributeNamesT>(value); }
117 template<typename MessageAttributeNamesT = Aws::Vector<Aws::String>>
118 ReceiveMessageRequest& WithMessageAttributeNames(MessageAttributeNamesT&& value) { SetMessageAttributeNames(std::forward<MessageAttributeNamesT>(value)); return *this;}
119 template<typename MessageAttributeNamesT = Aws::String>
120 ReceiveMessageRequest& AddMessageAttributeNames(MessageAttributeNamesT&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames.emplace_back(std::forward<MessageAttributeNamesT>(value)); return *this; }
122
124
129 inline int GetMaxNumberOfMessages() const { return m_maxNumberOfMessages; }
130 inline bool MaxNumberOfMessagesHasBeenSet() const { return m_maxNumberOfMessagesHasBeenSet; }
131 inline void SetMaxNumberOfMessages(int value) { m_maxNumberOfMessagesHasBeenSet = true; m_maxNumberOfMessages = value; }
132 inline ReceiveMessageRequest& WithMaxNumberOfMessages(int value) { SetMaxNumberOfMessages(value); return *this;}
134
136
160 inline int GetVisibilityTimeout() const { return m_visibilityTimeout; }
161 inline bool VisibilityTimeoutHasBeenSet() const { return m_visibilityTimeoutHasBeenSet; }
162 inline void SetVisibilityTimeout(int value) { m_visibilityTimeoutHasBeenSet = true; m_visibilityTimeout = value; }
163 inline ReceiveMessageRequest& WithVisibilityTimeout(int value) { SetVisibilityTimeout(value); return *this;}
165
167
182 inline int GetWaitTimeSeconds() const { return m_waitTimeSeconds; }
183 inline bool WaitTimeSecondsHasBeenSet() const { return m_waitTimeSecondsHasBeenSet; }
184 inline void SetWaitTimeSeconds(int value) { m_waitTimeSecondsHasBeenSet = true; m_waitTimeSeconds = value; }
185 inline ReceiveMessageRequest& WithWaitTimeSeconds(int value) { SetWaitTimeSeconds(value); return *this;}
187
189
234 inline const Aws::String& GetReceiveRequestAttemptId() const { return m_receiveRequestAttemptId; }
235 inline bool ReceiveRequestAttemptIdHasBeenSet() const { return m_receiveRequestAttemptIdHasBeenSet; }
236 template<typename ReceiveRequestAttemptIdT = Aws::String>
237 void SetReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) { m_receiveRequestAttemptIdHasBeenSet = true; m_receiveRequestAttemptId = std::forward<ReceiveRequestAttemptIdT>(value); }
238 template<typename ReceiveRequestAttemptIdT = Aws::String>
239 ReceiveMessageRequest& WithReceiveRequestAttemptId(ReceiveRequestAttemptIdT&& value) { SetReceiveRequestAttemptId(std::forward<ReceiveRequestAttemptIdT>(value)); return *this;}
241 private:
242
243 Aws::String m_queueUrl;
244 bool m_queueUrlHasBeenSet = false;
245
246 Aws::Vector<MessageSystemAttributeName> m_messageSystemAttributeNames;
247 bool m_messageSystemAttributeNamesHasBeenSet = false;
248
249 Aws::Vector<Aws::String> m_messageAttributeNames;
250 bool m_messageAttributeNamesHasBeenSet = false;
251
252 int m_maxNumberOfMessages{0};
253 bool m_maxNumberOfMessagesHasBeenSet = false;
254
255 int m_visibilityTimeout{0};
256 bool m_visibilityTimeoutHasBeenSet = false;
257
258 int m_waitTimeSeconds{0};
259 bool m_waitTimeSecondsHasBeenSet = false;
260
261 Aws::String m_receiveRequestAttemptId;
262 bool m_receiveRequestAttemptIdHasBeenSet = false;
263 };
264
265} // namespace Model
266} // namespace SQS
267} // 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