AWS SDK for C++  0.12.9
AWS SDK for C++
ReceiveMessageRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/sqs/SQS_EXPORTS.h>
17 #include <aws/sqs/SQSRequest.h>
21 
22 namespace Aws
23 {
24 namespace SQS
25 {
26 namespace Model
27 {
28 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
42  inline const Aws::String& GetQueueUrl() const{ return m_queueUrl; }
43 
48  inline void SetQueueUrl(const Aws::String& value) { m_queueUrlHasBeenSet = true; m_queueUrl = value; }
49 
54  inline void SetQueueUrl(Aws::String&& value) { m_queueUrlHasBeenSet = true; m_queueUrl = value; }
55 
60  inline void SetQueueUrl(const char* value) { m_queueUrlHasBeenSet = true; m_queueUrl.assign(value); }
61 
66  inline ReceiveMessageRequest& WithQueueUrl(const Aws::String& value) { SetQueueUrl(value); return *this;}
67 
72  inline ReceiveMessageRequest& WithQueueUrl(Aws::String&& value) { SetQueueUrl(value); return *this;}
73 
78  inline ReceiveMessageRequest& WithQueueUrl(const char* value) { SetQueueUrl(value); return *this;}
79 
101  inline const Aws::Vector<QueueAttributeName>& GetAttributeNames() const{ return m_attributeNames; }
102 
124  inline void SetAttributeNames(const Aws::Vector<QueueAttributeName>& value) { m_attributeNamesHasBeenSet = true; m_attributeNames = value; }
125 
147  inline void SetAttributeNames(Aws::Vector<QueueAttributeName>&& value) { m_attributeNamesHasBeenSet = true; m_attributeNames = value; }
148 
170  inline ReceiveMessageRequest& WithAttributeNames(const Aws::Vector<QueueAttributeName>& value) { SetAttributeNames(value); return *this;}
171 
193  inline ReceiveMessageRequest& WithAttributeNames(Aws::Vector<QueueAttributeName>&& value) { SetAttributeNames(value); return *this;}
194 
216  inline ReceiveMessageRequest& AddAttributeNames(const QueueAttributeName& value) { m_attributeNamesHasBeenSet = true; m_attributeNames.push_back(value); return *this; }
217 
239  inline ReceiveMessageRequest& AddAttributeNames(QueueAttributeName&& value) { m_attributeNamesHasBeenSet = true; m_attributeNames.push_back(value); return *this; }
240 
254  inline const Aws::Vector<Aws::String>& GetMessageAttributeNames() const{ return m_messageAttributeNames; }
255 
269  inline void SetMessageAttributeNames(const Aws::Vector<Aws::String>& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames = value; }
270 
284  inline void SetMessageAttributeNames(Aws::Vector<Aws::String>&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames = value; }
285 
299  inline ReceiveMessageRequest& WithMessageAttributeNames(const Aws::Vector<Aws::String>& value) { SetMessageAttributeNames(value); return *this;}
300 
314  inline ReceiveMessageRequest& WithMessageAttributeNames(Aws::Vector<Aws::String>&& value) { SetMessageAttributeNames(value); return *this;}
315 
329  inline ReceiveMessageRequest& AddMessageAttributeNames(const Aws::String& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames.push_back(value); return *this; }
330 
344  inline ReceiveMessageRequest& AddMessageAttributeNames(Aws::String&& value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames.push_back(value); return *this; }
345 
359  inline ReceiveMessageRequest& AddMessageAttributeNames(const char* value) { m_messageAttributeNamesHasBeenSet = true; m_messageAttributeNames.push_back(value); return *this; }
360 
366  inline long GetMaxNumberOfMessages() const{ return m_maxNumberOfMessages; }
367 
373  inline void SetMaxNumberOfMessages(long value) { m_maxNumberOfMessagesHasBeenSet = true; m_maxNumberOfMessages = value; }
374 
380  inline ReceiveMessageRequest& WithMaxNumberOfMessages(long value) { SetMaxNumberOfMessages(value); return *this;}
381 
387  inline long GetVisibilityTimeout() const{ return m_visibilityTimeout; }
388 
394  inline void SetVisibilityTimeout(long value) { m_visibilityTimeoutHasBeenSet = true; m_visibilityTimeout = value; }
395 
401  inline ReceiveMessageRequest& WithVisibilityTimeout(long value) { SetVisibilityTimeout(value); return *this;}
402 
408  inline long GetWaitTimeSeconds() const{ return m_waitTimeSeconds; }
409 
415  inline void SetWaitTimeSeconds(long value) { m_waitTimeSecondsHasBeenSet = true; m_waitTimeSeconds = value; }
416 
422  inline ReceiveMessageRequest& WithWaitTimeSeconds(long value) { SetWaitTimeSeconds(value); return *this;}
423 
424  private:
425  Aws::String m_queueUrl;
426  bool m_queueUrlHasBeenSet;
427  Aws::Vector<QueueAttributeName> m_attributeNames;
428  bool m_attributeNamesHasBeenSet;
429  Aws::Vector<Aws::String> m_messageAttributeNames;
430  bool m_messageAttributeNamesHasBeenSet;
431  long m_maxNumberOfMessages;
432  bool m_maxNumberOfMessagesHasBeenSet;
433  long m_visibilityTimeout;
434  bool m_visibilityTimeoutHasBeenSet;
435  long m_waitTimeSeconds;
436  bool m_waitTimeSecondsHasBeenSet;
437  };
438 
439 } // namespace Model
440 } // namespace SQS
441 } // namespace Aws
ReceiveMessageRequest & WithMessageAttributeNames(Aws::Vector< Aws::String > &&value)
void SetAttributeNames(const Aws::Vector< QueueAttributeName > &value)
void SetMessageAttributeNames(Aws::Vector< Aws::String > &&value)
ReceiveMessageRequest & WithQueueUrl(const Aws::String &value)
void SetAttributeNames(Aws::Vector< QueueAttributeName > &&value)
const Aws::String & GetQueueUrl() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ReceiveMessageRequest & WithMaxNumberOfMessages(long value)
ReceiveMessageRequest & AddMessageAttributeNames(Aws::String &&value)
ReceiveMessageRequest & WithMessageAttributeNames(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetMessageAttributeNames() const
ReceiveMessageRequest & AddAttributeNames(QueueAttributeName &&value)
ReceiveMessageRequest & AddMessageAttributeNames(const Aws::String &value)
void SetMessageAttributeNames(const Aws::Vector< Aws::String > &value)
ReceiveMessageRequest & AddMessageAttributeNames(const char *value)
ReceiveMessageRequest & WithAttributeNames(const Aws::Vector< QueueAttributeName > &value)
ReceiveMessageRequest & AddAttributeNames(const QueueAttributeName &value)
ReceiveMessageRequest & WithQueueUrl(Aws::String &&value)
ReceiveMessageRequest & WithQueueUrl(const char *value)
void SetQueueUrl(const Aws::String &value)
ReceiveMessageRequest & WithVisibilityTimeout(long value)
ReceiveMessageRequest & WithWaitTimeSeconds(long value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_SQS_API
Definition: SQS_EXPORTS.h:34
const Aws::Vector< QueueAttributeName > & GetAttributeNames() const
ReceiveMessageRequest & WithAttributeNames(Aws::Vector< QueueAttributeName > &&value)
JSON (JavaScript Object Notation).