AWS SDK for C++

AWS SDK for C++ Version 1.11.787

Loading...
Searching...
No Matches
CreateTopicRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/sns/SNSRequest.h>
11#include <aws/sns/SNS_EXPORTS.h>
12#include <aws/sns/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace SNS {
18namespace Model {
19
26 public:
27 AWS_SNS_API CreateTopicRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateTopic"; }
34
35 AWS_SNS_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_SNS_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
49 inline const Aws::String& GetName() const { return m_name; }
50 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
51 template <typename NameT = Aws::String>
52 void SetName(NameT&& value) {
53 m_nameHasBeenSet = true;
54 m_name = std::forward<NameT>(value);
55 }
56 template <typename NameT = Aws::String>
57 CreateTopicRequest& WithName(NameT&& value) {
58 SetName(std::forward<NameT>(value));
59 return *this;
60 }
62
64
173 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
174 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
175 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
176 void SetAttributes(AttributesT&& value) {
177 m_attributesHasBeenSet = true;
178 m_attributes = std::forward<AttributesT>(value);
179 }
180 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
181 CreateTopicRequest& WithAttributes(AttributesT&& value) {
182 SetAttributes(std::forward<AttributesT>(value));
183 return *this;
184 }
185 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
186 CreateTopicRequest& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
187 m_attributesHasBeenSet = true;
188 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
189 return *this;
190 }
192
194
199 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
200 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
201 template <typename TagsT = Aws::Vector<Tag>>
202 void SetTags(TagsT&& value) {
203 m_tagsHasBeenSet = true;
204 m_tags = std::forward<TagsT>(value);
205 }
206 template <typename TagsT = Aws::Vector<Tag>>
207 CreateTopicRequest& WithTags(TagsT&& value) {
208 SetTags(std::forward<TagsT>(value));
209 return *this;
210 }
211 template <typename TagsT = Tag>
212 CreateTopicRequest& AddTags(TagsT&& value) {
213 m_tagsHasBeenSet = true;
214 m_tags.emplace_back(std::forward<TagsT>(value));
215 return *this;
216 }
218
220
225 inline const Aws::String& GetDataProtectionPolicy() const { return m_dataProtectionPolicy; }
226 inline bool DataProtectionPolicyHasBeenSet() const { return m_dataProtectionPolicyHasBeenSet; }
227 template <typename DataProtectionPolicyT = Aws::String>
228 void SetDataProtectionPolicy(DataProtectionPolicyT&& value) {
229 m_dataProtectionPolicyHasBeenSet = true;
230 m_dataProtectionPolicy = std::forward<DataProtectionPolicyT>(value);
231 }
232 template <typename DataProtectionPolicyT = Aws::String>
233 CreateTopicRequest& WithDataProtectionPolicy(DataProtectionPolicyT&& value) {
234 SetDataProtectionPolicy(std::forward<DataProtectionPolicyT>(value));
235 return *this;
236 }
238 private:
239 Aws::String m_name;
240
242
243 Aws::Vector<Tag> m_tags;
244
245 Aws::String m_dataProtectionPolicy;
246 bool m_nameHasBeenSet = false;
247 bool m_attributesHasBeenSet = false;
248 bool m_tagsHasBeenSet = false;
249 bool m_dataProtectionPolicyHasBeenSet = false;
250};
251
252} // namespace Model
253} // namespace SNS
254} // namespace Aws
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
const Aws::String & GetName() const
CreateTopicRequest & WithName(NameT &&value)
AWS_SNS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateTopicRequest & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
const Aws::Vector< Tag > & GetTags() const
void SetAttributes(AttributesT &&value)
const Aws::String & GetDataProtectionPolicy() const
CreateTopicRequest & WithTags(TagsT &&value)
CreateTopicRequest & AddTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
CreateTopicRequest & WithDataProtectionPolicy(DataProtectionPolicyT &&value)
void SetDataProtectionPolicy(DataProtectionPolicyT &&value)
CreateTopicRequest & WithAttributes(AttributesT &&value)
AWS_SNS_API Aws::String SerializePayload() const override
AWS_SNS_API CreateTopicRequest()=default
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector