AWS SDK for C++

AWS SDK for C++ Version 1.11.771

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/organizations/OrganizationsRequest.h>
10#include <aws/organizations/Organizations_EXPORTS.h>
11#include <aws/organizations/model/PolicyType.h>
12#include <aws/organizations/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Organizations {
18namespace Model {
19
23 public:
24 AWS_ORGANIZATIONS_API CreatePolicyRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreatePolicy"; }
31
32 AWS_ORGANIZATIONS_API Aws::String SerializePayload() const override;
33
34 AWS_ORGANIZATIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35
37
45 inline const Aws::String& GetContent() const { return m_content; }
46 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
47 template <typename ContentT = Aws::String>
48 void SetContent(ContentT&& value) {
49 m_contentHasBeenSet = true;
50 m_content = std::forward<ContentT>(value);
51 }
52 template <typename ContentT = Aws::String>
53 CreatePolicyRequest& WithContent(ContentT&& value) {
54 SetContent(std::forward<ContentT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetDescription() const { return m_description; }
64 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
65 template <typename DescriptionT = Aws::String>
66 void SetDescription(DescriptionT&& value) {
67 m_descriptionHasBeenSet = true;
68 m_description = std::forward<DescriptionT>(value);
69 }
70 template <typename DescriptionT = Aws::String>
71 CreatePolicyRequest& WithDescription(DescriptionT&& value) {
72 SetDescription(std::forward<DescriptionT>(value));
73 return *this;
74 }
76
78
84 inline const Aws::String& GetName() const { return m_name; }
85 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
86 template <typename NameT = Aws::String>
87 void SetName(NameT&& value) {
88 m_nameHasBeenSet = true;
89 m_name = std::forward<NameT>(value);
90 }
91 template <typename NameT = Aws::String>
92 CreatePolicyRequest& WithName(NameT&& value) {
93 SetName(std::forward<NameT>(value));
94 return *this;
95 }
97
99
129 inline PolicyType GetType() const { return m_type; }
130 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
131 inline void SetType(PolicyType value) {
132 m_typeHasBeenSet = true;
133 m_type = value;
134 }
136 SetType(value);
137 return *this;
138 }
140
142
153 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
154 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
155 template <typename TagsT = Aws::Vector<Tag>>
156 void SetTags(TagsT&& value) {
157 m_tagsHasBeenSet = true;
158 m_tags = std::forward<TagsT>(value);
159 }
160 template <typename TagsT = Aws::Vector<Tag>>
162 SetTags(std::forward<TagsT>(value));
163 return *this;
164 }
165 template <typename TagsT = Tag>
166 CreatePolicyRequest& AddTags(TagsT&& value) {
167 m_tagsHasBeenSet = true;
168 m_tags.emplace_back(std::forward<TagsT>(value));
169 return *this;
170 }
172 private:
173 Aws::String m_content;
174
175 Aws::String m_description;
176
177 Aws::String m_name;
178
180
181 Aws::Vector<Tag> m_tags;
182 bool m_contentHasBeenSet = false;
183 bool m_descriptionHasBeenSet = false;
184 bool m_nameHasBeenSet = false;
185 bool m_typeHasBeenSet = false;
186 bool m_tagsHasBeenSet = false;
187};
188
189} // namespace Model
190} // namespace Organizations
191} // namespace Aws
CreatePolicyRequest & WithTags(TagsT &&value)
AWS_ORGANIZATIONS_API Aws::String SerializePayload() const override
AWS_ORGANIZATIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreatePolicyRequest & WithContent(ContentT &&value)
AWS_ORGANIZATIONS_API CreatePolicyRequest()=default
CreatePolicyRequest & WithDescription(DescriptionT &&value)
CreatePolicyRequest & WithName(NameT &&value)
CreatePolicyRequest & AddTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
CreatePolicyRequest & WithType(PolicyType value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector