AWS SDK for C++

AWS SDK for C++ Version 1.11.719

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
36 public:
37 AWS_IMAGEBUILDER_API LifecyclePolicy() = default;
38 AWS_IMAGEBUILDER_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue);
39 AWS_IMAGEBUILDER_API LifecyclePolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetArn() const { return m_arn; }
47 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
48 template <typename ArnT = Aws::String>
49 void SetArn(ArnT&& value) {
50 m_arnHasBeenSet = true;
51 m_arn = std::forward<ArnT>(value);
52 }
53 template <typename ArnT = Aws::String>
54 LifecyclePolicy& WithArn(ArnT&& value) {
55 SetArn(std::forward<ArnT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetName() const { return m_name; }
65 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
66 template <typename NameT = Aws::String>
67 void SetName(NameT&& value) {
68 m_nameHasBeenSet = true;
69 m_name = std::forward<NameT>(value);
70 }
71 template <typename NameT = Aws::String>
72 LifecyclePolicy& WithName(NameT&& value) {
73 SetName(std::forward<NameT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetDescription() const { return m_description; }
83 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
84 template <typename DescriptionT = Aws::String>
85 void SetDescription(DescriptionT&& value) {
86 m_descriptionHasBeenSet = true;
87 m_description = std::forward<DescriptionT>(value);
88 }
89 template <typename DescriptionT = Aws::String>
90 LifecyclePolicy& WithDescription(DescriptionT&& value) {
91 SetDescription(std::forward<DescriptionT>(value));
92 return *this;
93 }
95
97
100 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
101 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
102 inline void SetStatus(LifecyclePolicyStatus value) {
103 m_statusHasBeenSet = true;
104 m_status = value;
105 }
107 SetStatus(value);
108 return *this;
109 }
111
113
117 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
118 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
119 template <typename ExecutionRoleT = Aws::String>
120 void SetExecutionRole(ExecutionRoleT&& value) {
121 m_executionRoleHasBeenSet = true;
122 m_executionRole = std::forward<ExecutionRoleT>(value);
123 }
124 template <typename ExecutionRoleT = Aws::String>
125 LifecyclePolicy& WithExecutionRole(ExecutionRoleT&& value) {
126 SetExecutionRole(std::forward<ExecutionRoleT>(value));
127 return *this;
128 }
130
132
135 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
136 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
138 m_resourceTypeHasBeenSet = true;
139 m_resourceType = value;
140 }
142 SetResourceType(value);
143 return *this;
144 }
146
148
151 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
152 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
153 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
154 void SetPolicyDetails(PolicyDetailsT&& value) {
155 m_policyDetailsHasBeenSet = true;
156 m_policyDetails = std::forward<PolicyDetailsT>(value);
157 }
158 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
159 LifecyclePolicy& WithPolicyDetails(PolicyDetailsT&& value) {
160 SetPolicyDetails(std::forward<PolicyDetailsT>(value));
161 return *this;
162 }
163 template <typename PolicyDetailsT = LifecyclePolicyDetail>
164 LifecyclePolicy& AddPolicyDetails(PolicyDetailsT&& value) {
165 m_policyDetailsHasBeenSet = true;
166 m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value));
167 return *this;
168 }
170
172
175 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
176 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
177 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
178 void SetResourceSelection(ResourceSelectionT&& value) {
179 m_resourceSelectionHasBeenSet = true;
180 m_resourceSelection = std::forward<ResourceSelectionT>(value);
181 }
182 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
183 LifecyclePolicy& WithResourceSelection(ResourceSelectionT&& value) {
184 SetResourceSelection(std::forward<ResourceSelectionT>(value));
185 return *this;
186 }
188
190
193 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
194 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
195 template <typename DateCreatedT = Aws::Utils::DateTime>
196 void SetDateCreated(DateCreatedT&& value) {
197 m_dateCreatedHasBeenSet = true;
198 m_dateCreated = std::forward<DateCreatedT>(value);
199 }
200 template <typename DateCreatedT = Aws::Utils::DateTime>
201 LifecyclePolicy& WithDateCreated(DateCreatedT&& value) {
202 SetDateCreated(std::forward<DateCreatedT>(value));
203 return *this;
204 }
206
208
211 inline const Aws::Utils::DateTime& GetDateUpdated() const { return m_dateUpdated; }
212 inline bool DateUpdatedHasBeenSet() const { return m_dateUpdatedHasBeenSet; }
213 template <typename DateUpdatedT = Aws::Utils::DateTime>
214 void SetDateUpdated(DateUpdatedT&& value) {
215 m_dateUpdatedHasBeenSet = true;
216 m_dateUpdated = std::forward<DateUpdatedT>(value);
217 }
218 template <typename DateUpdatedT = Aws::Utils::DateTime>
219 LifecyclePolicy& WithDateUpdated(DateUpdatedT&& value) {
220 SetDateUpdated(std::forward<DateUpdatedT>(value));
221 return *this;
222 }
224
226
229 inline const Aws::Utils::DateTime& GetDateLastRun() const { return m_dateLastRun; }
230 inline bool DateLastRunHasBeenSet() const { return m_dateLastRunHasBeenSet; }
231 template <typename DateLastRunT = Aws::Utils::DateTime>
232 void SetDateLastRun(DateLastRunT&& value) {
233 m_dateLastRunHasBeenSet = true;
234 m_dateLastRun = std::forward<DateLastRunT>(value);
235 }
236 template <typename DateLastRunT = Aws::Utils::DateTime>
237 LifecyclePolicy& WithDateLastRun(DateLastRunT&& value) {
238 SetDateLastRun(std::forward<DateLastRunT>(value));
239 return *this;
240 }
242
244
249 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
250 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
251 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
252 void SetTags(TagsT&& value) {
253 m_tagsHasBeenSet = true;
254 m_tags = std::forward<TagsT>(value);
255 }
256 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
257 LifecyclePolicy& WithTags(TagsT&& value) {
258 SetTags(std::forward<TagsT>(value));
259 return *this;
260 }
261 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
262 LifecyclePolicy& AddTags(TagsKeyT&& key, TagsValueT&& value) {
263 m_tagsHasBeenSet = true;
264 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
265 return *this;
266 }
268 private:
269 Aws::String m_arn;
270
271 Aws::String m_name;
272
273 Aws::String m_description;
274
276
277 Aws::String m_executionRole;
278
280
282
283 LifecyclePolicyResourceSelection m_resourceSelection;
284
285 Aws::Utils::DateTime m_dateCreated{};
286
287 Aws::Utils::DateTime m_dateUpdated{};
288
289 Aws::Utils::DateTime m_dateLastRun{};
290
292 bool m_arnHasBeenSet = false;
293 bool m_nameHasBeenSet = false;
294 bool m_descriptionHasBeenSet = false;
295 bool m_statusHasBeenSet = false;
296 bool m_executionRoleHasBeenSet = false;
297 bool m_resourceTypeHasBeenSet = false;
298 bool m_policyDetailsHasBeenSet = false;
299 bool m_resourceSelectionHasBeenSet = false;
300 bool m_dateCreatedHasBeenSet = false;
301 bool m_dateUpdatedHasBeenSet = false;
302 bool m_dateLastRunHasBeenSet = false;
303 bool m_tagsHasBeenSet = false;
304};
305
306} // namespace Model
307} // namespace imagebuilder
308} // 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