AWS SDK for C++

AWS SDK for C++ Version 1.11.903

Loading...
Searching...
No Matches
LifecyclePolicy.h
1
6#pragma once
7#include <aws/core/utils/DateTime.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/Imagebuilder_EXPORTS.h>
12#include <aws/imagebuilder/model/LifecyclePolicyDetail.h>
13#include <aws/imagebuilder/model/LifecyclePolicyResourceSelection.h>
14#include <aws/imagebuilder/model/LifecyclePolicyResourceType.h>
15#include <aws/imagebuilder/model/LifecyclePolicyStatus.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace imagebuilder {
27namespace Model {
28
37 public:
38 AWS_IMAGEBUILDER_API LifecyclePolicy() = default;
39 AWS_IMAGEBUILDER_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue);
40 AWS_IMAGEBUILDER_API LifecyclePolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetArn() const { return m_arn; }
48 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
49 template <typename ArnT = Aws::String>
50 void SetArn(ArnT&& value) {
51 m_arnHasBeenSet = true;
52 m_arn = std::forward<ArnT>(value);
53 }
54 template <typename ArnT = Aws::String>
55 LifecyclePolicy& WithArn(ArnT&& value) {
56 SetArn(std::forward<ArnT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetName() const { return m_name; }
66 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
67 template <typename NameT = Aws::String>
68 void SetName(NameT&& value) {
69 m_nameHasBeenSet = true;
70 m_name = std::forward<NameT>(value);
71 }
72 template <typename NameT = Aws::String>
73 LifecyclePolicy& WithName(NameT&& value) {
74 SetName(std::forward<NameT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetDescription() const { return m_description; }
84 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
85 template <typename DescriptionT = Aws::String>
86 void SetDescription(DescriptionT&& value) {
87 m_descriptionHasBeenSet = true;
88 m_description = std::forward<DescriptionT>(value);
89 }
90 template <typename DescriptionT = Aws::String>
91 LifecyclePolicy& WithDescription(DescriptionT&& value) {
92 SetDescription(std::forward<DescriptionT>(value));
93 return *this;
94 }
96
98
103 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
104 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
105 inline void SetStatus(LifecyclePolicyStatus value) {
106 m_statusHasBeenSet = true;
107 m_status = value;
108 }
110 SetStatus(value);
111 return *this;
112 }
114
116
120 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
121 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
122 template <typename ExecutionRoleT = Aws::String>
123 void SetExecutionRole(ExecutionRoleT&& value) {
124 m_executionRoleHasBeenSet = true;
125 m_executionRole = std::forward<ExecutionRoleT>(value);
126 }
127 template <typename ExecutionRoleT = Aws::String>
128 LifecyclePolicy& WithExecutionRole(ExecutionRoleT&& value) {
129 SetExecutionRole(std::forward<ExecutionRoleT>(value));
130 return *this;
131 }
133
135
138 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
139 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
141 m_resourceTypeHasBeenSet = true;
142 m_resourceType = value;
143 }
145 SetResourceType(value);
146 return *this;
147 }
149
151
156 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
157 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
158 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
159 void SetPolicyDetails(PolicyDetailsT&& value) {
160 m_policyDetailsHasBeenSet = true;
161 m_policyDetails = std::forward<PolicyDetailsT>(value);
162 }
163 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
164 LifecyclePolicy& WithPolicyDetails(PolicyDetailsT&& value) {
165 SetPolicyDetails(std::forward<PolicyDetailsT>(value));
166 return *this;
167 }
168 template <typename PolicyDetailsT = LifecyclePolicyDetail>
169 LifecyclePolicy& AddPolicyDetails(PolicyDetailsT&& value) {
170 m_policyDetailsHasBeenSet = true;
171 m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value));
172 return *this;
173 }
175
177
180 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
181 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
182 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
183 void SetResourceSelection(ResourceSelectionT&& value) {
184 m_resourceSelectionHasBeenSet = true;
185 m_resourceSelection = std::forward<ResourceSelectionT>(value);
186 }
187 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
188 LifecyclePolicy& WithResourceSelection(ResourceSelectionT&& value) {
189 SetResourceSelection(std::forward<ResourceSelectionT>(value));
190 return *this;
191 }
193
195
198 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
199 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
200 template <typename DateCreatedT = Aws::Utils::DateTime>
201 void SetDateCreated(DateCreatedT&& value) {
202 m_dateCreatedHasBeenSet = true;
203 m_dateCreated = std::forward<DateCreatedT>(value);
204 }
205 template <typename DateCreatedT = Aws::Utils::DateTime>
206 LifecyclePolicy& WithDateCreated(DateCreatedT&& value) {
207 SetDateCreated(std::forward<DateCreatedT>(value));
208 return *this;
209 }
211
213
216 inline const Aws::Utils::DateTime& GetDateUpdated() const { return m_dateUpdated; }
217 inline bool DateUpdatedHasBeenSet() const { return m_dateUpdatedHasBeenSet; }
218 template <typename DateUpdatedT = Aws::Utils::DateTime>
219 void SetDateUpdated(DateUpdatedT&& value) {
220 m_dateUpdatedHasBeenSet = true;
221 m_dateUpdated = std::forward<DateUpdatedT>(value);
222 }
223 template <typename DateUpdatedT = Aws::Utils::DateTime>
224 LifecyclePolicy& WithDateUpdated(DateUpdatedT&& value) {
225 SetDateUpdated(std::forward<DateUpdatedT>(value));
226 return *this;
227 }
229
231
234 inline const Aws::Utils::DateTime& GetDateLastRun() const { return m_dateLastRun; }
235 inline bool DateLastRunHasBeenSet() const { return m_dateLastRunHasBeenSet; }
236 template <typename DateLastRunT = Aws::Utils::DateTime>
237 void SetDateLastRun(DateLastRunT&& value) {
238 m_dateLastRunHasBeenSet = true;
239 m_dateLastRun = std::forward<DateLastRunT>(value);
240 }
241 template <typename DateLastRunT = Aws::Utils::DateTime>
242 LifecyclePolicy& WithDateLastRun(DateLastRunT&& value) {
243 SetDateLastRun(std::forward<DateLastRunT>(value));
244 return *this;
245 }
247
249
254 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
255 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
256 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
257 void SetTags(TagsT&& value) {
258 m_tagsHasBeenSet = true;
259 m_tags = std::forward<TagsT>(value);
260 }
261 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
262 LifecyclePolicy& WithTags(TagsT&& value) {
263 SetTags(std::forward<TagsT>(value));
264 return *this;
265 }
266 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
267 LifecyclePolicy& AddTags(TagsKeyT&& key, TagsValueT&& value) {
268 m_tagsHasBeenSet = true;
269 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
270 return *this;
271 }
273 private:
274 Aws::String m_arn;
275
276 Aws::String m_name;
277
278 Aws::String m_description;
279
281
282 Aws::String m_executionRole;
283
285
287
288 LifecyclePolicyResourceSelection m_resourceSelection;
289
290 Aws::Utils::DateTime m_dateCreated{};
291
292 Aws::Utils::DateTime m_dateUpdated{};
293
294 Aws::Utils::DateTime m_dateLastRun{};
295
297 bool m_arnHasBeenSet = false;
298 bool m_nameHasBeenSet = false;
299 bool m_descriptionHasBeenSet = false;
300 bool m_statusHasBeenSet = false;
301 bool m_executionRoleHasBeenSet = false;
302 bool m_resourceTypeHasBeenSet = false;
303 bool m_policyDetailsHasBeenSet = false;
304 bool m_resourceSelectionHasBeenSet = false;
305 bool m_dateCreatedHasBeenSet = false;
306 bool m_dateUpdatedHasBeenSet = false;
307 bool m_dateLastRunHasBeenSet = false;
308 bool m_tagsHasBeenSet = false;
309};
310
311} // namespace Model
312} // namespace imagebuilder
313} // namespace Aws
AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetExecutionRole(ExecutionRoleT &&value)
LifecyclePolicy & WithStatus(LifecyclePolicyStatus value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
const Aws::Utils::DateTime & GetDateUpdated() const
const Aws::Vector< LifecyclePolicyDetail > & GetPolicyDetails() const
const Aws::String & GetExecutionRole() const
LifecyclePolicy & WithDateLastRun(DateLastRunT &&value)
void SetDescription(DescriptionT &&value)
void SetPolicyDetails(PolicyDetailsT &&value)
void SetDateCreated(DateCreatedT &&value)
LifecyclePolicy & WithDateUpdated(DateUpdatedT &&value)
LifecyclePolicy & WithResourceSelection(ResourceSelectionT &&value)
LifecyclePolicy & AddPolicyDetails(PolicyDetailsT &&value)
LifecyclePolicy & WithArn(ArnT &&value)
AWS_IMAGEBUILDER_API LifecyclePolicy()=default
AWS_IMAGEBUILDER_API LifecyclePolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
const LifecyclePolicyResourceSelection & GetResourceSelection() const
const Aws::String & GetDescription() const
LifecyclePolicy & WithResourceType(LifecyclePolicyResourceType value)
void SetResourceSelection(ResourceSelectionT &&value)
AWS_IMAGEBUILDER_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue)
LifecyclePolicy & WithPolicyDetails(PolicyDetailsT &&value)
void SetDateUpdated(DateUpdatedT &&value)
LifecyclePolicyStatus GetStatus() const
void SetStatus(LifecyclePolicyStatus value)
const Aws::Utils::DateTime & GetDateLastRun() const
LifecyclePolicy & WithDescription(DescriptionT &&value)
LifecyclePolicy & WithTags(TagsT &&value)
LifecyclePolicy & WithExecutionRole(ExecutionRoleT &&value)
LifecyclePolicy & WithDateCreated(DateCreatedT &&value)
void SetResourceType(LifecyclePolicyResourceType value)
LifecyclePolicy & WithName(NameT &&value)
LifecyclePolicyResourceType GetResourceType() const
void SetDateLastRun(DateLastRunT &&value)
const Aws::Utils::DateTime & GetDateCreated() const
LifecyclePolicy & AddTags(TagsKeyT &&key, TagsValueT &&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
Aws::Utils::Json::JsonValue JsonValue