AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
55 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
56 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
57 inline LifecyclePolicy& WithArn(const Aws::String& value) { SetArn(value); return *this;}
58 inline LifecyclePolicy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
59 inline LifecyclePolicy& WithArn(const char* value) { SetArn(value); return *this;}
61
63
66 inline const Aws::String& GetName() const{ return m_name; }
67 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
68 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
69 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
70 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
71 inline LifecyclePolicy& WithName(const Aws::String& value) { SetName(value); return *this;}
72 inline LifecyclePolicy& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
73 inline LifecyclePolicy& WithName(const char* value) { SetName(value); return *this;}
75
77
80 inline const Aws::String& GetDescription() const{ return m_description; }
81 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
82 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
83 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
84 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
85 inline LifecyclePolicy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
86 inline LifecyclePolicy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
87 inline LifecyclePolicy& WithDescription(const char* value) { SetDescription(value); return *this;}
89
91
94 inline const LifecyclePolicyStatus& GetStatus() const{ return m_status; }
95 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
96 inline void SetStatus(const LifecyclePolicyStatus& value) { m_statusHasBeenSet = true; m_status = value; }
97 inline void SetStatus(LifecyclePolicyStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
98 inline LifecyclePolicy& WithStatus(const LifecyclePolicyStatus& value) { SetStatus(value); return *this;}
99 inline LifecyclePolicy& WithStatus(LifecyclePolicyStatus&& value) { SetStatus(std::move(value)); return *this;}
101
103
107 inline const Aws::String& GetExecutionRole() const{ return m_executionRole; }
108 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
109 inline void SetExecutionRole(const Aws::String& value) { m_executionRoleHasBeenSet = true; m_executionRole = value; }
110 inline void SetExecutionRole(Aws::String&& value) { m_executionRoleHasBeenSet = true; m_executionRole = std::move(value); }
111 inline void SetExecutionRole(const char* value) { m_executionRoleHasBeenSet = true; m_executionRole.assign(value); }
112 inline LifecyclePolicy& WithExecutionRole(const Aws::String& value) { SetExecutionRole(value); return *this;}
113 inline LifecyclePolicy& WithExecutionRole(Aws::String&& value) { SetExecutionRole(std::move(value)); return *this;}
114 inline LifecyclePolicy& WithExecutionRole(const char* value) { SetExecutionRole(value); return *this;}
116
118
121 inline const LifecyclePolicyResourceType& GetResourceType() const{ return m_resourceType; }
122 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
123 inline void SetResourceType(const LifecyclePolicyResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
124 inline void SetResourceType(LifecyclePolicyResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
126 inline LifecyclePolicy& WithResourceType(LifecyclePolicyResourceType&& value) { SetResourceType(std::move(value)); return *this;}
128
130
133 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const{ return m_policyDetails; }
134 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
135 inline void SetPolicyDetails(const Aws::Vector<LifecyclePolicyDetail>& value) { m_policyDetailsHasBeenSet = true; m_policyDetails = value; }
136 inline void SetPolicyDetails(Aws::Vector<LifecyclePolicyDetail>&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails = std::move(value); }
139 inline LifecyclePolicy& AddPolicyDetails(const LifecyclePolicyDetail& value) { m_policyDetailsHasBeenSet = true; m_policyDetails.push_back(value); return *this; }
140 inline LifecyclePolicy& AddPolicyDetails(LifecyclePolicyDetail&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails.push_back(std::move(value)); return *this; }
142
144
147 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const{ return m_resourceSelection; }
148 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
149 inline void SetResourceSelection(const LifecyclePolicyResourceSelection& value) { m_resourceSelectionHasBeenSet = true; m_resourceSelection = value; }
150 inline void SetResourceSelection(LifecyclePolicyResourceSelection&& value) { m_resourceSelectionHasBeenSet = true; m_resourceSelection = std::move(value); }
154
156
159 inline const Aws::Utils::DateTime& GetDateCreated() const{ return m_dateCreated; }
160 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
161 inline void SetDateCreated(const Aws::Utils::DateTime& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = value; }
162 inline void SetDateCreated(Aws::Utils::DateTime&& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = std::move(value); }
163 inline LifecyclePolicy& WithDateCreated(const Aws::Utils::DateTime& value) { SetDateCreated(value); return *this;}
164 inline LifecyclePolicy& WithDateCreated(Aws::Utils::DateTime&& value) { SetDateCreated(std::move(value)); return *this;}
166
168
171 inline const Aws::Utils::DateTime& GetDateUpdated() const{ return m_dateUpdated; }
172 inline bool DateUpdatedHasBeenSet() const { return m_dateUpdatedHasBeenSet; }
173 inline void SetDateUpdated(const Aws::Utils::DateTime& value) { m_dateUpdatedHasBeenSet = true; m_dateUpdated = value; }
174 inline void SetDateUpdated(Aws::Utils::DateTime&& value) { m_dateUpdatedHasBeenSet = true; m_dateUpdated = std::move(value); }
175 inline LifecyclePolicy& WithDateUpdated(const Aws::Utils::DateTime& value) { SetDateUpdated(value); return *this;}
176 inline LifecyclePolicy& WithDateUpdated(Aws::Utils::DateTime&& value) { SetDateUpdated(std::move(value)); return *this;}
178
180
183 inline const Aws::Utils::DateTime& GetDateLastRun() const{ return m_dateLastRun; }
184 inline bool DateLastRunHasBeenSet() const { return m_dateLastRunHasBeenSet; }
185 inline void SetDateLastRun(const Aws::Utils::DateTime& value) { m_dateLastRunHasBeenSet = true; m_dateLastRun = value; }
186 inline void SetDateLastRun(Aws::Utils::DateTime&& value) { m_dateLastRunHasBeenSet = true; m_dateLastRun = std::move(value); }
187 inline LifecyclePolicy& WithDateLastRun(const Aws::Utils::DateTime& value) { SetDateLastRun(value); return *this;}
188 inline LifecyclePolicy& WithDateLastRun(Aws::Utils::DateTime&& value) { SetDateLastRun(std::move(value)); return *this;}
190
192
197 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
198 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
199 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
200 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
201 inline LifecyclePolicy& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
202 inline LifecyclePolicy& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
203 inline LifecyclePolicy& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
204 inline LifecyclePolicy& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
205 inline LifecyclePolicy& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
206 inline LifecyclePolicy& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
207 inline LifecyclePolicy& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
208 inline LifecyclePolicy& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
209 inline LifecyclePolicy& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
211 private:
212
213 Aws::String m_arn;
214 bool m_arnHasBeenSet = false;
215
216 Aws::String m_name;
217 bool m_nameHasBeenSet = false;
218
219 Aws::String m_description;
220 bool m_descriptionHasBeenSet = false;
221
222 LifecyclePolicyStatus m_status;
223 bool m_statusHasBeenSet = false;
224
225 Aws::String m_executionRole;
226 bool m_executionRoleHasBeenSet = false;
227
228 LifecyclePolicyResourceType m_resourceType;
229 bool m_resourceTypeHasBeenSet = false;
230
232 bool m_policyDetailsHasBeenSet = false;
233
234 LifecyclePolicyResourceSelection m_resourceSelection;
235 bool m_resourceSelectionHasBeenSet = false;
236
237 Aws::Utils::DateTime m_dateCreated;
238 bool m_dateCreatedHasBeenSet = false;
239
240 Aws::Utils::DateTime m_dateUpdated;
241 bool m_dateUpdatedHasBeenSet = false;
242
243 Aws::Utils::DateTime m_dateLastRun;
244 bool m_dateLastRunHasBeenSet = false;
245
247 bool m_tagsHasBeenSet = false;
248 };
249
250} // namespace Model
251} // namespace imagebuilder
252} // namespace Aws
LifecyclePolicy & AddTags(Aws::String &&key, const char *value)
void SetExecutionRole(const Aws::String &value)
AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const
const LifecyclePolicyStatus & GetStatus() const
void SetDateCreated(Aws::Utils::DateTime &&value)
LifecyclePolicy & WithResourceSelection(LifecyclePolicyResourceSelection &&value)
LifecyclePolicy & AddTags(Aws::String &&key, const Aws::String &value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
void SetResourceType(LifecyclePolicyResourceType &&value)
void SetDateLastRun(Aws::Utils::DateTime &&value)
const Aws::Utils::DateTime & GetDateUpdated() const
void SetDateCreated(const Aws::Utils::DateTime &value)
const Aws::Vector< LifecyclePolicyDetail > & GetPolicyDetails() const
void SetStatus(const LifecyclePolicyStatus &value)
LifecyclePolicy & WithExecutionRole(const Aws::String &value)
void SetName(const Aws::String &value)
void SetDateUpdated(Aws::Utils::DateTime &&value)
const Aws::String & GetExecutionRole() const
LifecyclePolicy & WithDateUpdated(const Aws::Utils::DateTime &value)
LifecyclePolicy & WithExecutionRole(Aws::String &&value)
void SetDateLastRun(const Aws::Utils::DateTime &value)
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
LifecyclePolicy & WithResourceType(const LifecyclePolicyResourceType &value)
void SetArn(const Aws::String &value)
void SetDateUpdated(const Aws::Utils::DateTime &value)
LifecyclePolicy & AddTags(const Aws::String &key, Aws::String &&value)
void SetPolicyDetails(const Aws::Vector< LifecyclePolicyDetail > &value)
AWS_IMAGEBUILDER_API LifecyclePolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
LifecyclePolicy & AddTags(const char *key, const char *value)
const LifecyclePolicyResourceSelection & GetResourceSelection() const
LifecyclePolicy & WithPolicyDetails(Aws::Vector< LifecyclePolicyDetail > &&value)
LifecyclePolicy & AddPolicyDetails(LifecyclePolicyDetail &&value)
void SetDescription(const Aws::String &value)
LifecyclePolicy & AddTags(const char *key, Aws::String &&value)
const Aws::String & GetDescription() const
LifecyclePolicy & AddTags(Aws::String &&key, Aws::String &&value)
AWS_IMAGEBUILDER_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue)
LifecyclePolicy & WithDateLastRun(const Aws::Utils::DateTime &value)
void SetStatus(LifecyclePolicyStatus &&value)
LifecyclePolicy & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
LifecyclePolicy & WithStatus(const LifecyclePolicyStatus &value)
LifecyclePolicy & WithDescription(Aws::String &&value)
LifecyclePolicy & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
LifecyclePolicy & WithName(Aws::String &&value)
void SetResourceType(const LifecyclePolicyResourceType &value)
LifecyclePolicy & WithDateCreated(Aws::Utils::DateTime &&value)
const Aws::Utils::DateTime & GetDateLastRun() const
LifecyclePolicy & WithName(const Aws::String &value)
LifecyclePolicy & WithResourceSelection(const LifecyclePolicyResourceSelection &value)
LifecyclePolicy & AddPolicyDetails(const LifecyclePolicyDetail &value)
LifecyclePolicy & WithDateCreated(const Aws::Utils::DateTime &value)
LifecyclePolicy & WithDescription(const Aws::String &value)
LifecyclePolicy & WithDateLastRun(Aws::Utils::DateTime &&value)
LifecyclePolicy & WithPolicyDetails(const Aws::Vector< LifecyclePolicyDetail > &value)
LifecyclePolicy & WithArn(const Aws::String &value)
LifecyclePolicy & AddTags(const Aws::String &key, const Aws::String &value)
LifecyclePolicy & WithDateUpdated(Aws::Utils::DateTime &&value)
LifecyclePolicy & WithName(const char *value)
LifecyclePolicy & WithExecutionRole(const char *value)
void SetResourceSelection(const LifecyclePolicyResourceSelection &value)
LifecyclePolicy & WithArn(const char *value)
const LifecyclePolicyResourceType & GetResourceType() const
LifecyclePolicy & WithResourceType(LifecyclePolicyResourceType &&value)
LifecyclePolicy & WithStatus(LifecyclePolicyStatus &&value)
LifecyclePolicy & WithDescription(const char *value)
const Aws::Utils::DateTime & GetDateCreated() const
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
void SetResourceSelection(LifecyclePolicyResourceSelection &&value)
void SetPolicyDetails(Aws::Vector< LifecyclePolicyDetail > &&value)
LifecyclePolicy & WithArn(Aws::String &&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