AWS SDK for C++

AWS SDK for C++ Version 1.11.906

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
184 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
185 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
186 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
187 void SetAttributes(AttributesT&& value) {
188 m_attributesHasBeenSet = true;
189 m_attributes = std::forward<AttributesT>(value);
190 }
191 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
192 CreateTopicRequest& WithAttributes(AttributesT&& value) {
193 SetAttributes(std::forward<AttributesT>(value));
194 return *this;
195 }
196 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
197 CreateTopicRequest& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
198 m_attributesHasBeenSet = true;
199 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
200 return *this;
201 }
203
205
210 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
211 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
212 template <typename TagsT = Aws::Vector<Tag>>
213 void SetTags(TagsT&& value) {
214 m_tagsHasBeenSet = true;
215 m_tags = std::forward<TagsT>(value);
216 }
217 template <typename TagsT = Aws::Vector<Tag>>
218 CreateTopicRequest& WithTags(TagsT&& value) {
219 SetTags(std::forward<TagsT>(value));
220 return *this;
221 }
222 template <typename TagsT = Tag>
223 CreateTopicRequest& AddTags(TagsT&& value) {
224 m_tagsHasBeenSet = true;
225 m_tags.emplace_back(std::forward<TagsT>(value));
226 return *this;
227 }
229
231
240 inline const Aws::String& GetDataProtectionPolicy() const { return m_dataProtectionPolicy; }
241 inline bool DataProtectionPolicyHasBeenSet() const { return m_dataProtectionPolicyHasBeenSet; }
242 template <typename DataProtectionPolicyT = Aws::String>
243 void SetDataProtectionPolicy(DataProtectionPolicyT&& value) {
244 m_dataProtectionPolicyHasBeenSet = true;
245 m_dataProtectionPolicy = std::forward<DataProtectionPolicyT>(value);
246 }
247 template <typename DataProtectionPolicyT = Aws::String>
248 CreateTopicRequest& WithDataProtectionPolicy(DataProtectionPolicyT&& value) {
249 SetDataProtectionPolicy(std::forward<DataProtectionPolicyT>(value));
250 return *this;
251 }
253 private:
254 Aws::String m_name;
255
257
258 Aws::Vector<Tag> m_tags;
259
260 Aws::String m_dataProtectionPolicy;
261 bool m_nameHasBeenSet = false;
262 bool m_attributesHasBeenSet = false;
263 bool m_tagsHasBeenSet = false;
264 bool m_dataProtectionPolicyHasBeenSet = false;
265};
266
267} // namespace Model
268} // namespace SNS
269} // 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