AWS SDK for C++  0.14.3
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 
43  inline const Aws::String& GetTopicArn() const{ return m_topicArn; }
44 
50  inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
51 
57  inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
58 
64  inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); }
65 
71  inline PublishRequest& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;}
72 
78  inline PublishRequest& WithTopicArn(Aws::String&& value) { SetTopicArn(value); return *this;}
79 
85  inline PublishRequest& WithTopicArn(const char* value) { SetTopicArn(value); return *this;}
86 
92  inline const Aws::String& GetTargetArn() const{ return m_targetArn; }
93 
99  inline void SetTargetArn(const Aws::String& value) { m_targetArnHasBeenSet = true; m_targetArn = value; }
100 
106  inline void SetTargetArn(Aws::String&& value) { m_targetArnHasBeenSet = true; m_targetArn = value; }
107 
113  inline void SetTargetArn(const char* value) { m_targetArnHasBeenSet = true; m_targetArn.assign(value); }
114 
120  inline PublishRequest& WithTargetArn(const Aws::String& value) { SetTargetArn(value); return *this;}
121 
127  inline PublishRequest& WithTargetArn(Aws::String&& value) { SetTargetArn(value); return *this;}
128 
134  inline PublishRequest& WithTargetArn(const char* value) { SetTargetArn(value); return *this;}
135 
142  inline const Aws::String& GetPhoneNumber() const{ return m_phoneNumber; }
143 
150  inline void SetPhoneNumber(const Aws::String& value) { m_phoneNumberHasBeenSet = true; m_phoneNumber = value; }
151 
158  inline void SetPhoneNumber(Aws::String&& value) { m_phoneNumberHasBeenSet = true; m_phoneNumber = value; }
159 
166  inline void SetPhoneNumber(const char* value) { m_phoneNumberHasBeenSet = true; m_phoneNumber.assign(value); }
167 
174  inline PublishRequest& WithPhoneNumber(const Aws::String& value) { SetPhoneNumber(value); return *this;}
175 
182  inline PublishRequest& WithPhoneNumber(Aws::String&& value) { SetPhoneNumber(value); return *this;}
183 
190  inline PublishRequest& WithPhoneNumber(const char* value) { SetPhoneNumber(value); return *this;}
191 
215  inline const Aws::String& GetMessage() const{ return m_message; }
216 
240  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
241 
265  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
266 
290  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
291 
315  inline PublishRequest& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
316 
340  inline PublishRequest& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
341 
365  inline PublishRequest& WithMessage(const char* value) { SetMessage(value); return *this;}
366 
375  inline const Aws::String& GetSubject() const{ return m_subject; }
376 
385  inline void SetSubject(const Aws::String& value) { m_subjectHasBeenSet = true; m_subject = value; }
386 
395  inline void SetSubject(Aws::String&& value) { m_subjectHasBeenSet = true; m_subject = value; }
396 
405  inline void SetSubject(const char* value) { m_subjectHasBeenSet = true; m_subject.assign(value); }
406 
415  inline PublishRequest& WithSubject(const Aws::String& value) { SetSubject(value); return *this;}
416 
425  inline PublishRequest& WithSubject(Aws::String&& value) { SetSubject(value); return *this;}
426 
435  inline PublishRequest& WithSubject(const char* value) { SetSubject(value); return *this;}
436 
453  inline const Aws::String& GetMessageStructure() const{ return m_messageStructure; }
454 
471  inline void SetMessageStructure(const Aws::String& value) { m_messageStructureHasBeenSet = true; m_messageStructure = value; }
472 
489  inline void SetMessageStructure(Aws::String&& value) { m_messageStructureHasBeenSet = true; m_messageStructure = value; }
490 
507  inline void SetMessageStructure(const char* value) { m_messageStructureHasBeenSet = true; m_messageStructure.assign(value); }
508 
525  inline PublishRequest& WithMessageStructure(const Aws::String& value) { SetMessageStructure(value); return *this;}
526 
543  inline PublishRequest& WithMessageStructure(Aws::String&& value) { SetMessageStructure(value); return *this;}
544 
561  inline PublishRequest& WithMessageStructure(const char* value) { SetMessageStructure(value); return *this;}
562 
566  inline const Aws::Map<Aws::String, MessageAttributeValue>& GetMessageAttributes() const{ return m_messageAttributes; }
567 
571  inline void SetMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
572 
576  inline void SetMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; }
577 
581  inline PublishRequest& WithMessageAttributes(const Aws::Map<Aws::String, MessageAttributeValue>& value) { SetMessageAttributes(value); return *this;}
582 
586  inline PublishRequest& WithMessageAttributes(Aws::Map<Aws::String, MessageAttributeValue>&& value) { SetMessageAttributes(value); return *this;}
587 
591  inline PublishRequest& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
592 
596  inline PublishRequest& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
597 
601  inline PublishRequest& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
602 
606  inline PublishRequest& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
607 
611  inline PublishRequest& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
612 
616  inline PublishRequest& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes[key] = value; return *this; }
617 
618  private:
619  Aws::String m_topicArn;
620  bool m_topicArnHasBeenSet;
621  Aws::String m_targetArn;
622  bool m_targetArnHasBeenSet;
623  Aws::String m_phoneNumber;
624  bool m_phoneNumberHasBeenSet;
625  Aws::String m_message;
626  bool m_messageHasBeenSet;
627  Aws::String m_subject;
628  bool m_subjectHasBeenSet;
629  Aws::String m_messageStructure;
630  bool m_messageStructureHasBeenSet;
632  bool m_messageAttributesHasBeenSet;
633  };
634 
635 } // namespace Model
636 } // namespace SNS
637 } // 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)
const Aws::String & GetPhoneNumber() const
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 SetPhoneNumber(const Aws::String &value)
void SetSubject(const char *value)
PublishRequest & WithTargetArn(Aws::String &&value)
void SetMessageAttributes(Aws::Map< Aws::String, MessageAttributeValue > &&value)
void SetPhoneNumber(Aws::String &&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
PublishRequest & WithPhoneNumber(Aws::String &&value)
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:37
void SetMessage(Aws::String &&value)
void SetTopicArn(Aws::String &&value)
void SetPhoneNumber(const char *value)
PublishRequest & WithMessage(Aws::String &&value)
PublishRequest & AddMessageAttributes(Aws::String &&key, const MessageAttributeValue &value)
PublishRequest & WithPhoneNumber(const Aws::String &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)
PublishRequest & WithPhoneNumber(const char *value)