AWS SDK for C++  0.12.9
AWS SDK for C++
PublishRequest.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/sns/SNS_EXPORTS.h>
17 #include <aws/sns/SNSRequest.h>
21 
22 namespace Aws
23 {
24 namespace SNS
25 {
26 namespace Model
27 {
28 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
41  inline const Aws::String& GetTopicArn() const{ return m_topicArn; }
42 
46  inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
47 
51  inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
52 
56  inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); }
57 
61  inline PublishRequest& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;}
62 
66  inline PublishRequest& WithTopicArn(Aws::String&& value) { SetTopicArn(value); return *this;}
67 
71  inline PublishRequest& WithTopicArn(const char* value) { SetTopicArn(value); return *this;}
72 
76  inline const Aws::String& GetTargetArn() const{ return m_targetArn; }
77 
81  inline void SetTargetArn(const Aws::String& value) { m_targetArnHasBeenSet = true; m_targetArn = value; }
82 
86  inline void SetTargetArn(Aws::String&& value) { m_targetArnHasBeenSet = true; m_targetArn = value; }
87 
91  inline void SetTargetArn(const char* value) { m_targetArnHasBeenSet = true; m_targetArn.assign(value); }
92 
96  inline PublishRequest& WithTargetArn(const Aws::String& value) { SetTargetArn(value); return *this;}
97 
101  inline PublishRequest& WithTargetArn(Aws::String&& value) { SetTargetArn(value); return *this;}
102 
106  inline PublishRequest& WithTargetArn(const char* value) { SetTargetArn(value); return *this;}
107 
130  inline const Aws::String& GetMessage() const{ return m_message; }
131 
154  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
155 
178  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
179 
202  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
203 
226  inline PublishRequest& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
227 
250  inline PublishRequest& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
251 
274  inline PublishRequest& WithMessage(const char* value) { SetMessage(value); return *this;}
275 
284  inline const Aws::String& GetSubject() const{ return m_subject; }
285 
294  inline void SetSubject(const Aws::String& value) { m_subjectHasBeenSet = true; m_subject = value; }
295 
304  inline void SetSubject(Aws::String&& value) { m_subjectHasBeenSet = true; m_subject = value; }
305 
314  inline void SetSubject(const char* value) { m_subjectHasBeenSet = true; m_subject.assign(value); }
315 
324  inline PublishRequest& WithSubject(const Aws::String& value) { SetSubject(value); return *this;}
325 
334  inline PublishRequest& WithSubject(Aws::String&& value) { SetSubject(value); return *this;}
335 
344  inline PublishRequest& WithSubject(const char* value) { SetSubject(value); return *this;}
345 
362  inline const Aws::String& GetMessageStructure() const{ return m_messageStructure; }
363 
380  inline void SetMessageStructure(const Aws::String& value) { m_messageStructureHasBeenSet = true; m_messageStructure = value; }
381 
398  inline void SetMessageStructure(Aws::String&& value) { m_messageStructureHasBeenSet = true; m_messageStructure = value; }
399 
416  inline void SetMessageStructure(const char* value) { m_messageStructureHasBeenSet = true; m_messageStructure.assign(value); }
417 
434  inline PublishRequest& WithMessageStructure(const Aws::String& value) { SetMessageStructure(value); return *this;}
435 
452  inline PublishRequest& WithMessageStructure(Aws::String&& value) { SetMessageStructure(value); return *this;}
453 
470  inline PublishRequest& WithMessageStructure(const char* value) { SetMessageStructure(value); return *this;}
471 
475  inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const{ return m_messageAttributes; }
476 
480  inline void SetMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
481 
485  inline void SetMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
486 
490  inline PublishRequest& WithMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { SetMessageAttributes(value); return *this;}
491 
495  inline PublishRequest& WithMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { SetMessageAttributes(value); return *this;}
496 
500  inline PublishRequest& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
501 
505  inline PublishRequest& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
506 
510  inline PublishRequest& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
511 
515  inline PublishRequest& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
516 
520  inline PublishRequest& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
521 
525  inline PublishRequest& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
526 
527  private:
528  Aws::String m_topicArn;
529  bool m_topicArnHasBeenSet;
530  Aws::String m_targetArn;
531  bool m_targetArnHasBeenSet;
532  Aws::String m_message;
533  bool m_messageHasBeenSet;
534  Aws::String m_subject;
535  bool m_subjectHasBeenSet;
536  Aws::String m_messageStructure;
537  bool m_messageStructureHasBeenSet;
539  bool m_messageAttributesHasBeenSet;
540  };
541 
542 } // namespace Model
543 } // namespace SNS
544 } // namespace Aws
PublishRequest & WithTopicArn(const Aws::String &value)
void SetMessage(const char *value)
PublishRequest & WithMessage(const Aws::String &value)
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes() const
PublishRequest & WithMessageStructure(const char *value)
void SetMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
const Aws::String & GetTopicArn() const
PublishRequest & WithSubject(Aws::String &&value)
PublishRequest & AddMessageAttributes(const char *key, const MessageAttributeValue &value)
PublishRequest & AddMessageAttributes(const char *key, MessageAttributeValue &&value)
PublishRequest & WithMessageStructure(const Aws::String &value)
void SetMessageStructure(const Aws::String &value)
void SetSubject(const Aws::String &value)
const Aws::String & GetMessage() const
PublishRequest & WithSubject(const char *value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
const Aws::String & GetSubject() const
const Aws::String & GetTargetArn() const
PublishRequest & WithMessage(const char *value)
void SetMessageStructure(Aws::String &&value)
PublishRequest & WithTargetArn(const Aws::String &value)
PublishRequest & WithMessageAttributes(const Aws::Map< Aws::String, MessageAttributeValue > &value)
void SetTopicArn(const Aws::String &value)
void SetSubject(const char *value)
PublishRequest & WithTargetArn(Aws::String &&value)
void SetMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
void SetMessageStructure(const char *value)
void SetTargetArn(const Aws::String &value)
PublishRequest & WithTopicArn(const char *value)
void SetSubject(Aws::String &&value)
PublishRequest & WithMessageStructure(Aws::String &&value)
PublishRequest & AddMessageAttributes(const Aws::String &key, const MessageAttributeValue &value)
void SetMessage(const Aws::String &value)
PublishRequest & WithMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
void SetTargetArn(const char *value)
void SetTargetArn(Aws::String &&value)
void SetTopicArn(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetMessageStructure() const
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:34
void SetMessage(Aws::String &&value)
void SetTopicArn(Aws::String &&value)
PublishRequest & WithMessage(Aws::String &&value)
PublishRequest & AddMessageAttributes(Aws::String &&key, const MessageAttributeValue &value)
PublishRequest & AddMessageAttributes(Aws::String &&key, MessageAttributeValue &&value)
PublishRequest & WithTargetArn(const char *value)
JSON (JavaScript Object Notation).
PublishRequest & AddMessageAttributes(const Aws::String &key, MessageAttributeValue &&value)
PublishRequest & WithTopicArn(Aws::String &&value)
PublishRequest & WithSubject(const Aws::String &value)