AWS SDK for C++  1.9.108
AWS SDK for C++
CreateTopicRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sns/SNS_EXPORTS.h>
8 #include <aws/sns/SNSRequest.h>
12 #include <aws/sns/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace SNS
18 {
19 namespace Model
20 {
21 
28  {
29  public:
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 "CreateTopic"; }
37 
38  Aws::String SerializePayload() const override;
39 
40  protected:
41  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
42 
43  public:
44 
52  inline const Aws::String& GetName() const{ return m_name; }
53 
61  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
62 
70  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
71 
79  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
80 
88  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
89 
97  inline CreateTopicRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
98 
106  inline CreateTopicRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
107 
115  inline CreateTopicRequest& WithName(const char* value) { SetName(value); return *this;}
116 
117 
155  inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; }
156 
194  inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
195 
233  inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
234 
272  inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
273 
311  inline CreateTopicRequest& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;}
312 
350  inline CreateTopicRequest& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(std::move(value)); return *this;}
351 
389  inline CreateTopicRequest& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
390 
428  inline CreateTopicRequest& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
429 
467  inline CreateTopicRequest& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
468 
506  inline CreateTopicRequest& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; }
507 
545  inline CreateTopicRequest& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
546 
584  inline CreateTopicRequest& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
585 
623  inline CreateTopicRequest& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
624 
625 
631  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
632 
638  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
639 
645  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
646 
652  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
653 
659  inline CreateTopicRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
660 
666  inline CreateTopicRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
667 
673  inline CreateTopicRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
674 
680  inline CreateTopicRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
681 
682  private:
683 
684  Aws::String m_name;
685  bool m_nameHasBeenSet;
686 
688  bool m_attributesHasBeenSet;
689 
690  Aws::Vector<Tag> m_tags;
691  bool m_tagsHasBeenSet;
692  };
693 
694 } // namespace Model
695 } // namespace SNS
696 } // namespace Aws
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(const Aws::String &key, Aws::String &&value)
Definition: CreateTopicRequest.h:467
Aws::SNS::Model::CreateTopicRequest::WithName
CreateTopicRequest & WithName(const char *value)
Definition: CreateTopicRequest.h:115
Aws::SNS::Model::CreateTopicRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateTopicRequest.h:36
Aws::Http::URI
Definition: URI.h:32
Aws::SNS::Model::CreateTopicRequest::AttributesHasBeenSet
bool AttributesHasBeenSet() const
Definition: CreateTopicRequest.h:194
Aws::SNS::Model::CreateTopicRequest::SetName
void SetName(const char *value)
Definition: CreateTopicRequest.h:88
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(const Aws::String &key, const Aws::String &value)
Definition: CreateTopicRequest.h:389
Aws::SNS::Model::CreateTopicRequest::WithTags
CreateTopicRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateTopicRequest.h:659
Aws::SNS::Model::CreateTopicRequest::WithTags
CreateTopicRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateTopicRequest.h:666
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(Aws::String &&key, Aws::String &&value)
Definition: CreateTopicRequest.h:506
Aws::SNS::Model::Tag
Definition: Tag.h:32
Aws::SNS::Model::CreateTopicRequest::NameHasBeenSet
bool NameHasBeenSet() const
Definition: CreateTopicRequest.h:61
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::SNS::Model::CreateTopicRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateTopicRequest.h:645
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(const char *key, Aws::String &&value)
Definition: CreateTopicRequest.h:545
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(const char *key, const char *value)
Definition: CreateTopicRequest.h:623
Aws::SNS::Model::CreateTopicRequest::WithName
CreateTopicRequest & WithName(const Aws::String &value)
Definition: CreateTopicRequest.h:97
AWSVector.h
Aws::SNS::Model::CreateTopicRequest::SetName
void SetName(Aws::String &&value)
Definition: CreateTopicRequest.h:79
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(Aws::String &&key, const char *value)
Definition: CreateTopicRequest.h:584
Aws::SNS::Model::CreateTopicRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateTopicRequest.h:638
Aws::SNS::Model::CreateTopicRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateTopicRequest.h:631
SNSRequest.h
Aws::SNS::SNSRequest
Definition: SNSRequest.h:17
Aws::SNS::Model::CreateTopicRequest::AddTags
CreateTopicRequest & AddTags(const Tag &value)
Definition: CreateTopicRequest.h:673
Aws::SNS::Model::CreateTopicRequest::GetAttributes
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
Definition: CreateTopicRequest.h:155
Aws::SNS::Model::CreateTopicRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateTopicRequest.h:652
Aws::SNS::Model::CreateTopicRequest::WithName
CreateTopicRequest & WithName(Aws::String &&value)
Definition: CreateTopicRequest.h:106
Aws::SNS::Model::CreateTopicRequest::WithAttributes
CreateTopicRequest & WithAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: CreateTopicRequest.h:350
AWSString.h
Aws::CostExplorer::Model::SubscriberType::NOT_SET
@ NOT_SET
Aws::SNS::Model::CreateTopicRequest::AddTags
CreateTopicRequest & AddTags(Tag &&value)
Definition: CreateTopicRequest.h:680
AWS_SNS_API
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:28
Aws::SNS::Model::CreateTopicRequest::SetName
void SetName(const Aws::String &value)
Definition: CreateTopicRequest.h:70
SNS_EXPORTS.h
Aws::SNS::Model::CreateTopicRequest::CreateTopicRequest
CreateTopicRequest()
Aws::SNS::Model::CreateTopicRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws
Definition: AccessManagementClient.h:15
Aws::SNS::Model::CreateTopicRequest::GetName
const Aws::String & GetName() const
Definition: CreateTopicRequest.h:52
Aws::SNS::Model::CreateTopicRequest::SetAttributes
void SetAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: CreateTopicRequest.h:233
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SNS::Model::CreateTopicRequest
Definition: CreateTopicRequest.h:28
Aws::SNS::Model::CreateTopicRequest::SetAttributes
void SetAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: CreateTopicRequest.h:272
Aws::SNS::Model::CreateTopicRequest::AddAttributes
CreateTopicRequest & AddAttributes(Aws::String &&key, const Aws::String &value)
Definition: CreateTopicRequest.h:428
Aws::SNS::Model::CreateTopicRequest::SerializePayload
Aws::String SerializePayload() const override
Tag.h
AWSMap.h
Aws::SNS::Model::CreateTopicRequest::WithAttributes
CreateTopicRequest & WithAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: CreateTopicRequest.h:311
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19