AWS SDK for C++

AWS SDK for C++ Version 1.11.901

Loading...
Searching...
No Matches
CreateLifecyclePolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/imagebuilder/ImagebuilderRequest.h>
12#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
13#include <aws/imagebuilder/model/LifecyclePolicyDetail.h>
14#include <aws/imagebuilder/model/LifecyclePolicyResourceSelection.h>
15#include <aws/imagebuilder/model/LifecyclePolicyResourceType.h>
16#include <aws/imagebuilder/model/LifecyclePolicyStatus.h>
17
18#include <utility>
19
20namespace Aws {
21namespace imagebuilder {
22namespace Model {
23
27 public:
28 AWS_IMAGEBUILDER_API CreateLifecyclePolicyRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateLifecyclePolicy"; }
35
36 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
37
39
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetDescription() const { return m_description; }
65 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
66 template <typename DescriptionT = Aws::String>
67 void SetDescription(DescriptionT&& value) {
68 m_descriptionHasBeenSet = true;
69 m_description = std::forward<DescriptionT>(value);
70 }
71 template <typename DescriptionT = Aws::String>
73 SetDescription(std::forward<DescriptionT>(value));
74 return *this;
75 }
77
79
84 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
85 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
86 inline void SetStatus(LifecyclePolicyStatus value) {
87 m_statusHasBeenSet = true;
88 m_status = value;
89 }
91 SetStatus(value);
92 return *this;
93 }
95
97
103 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
104 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
105 template <typename ExecutionRoleT = Aws::String>
106 void SetExecutionRole(ExecutionRoleT&& value) {
107 m_executionRoleHasBeenSet = true;
108 m_executionRole = std::forward<ExecutionRoleT>(value);
109 }
110 template <typename ExecutionRoleT = Aws::String>
112 SetExecutionRole(std::forward<ExecutionRoleT>(value));
113 return *this;
114 }
116
118
126 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
127 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
129 m_resourceTypeHasBeenSet = true;
130 m_resourceType = value;
131 }
133 SetResourceType(value);
134 return *this;
135 }
137
139
144 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
145 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
146 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
147 void SetPolicyDetails(PolicyDetailsT&& value) {
148 m_policyDetailsHasBeenSet = true;
149 m_policyDetails = std::forward<PolicyDetailsT>(value);
150 }
151 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
153 SetPolicyDetails(std::forward<PolicyDetailsT>(value));
154 return *this;
155 }
156 template <typename PolicyDetailsT = LifecyclePolicyDetail>
158 m_policyDetailsHasBeenSet = true;
159 m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value));
160 return *this;
161 }
163
165
170 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
171 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
172 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
173 void SetResourceSelection(ResourceSelectionT&& value) {
174 m_resourceSelectionHasBeenSet = true;
175 m_resourceSelection = std::forward<ResourceSelectionT>(value);
176 }
177 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
179 SetResourceSelection(std::forward<ResourceSelectionT>(value));
180 return *this;
181 }
183
185
188 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
189 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
190 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
191 void SetTags(TagsT&& value) {
192 m_tagsHasBeenSet = true;
193 m_tags = std::forward<TagsT>(value);
194 }
195 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
197 SetTags(std::forward<TagsT>(value));
198 return *this;
199 }
200 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
201 CreateLifecyclePolicyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
202 m_tagsHasBeenSet = true;
203 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
204 return *this;
205 }
207
209
217 inline const Aws::String& GetClientToken() const { return m_clientToken; }
218 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
219 template <typename ClientTokenT = Aws::String>
220 void SetClientToken(ClientTokenT&& value) {
221 m_clientTokenHasBeenSet = true;
222 m_clientToken = std::forward<ClientTokenT>(value);
223 }
224 template <typename ClientTokenT = Aws::String>
226 SetClientToken(std::forward<ClientTokenT>(value));
227 return *this;
228 }
230
232
237 inline bool GetDryRun() const { return m_dryRun; }
238 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
239 inline void SetDryRun(bool value) {
240 m_dryRunHasBeenSet = true;
241 m_dryRun = value;
242 }
244 SetDryRun(value);
245 return *this;
246 }
248 private:
249 Aws::String m_name;
250
251 Aws::String m_description;
252
254
255 Aws::String m_executionRole;
256
258
260
261 LifecyclePolicyResourceSelection m_resourceSelection;
262
264
266
267 bool m_dryRun{false};
268 bool m_nameHasBeenSet = false;
269 bool m_descriptionHasBeenSet = false;
270 bool m_statusHasBeenSet = false;
271 bool m_executionRoleHasBeenSet = false;
272 bool m_resourceTypeHasBeenSet = false;
273 bool m_policyDetailsHasBeenSet = false;
274 bool m_resourceSelectionHasBeenSet = false;
275 bool m_tagsHasBeenSet = false;
276 bool m_clientTokenHasBeenSet = true;
277 bool m_dryRunHasBeenSet = false;
278};
279
280} // namespace Model
281} // namespace imagebuilder
282} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateLifecyclePolicyRequest & WithStatus(LifecyclePolicyStatus value)
CreateLifecyclePolicyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateLifecyclePolicyRequest & WithPolicyDetails(PolicyDetailsT &&value)
const LifecyclePolicyResourceSelection & GetResourceSelection() const
CreateLifecyclePolicyRequest & WithExecutionRole(ExecutionRoleT &&value)
CreateLifecyclePolicyRequest & WithName(NameT &&value)
CreateLifecyclePolicyRequest & WithClientToken(ClientTokenT &&value)
CreateLifecyclePolicyRequest & WithDescription(DescriptionT &&value)
AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override
const Aws::Vector< LifecyclePolicyDetail > & GetPolicyDetails() const
CreateLifecyclePolicyRequest & AddPolicyDetails(PolicyDetailsT &&value)
CreateLifecyclePolicyRequest & WithResourceType(LifecyclePolicyResourceType value)
AWS_IMAGEBUILDER_API CreateLifecyclePolicyRequest()=default
CreateLifecyclePolicyRequest & WithResourceSelection(ResourceSelectionT &&value)
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