AWS SDK for C++  0.12.9
AWS SDK for C++
Message.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>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace SQS
33 {
34 namespace Model
35 {
36 
41  {
42  public:
43  Message();
44  Message(const Aws::Utils::Xml::XmlNode& xmlNode);
45  Message& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
54  inline const Aws::String& GetMessageId() const{ return m_messageId; }
55 
60  inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; }
61 
66  inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = value; }
67 
72  inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); }
73 
78  inline Message& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;}
79 
84  inline Message& WithMessageId(Aws::String&& value) { SetMessageId(value); return *this;}
85 
90  inline Message& WithMessageId(const char* value) { SetMessageId(value); return *this;}
91 
97  inline const Aws::String& GetReceiptHandle() const{ return m_receiptHandle; }
98 
104  inline void SetReceiptHandle(const Aws::String& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = value; }
105 
111  inline void SetReceiptHandle(Aws::String&& value) { m_receiptHandleHasBeenSet = true; m_receiptHandle = value; }
112 
118  inline void SetReceiptHandle(const char* value) { m_receiptHandleHasBeenSet = true; m_receiptHandle.assign(value); }
119 
125  inline Message& WithReceiptHandle(const Aws::String& value) { SetReceiptHandle(value); return *this;}
126 
132  inline Message& WithReceiptHandle(Aws::String&& value) { SetReceiptHandle(value); return *this;}
133 
139  inline Message& WithReceiptHandle(const char* value) { SetReceiptHandle(value); return *this;}
140 
144  inline const Aws::String& GetMD5OfBody() const{ return m_mD5OfBody; }
145 
149  inline void SetMD5OfBody(const Aws::String& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = value; }
150 
154  inline void SetMD5OfBody(Aws::String&& value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody = value; }
155 
159  inline void SetMD5OfBody(const char* value) { m_mD5OfBodyHasBeenSet = true; m_mD5OfBody.assign(value); }
160 
164  inline Message& WithMD5OfBody(const Aws::String& value) { SetMD5OfBody(value); return *this;}
165 
169  inline Message& WithMD5OfBody(Aws::String&& value) { SetMD5OfBody(value); return *this;}
170 
174  inline Message& WithMD5OfBody(const char* value) { SetMD5OfBody(value); return *this;}
175 
179  inline const Aws::String& GetBody() const{ return m_body; }
180 
184  inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; }
185 
189  inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = value; }
190 
194  inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); }
195 
199  inline Message& WithBody(const Aws::String& value) { SetBody(value); return *this;}
200 
204  inline Message& WithBody(Aws::String&& value) { SetBody(value); return *this;}
205 
209  inline Message& WithBody(const char* value) { SetBody(value); return *this;}
210 
219  inline const Aws::Map<QueueAttributeName, Aws::String>& GetAttributes() const{ return m_attributes; }
220 
229  inline void SetAttributes(const Aws::Map<QueueAttributeName, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
230 
239  inline void SetAttributes(Aws::Map<QueueAttributeName, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = value; }
240 
249  inline Message& WithAttributes(const Aws::Map<QueueAttributeName, Aws::String>& value) { SetAttributes(value); return *this;}
250 
259  inline Message& WithAttributes(Aws::Map<QueueAttributeName, Aws::String>&& value) { SetAttributes(value); return *this;}
260 
269  inline Message& AddAttributes(const QueueAttributeName& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
270 
279  inline Message& AddAttributes(QueueAttributeName&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
280 
289  inline Message& AddAttributes(const QueueAttributeName& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
290 
299  inline Message& AddAttributes(QueueAttributeName&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
300 
309  inline Message& AddAttributes(QueueAttributeName&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
310 
319  inline Message& AddAttributes(const QueueAttributeName& key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
320 
328  inline const Aws::String& GetMD5OfMessageAttributes() const{ return m_mD5OfMessageAttributes; }
329 
337  inline void SetMD5OfMessageAttributes(const Aws::String& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = value; }
338 
346  inline void SetMD5OfMessageAttributes(Aws::String&& value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes = value; }
347 
355  inline void SetMD5OfMessageAttributes(const char* value) { m_mD5OfMessageAttributesHasBeenSet = true; m_mD5OfMessageAttributes.assign(value); }
356 
364  inline Message& WithMD5OfMessageAttributes(const Aws::String& value) { SetMD5OfMessageAttributes(value); return *this;}
365 
373  inline Message& WithMD5OfMessageAttributes(Aws::String&& value) { SetMD5OfMessageAttributes(value); return *this;}
374 
382  inline Message& WithMD5OfMessageAttributes(const char* value) { SetMD5OfMessageAttributes(value); return *this;}
383 
390  inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const{ return m_messageAttributes; }
391 
398  inline void SetMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
399 
406  inline void SetMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
407 
414  inline Message& WithMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { SetMessageAttributes(value); return *this;}
415 
422  inline Message& WithMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { SetMessageAttributes(value); return *this;}
423 
430  inline Message& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
431 
438  inline Message& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
439 
446  inline Message& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
447 
454  inline Message& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
455 
462  inline Message& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
463 
470  inline Message& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
471 
472  private:
473  Aws::String m_messageId;
474  bool m_messageIdHasBeenSet;
475  Aws::String m_receiptHandle;
476  bool m_receiptHandleHasBeenSet;
477  Aws::String m_mD5OfBody;
478  bool m_mD5OfBodyHasBeenSet;
479  Aws::String m_body;
480  bool m_bodyHasBeenSet;
482  bool m_attributesHasBeenSet;
483  Aws::String m_mD5OfMessageAttributes;
484  bool m_mD5OfMessageAttributesHasBeenSet;
486  bool m_messageAttributesHasBeenSet;
487  };
488 
489 } // namespace Model
490 } // namespace SQS
491 } // namespace Aws
Message & WithBody(const Aws::String &value)
Definition: Message.h:199
void SetMD5OfMessageAttributes(Aws::String &&value)
Definition: Message.h:346
const Aws::String & GetReceiptHandle() const
Definition: Message.h:97
Message & AddAttributes(QueueAttributeName &&key, const Aws::String &value)
Definition: Message.h:279
Message & WithMessageId(Aws::String &&value)
Definition: Message.h:84
void SetMessageId(const Aws::String &value)
Definition: Message.h:60
void SetBody(const Aws::String &value)
Definition: Message.h:184
Message & WithMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
Definition: Message.h:422
Message & WithReceiptHandle(const Aws::String &value)
Definition: Message.h:125
Message & AddMessageAttributes(const char *key, const MessageAttributeValue &value)
Definition: Message.h:470
Message & AddMessageAttributes(Aws::String &&key, const MessageAttributeValue &value)
Definition: Message.h:438
Message & WithMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
Definition: Message.h:414
const Aws::String & GetMD5OfMessageAttributes() const
Definition: Message.h:328
void SetAttributes(const Aws::Map< QueueAttributeName, Aws::String > &value)
Definition: Message.h:229
void SetMessageId(Aws::String &&value)
Definition: Message.h:66
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
void SetMessageId(const char *value)
Definition: Message.h:72
Message & WithMD5OfBody(const Aws::String &value)
Definition: Message.h:164
void SetMD5OfMessageAttributes(const Aws::String &value)
Definition: Message.h:337
Message & AddAttributes(const QueueAttributeName &key, Aws::String &&value)
Definition: Message.h:289
Message & WithReceiptHandle(const char *value)
Definition: Message.h:139
Message & WithBody(Aws::String &&value)
Definition: Message.h:204
Message & WithAttributes(const Aws::Map< QueueAttributeName, Aws::String > &value)
Definition: Message.h:249
void SetReceiptHandle(Aws::String &&value)
Definition: Message.h:111
Message & WithMD5OfBody(const char *value)
Definition: Message.h:174
Message & WithBody(const char *value)
Definition: Message.h:209
const Aws::String & GetMD5OfBody() const
Definition: Message.h:144
Message & WithAttributes(Aws::Map< QueueAttributeName, Aws::String > &&value)
Definition: Message.h:259
Message & WithMD5OfBody(Aws::String &&value)
Definition: Message.h:169
Message & AddMessageAttributes(const char *key, MessageAttributeValue &&value)
Definition: Message.h:462
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
Message & AddAttributes(const QueueAttributeName &key, const Aws::String &value)
Definition: Message.h:269
void SetReceiptHandle(const Aws::String &value)
Definition: Message.h:104
void SetMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
Definition: Message.h:398
Message & AddMessageAttributes(const Aws::String &key, MessageAttributeValue &&value)
Definition: Message.h:446
Message & AddMessageAttributes(const Aws::String &key, const MessageAttributeValue &value)
Definition: Message.h:430
Message & WithMD5OfMessageAttributes(Aws::String &&value)
Definition: Message.h:373
void SetBody(const char *value)
Definition: Message.h:194
void SetBody(Aws::String &&value)
Definition: Message.h:189
const Aws::Map< QueueAttributeName, Aws::String > & GetAttributes() const
Definition: Message.h:219
Message & WithReceiptHandle(Aws::String &&value)
Definition: Message.h:132
Message & AddMessageAttributes(Aws::String &&key, MessageAttributeValue &&value)
Definition: Message.h:454
Message & WithMessageId(const Aws::String &value)
Definition: Message.h:78
void SetMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
Definition: Message.h:406
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
Definition: Message.h:390
void SetMD5OfBody(const char *value)
Definition: Message.h:159
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Message & AddAttributes(const QueueAttributeName &key, const char *value)
Definition: Message.h:319
void SetMD5OfBody(const Aws::String &value)
Definition: Message.h:149
#define AWS_SQS_API
Definition: SQS_EXPORTS.h:34
const Aws::String & GetBody() const
Definition: Message.h:179
Message & AddAttributes(QueueAttributeName &&key, Aws::String &&value)
Definition: Message.h:299
Message & WithMD5OfMessageAttributes(const Aws::String &value)
Definition: Message.h:364
Message & WithMessageId(const char *value)
Definition: Message.h:90
Message & WithMD5OfMessageAttributes(const char *value)
Definition: Message.h:382
void SetAttributes(Aws::Map< QueueAttributeName, Aws::String > &&value)
Definition: Message.h:239
void SetMD5OfMessageAttributes(const char *value)
Definition: Message.h:355
const Aws::String & GetMessageId() const
Definition: Message.h:54
Message & AddAttributes(QueueAttributeName &&key, const char *value)
Definition: Message.h:309
void SetReceiptHandle(const char *value)
Definition: Message.h:118
JSON (JavaScript Object Notation).
void SetMD5OfBody(Aws::String &&value)
Definition: Message.h:154