AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
CreatePolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iot/IoTRequest.h>
10#include <aws/iot/IoT_EXPORTS.h>
11#include <aws/iot/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace IoT {
17namespace Model {
18
25 public:
26 AWS_IOT_API CreatePolicyRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreatePolicy"; }
33
34 AWS_IOT_API Aws::String SerializePayload() const override;
35
37
40 inline const Aws::String& GetPolicyName() const { return m_policyName; }
41 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
42 template <typename PolicyNameT = Aws::String>
43 void SetPolicyName(PolicyNameT&& value) {
44 m_policyNameHasBeenSet = true;
45 m_policyName = std::forward<PolicyNameT>(value);
46 }
47 template <typename PolicyNameT = Aws::String>
48 CreatePolicyRequest& WithPolicyName(PolicyNameT&& value) {
49 SetPolicyName(std::forward<PolicyNameT>(value));
50 return *this;
51 }
53
55
59 inline const Aws::String& GetPolicyDocument() const { return m_policyDocument; }
60 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
61 template <typename PolicyDocumentT = Aws::String>
62 void SetPolicyDocument(PolicyDocumentT&& value) {
63 m_policyDocumentHasBeenSet = true;
64 m_policyDocument = std::forward<PolicyDocumentT>(value);
65 }
66 template <typename PolicyDocumentT = Aws::String>
67 CreatePolicyRequest& WithPolicyDocument(PolicyDocumentT&& value) {
68 SetPolicyDocument(std::forward<PolicyDocumentT>(value));
69 return *this;
70 }
72
74
81 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
82 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
83 template <typename TagsT = Aws::Vector<Tag>>
84 void SetTags(TagsT&& value) {
85 m_tagsHasBeenSet = true;
86 m_tags = std::forward<TagsT>(value);
87 }
88 template <typename TagsT = Aws::Vector<Tag>>
89 CreatePolicyRequest& WithTags(TagsT&& value) {
90 SetTags(std::forward<TagsT>(value));
91 return *this;
92 }
93 template <typename TagsT = Tag>
94 CreatePolicyRequest& AddTags(TagsT&& value) {
95 m_tagsHasBeenSet = true;
96 m_tags.emplace_back(std::forward<TagsT>(value));
97 return *this;
98 }
100 private:
101 Aws::String m_policyName;
102
103 Aws::String m_policyDocument;
104
105 Aws::Vector<Tag> m_tags;
106 bool m_policyNameHasBeenSet = false;
107 bool m_policyDocumentHasBeenSet = false;
108 bool m_tagsHasBeenSet = false;
109};
110
111} // namespace Model
112} // namespace IoT
113} // namespace Aws
CreatePolicyRequest & AddTags(TagsT &&value)
const Aws::String & GetPolicyName() const
CreatePolicyRequest & WithTags(TagsT &&value)
CreatePolicyRequest & WithPolicyDocument(PolicyDocumentT &&value)
void SetPolicyName(PolicyNameT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Tag > & GetTags() const
AWS_IOT_API CreatePolicyRequest()=default
const Aws::String & GetPolicyDocument() const
CreatePolicyRequest & WithPolicyName(PolicyNameT &&value)
void SetPolicyDocument(PolicyDocumentT &&value)
AWS_IOT_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector