AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
LifecyclePolicy.h
1
6#pragma once
7#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/imagebuilder/model/LifecyclePolicyStatus.h>
10#include <aws/imagebuilder/model/LifecyclePolicyResourceType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/imagebuilder/model/LifecyclePolicyResourceSelection.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/imagebuilder/model/LifecyclePolicyDetail.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace imagebuilder
29{
30namespace Model
31{
32
40 {
41 public:
42 AWS_IMAGEBUILDER_API LifecyclePolicy() = default;
43 AWS_IMAGEBUILDER_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue);
44 AWS_IMAGEBUILDER_API LifecyclePolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline const Aws::String& GetArn() const { return m_arn; }
53 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
54 template<typename ArnT = Aws::String>
55 void SetArn(ArnT&& value) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
56 template<typename ArnT = Aws::String>
57 LifecyclePolicy& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
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) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
68 template<typename NameT = Aws::String>
69 LifecyclePolicy& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
71
73
76 inline const Aws::String& GetDescription() const { return m_description; }
77 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
78 template<typename DescriptionT = Aws::String>
79 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
80 template<typename DescriptionT = Aws::String>
81 LifecyclePolicy& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
83
85
88 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
89 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
90 inline void SetStatus(LifecyclePolicyStatus value) { m_statusHasBeenSet = true; m_status = value; }
91 inline LifecyclePolicy& WithStatus(LifecyclePolicyStatus value) { SetStatus(value); return *this;}
93
95
99 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
100 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
101 template<typename ExecutionRoleT = Aws::String>
102 void SetExecutionRole(ExecutionRoleT&& value) { m_executionRoleHasBeenSet = true; m_executionRole = std::forward<ExecutionRoleT>(value); }
103 template<typename ExecutionRoleT = Aws::String>
104 LifecyclePolicy& WithExecutionRole(ExecutionRoleT&& value) { SetExecutionRole(std::forward<ExecutionRoleT>(value)); return *this;}
106
108
111 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
112 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
113 inline void SetResourceType(LifecyclePolicyResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
116
118
121 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
122 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
123 template<typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
124 void SetPolicyDetails(PolicyDetailsT&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails = std::forward<PolicyDetailsT>(value); }
125 template<typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
126 LifecyclePolicy& WithPolicyDetails(PolicyDetailsT&& value) { SetPolicyDetails(std::forward<PolicyDetailsT>(value)); return *this;}
127 template<typename PolicyDetailsT = LifecyclePolicyDetail>
128 LifecyclePolicy& AddPolicyDetails(PolicyDetailsT&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value)); return *this; }
130
132
135 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
136 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
137 template<typename ResourceSelectionT = LifecyclePolicyResourceSelection>
138 void SetResourceSelection(ResourceSelectionT&& value) { m_resourceSelectionHasBeenSet = true; m_resourceSelection = std::forward<ResourceSelectionT>(value); }
139 template<typename ResourceSelectionT = LifecyclePolicyResourceSelection>
140 LifecyclePolicy& WithResourceSelection(ResourceSelectionT&& value) { SetResourceSelection(std::forward<ResourceSelectionT>(value)); return *this;}
142
144
147 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
148 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
149 template<typename DateCreatedT = Aws::Utils::DateTime>
150 void SetDateCreated(DateCreatedT&& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = std::forward<DateCreatedT>(value); }
151 template<typename DateCreatedT = Aws::Utils::DateTime>
152 LifecyclePolicy& WithDateCreated(DateCreatedT&& value) { SetDateCreated(std::forward<DateCreatedT>(value)); return *this;}
154
156
159 inline const Aws::Utils::DateTime& GetDateUpdated() const { return m_dateUpdated; }
160 inline bool DateUpdatedHasBeenSet() const { return m_dateUpdatedHasBeenSet; }
161 template<typename DateUpdatedT = Aws::Utils::DateTime>
162 void SetDateUpdated(DateUpdatedT&& value) { m_dateUpdatedHasBeenSet = true; m_dateUpdated = std::forward<DateUpdatedT>(value); }
163 template<typename DateUpdatedT = Aws::Utils::DateTime>
164 LifecyclePolicy& WithDateUpdated(DateUpdatedT&& value) { SetDateUpdated(std::forward<DateUpdatedT>(value)); return *this;}
166
168
171 inline const Aws::Utils::DateTime& GetDateLastRun() const { return m_dateLastRun; }
172 inline bool DateLastRunHasBeenSet() const { return m_dateLastRunHasBeenSet; }
173 template<typename DateLastRunT = Aws::Utils::DateTime>
174 void SetDateLastRun(DateLastRunT&& value) { m_dateLastRunHasBeenSet = true; m_dateLastRun = std::forward<DateLastRunT>(value); }
175 template<typename DateLastRunT = Aws::Utils::DateTime>
176 LifecyclePolicy& WithDateLastRun(DateLastRunT&& value) { SetDateLastRun(std::forward<DateLastRunT>(value)); return *this;}
178
180
185 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
186 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
187 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
188 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
189 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
190 LifecyclePolicy& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
191 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
192 LifecyclePolicy& AddTags(TagsKeyT&& key, TagsValueT&& value) {
193 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
194 }
196 private:
197
198 Aws::String m_arn;
199 bool m_arnHasBeenSet = false;
200
201 Aws::String m_name;
202 bool m_nameHasBeenSet = false;
203
204 Aws::String m_description;
205 bool m_descriptionHasBeenSet = false;
206
208 bool m_statusHasBeenSet = false;
209
210 Aws::String m_executionRole;
211 bool m_executionRoleHasBeenSet = false;
212
214 bool m_resourceTypeHasBeenSet = false;
215
217 bool m_policyDetailsHasBeenSet = false;
218
219 LifecyclePolicyResourceSelection m_resourceSelection;
220 bool m_resourceSelectionHasBeenSet = false;
221
222 Aws::Utils::DateTime m_dateCreated{};
223 bool m_dateCreatedHasBeenSet = false;
224
225 Aws::Utils::DateTime m_dateUpdated{};
226 bool m_dateUpdatedHasBeenSet = false;
227
228 Aws::Utils::DateTime m_dateLastRun{};
229 bool m_dateLastRunHasBeenSet = false;
230
232 bool m_tagsHasBeenSet = false;
233 };
234
235} // namespace Model
236} // namespace imagebuilder
237} // 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