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/dlm/DLM_EXPORTS.h>
11#include <aws/dlm/model/GettablePolicyStateValues.h>
12#include <aws/dlm/model/PolicyDetails.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace DLM {
24namespace Model {
25
32 public:
33 AWS_DLM_API LifecyclePolicy() = default;
37
39
42 inline const Aws::String& GetPolicyId() const { return m_policyId; }
43 inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
44 template <typename PolicyIdT = Aws::String>
45 void SetPolicyId(PolicyIdT&& value) {
46 m_policyIdHasBeenSet = true;
47 m_policyId = std::forward<PolicyIdT>(value);
48 }
49 template <typename PolicyIdT = Aws::String>
50 LifecyclePolicy& WithPolicyId(PolicyIdT&& value) {
51 SetPolicyId(std::forward<PolicyIdT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetDescription() const { return m_description; }
61 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
62 template <typename DescriptionT = Aws::String>
63 void SetDescription(DescriptionT&& value) {
64 m_descriptionHasBeenSet = true;
65 m_description = std::forward<DescriptionT>(value);
66 }
67 template <typename DescriptionT = Aws::String>
68 LifecyclePolicy& WithDescription(DescriptionT&& value) {
69 SetDescription(std::forward<DescriptionT>(value));
70 return *this;
71 }
73
75
78 inline GettablePolicyStateValues GetState() const { return m_state; }
79 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
81 m_stateHasBeenSet = true;
82 m_state = value;
83 }
85 SetState(value);
86 return *this;
87 }
89
91
94 inline const Aws::String& GetStatusMessage() const { return m_statusMessage; }
95 inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
96 template <typename StatusMessageT = Aws::String>
97 void SetStatusMessage(StatusMessageT&& value) {
98 m_statusMessageHasBeenSet = true;
99 m_statusMessage = std::forward<StatusMessageT>(value);
100 }
101 template <typename StatusMessageT = Aws::String>
102 LifecyclePolicy& WithStatusMessage(StatusMessageT&& value) {
103 SetStatusMessage(std::forward<StatusMessageT>(value));
104 return *this;
105 }
107
109
113 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
114 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
115 template <typename ExecutionRoleArnT = Aws::String>
116 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
117 m_executionRoleArnHasBeenSet = true;
118 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
119 }
120 template <typename ExecutionRoleArnT = Aws::String>
121 LifecyclePolicy& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
122 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
132 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
133 template <typename DateCreatedT = Aws::Utils::DateTime>
134 void SetDateCreated(DateCreatedT&& value) {
135 m_dateCreatedHasBeenSet = true;
136 m_dateCreated = std::forward<DateCreatedT>(value);
137 }
138 template <typename DateCreatedT = Aws::Utils::DateTime>
139 LifecyclePolicy& WithDateCreated(DateCreatedT&& value) {
140 SetDateCreated(std::forward<DateCreatedT>(value));
141 return *this;
142 }
144
146
149 inline const Aws::Utils::DateTime& GetDateModified() const { return m_dateModified; }
150 inline bool DateModifiedHasBeenSet() const { return m_dateModifiedHasBeenSet; }
151 template <typename DateModifiedT = Aws::Utils::DateTime>
152 void SetDateModified(DateModifiedT&& value) {
153 m_dateModifiedHasBeenSet = true;
154 m_dateModified = std::forward<DateModifiedT>(value);
155 }
156 template <typename DateModifiedT = Aws::Utils::DateTime>
157 LifecyclePolicy& WithDateModified(DateModifiedT&& value) {
158 SetDateModified(std::forward<DateModifiedT>(value));
159 return *this;
160 }
162
164
167 inline const PolicyDetails& GetPolicyDetails() const { return m_policyDetails; }
168 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
169 template <typename PolicyDetailsT = PolicyDetails>
170 void SetPolicyDetails(PolicyDetailsT&& value) {
171 m_policyDetailsHasBeenSet = true;
172 m_policyDetails = std::forward<PolicyDetailsT>(value);
173 }
174 template <typename PolicyDetailsT = PolicyDetails>
175 LifecyclePolicy& WithPolicyDetails(PolicyDetailsT&& value) {
176 SetPolicyDetails(std::forward<PolicyDetailsT>(value));
177 return *this;
178 }
180
182
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) {
189 m_tagsHasBeenSet = true;
190 m_tags = std::forward<TagsT>(value);
191 }
192 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
193 LifecyclePolicy& WithTags(TagsT&& value) {
194 SetTags(std::forward<TagsT>(value));
195 return *this;
196 }
197 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
198 LifecyclePolicy& AddTags(TagsKeyT&& key, TagsValueT&& value) {
199 m_tagsHasBeenSet = true;
200 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
201 return *this;
202 }
204
206
209 inline const Aws::String& GetPolicyArn() const { return m_policyArn; }
210 inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; }
211 template <typename PolicyArnT = Aws::String>
212 void SetPolicyArn(PolicyArnT&& value) {
213 m_policyArnHasBeenSet = true;
214 m_policyArn = std::forward<PolicyArnT>(value);
215 }
216 template <typename PolicyArnT = Aws::String>
217 LifecyclePolicy& WithPolicyArn(PolicyArnT&& value) {
218 SetPolicyArn(std::forward<PolicyArnT>(value));
219 return *this;
220 }
222
224
230 inline bool GetDefaultPolicy() const { return m_defaultPolicy; }
231 inline bool DefaultPolicyHasBeenSet() const { return m_defaultPolicyHasBeenSet; }
232 inline void SetDefaultPolicy(bool value) {
233 m_defaultPolicyHasBeenSet = true;
234 m_defaultPolicy = value;
235 }
236 inline LifecyclePolicy& WithDefaultPolicy(bool value) {
237 SetDefaultPolicy(value);
238 return *this;
239 }
241 private:
242 Aws::String m_policyId;
243
244 Aws::String m_description;
245
247
248 Aws::String m_statusMessage;
249
250 Aws::String m_executionRoleArn;
251
252 Aws::Utils::DateTime m_dateCreated{};
253
254 Aws::Utils::DateTime m_dateModified{};
255
256 PolicyDetails m_policyDetails;
257
259
260 Aws::String m_policyArn;
261
262 bool m_defaultPolicy{false};
263 bool m_policyIdHasBeenSet = false;
264 bool m_descriptionHasBeenSet = false;
265 bool m_stateHasBeenSet = false;
266 bool m_statusMessageHasBeenSet = false;
267 bool m_executionRoleArnHasBeenSet = false;
268 bool m_dateCreatedHasBeenSet = false;
269 bool m_dateModifiedHasBeenSet = false;
270 bool m_policyDetailsHasBeenSet = false;
271 bool m_tagsHasBeenSet = false;
272 bool m_policyArnHasBeenSet = false;
273 bool m_defaultPolicyHasBeenSet = false;
274};
275
276} // namespace Model
277} // namespace DLM
278} // namespace Aws
void SetPolicyDetails(PolicyDetailsT &&value)
LifecyclePolicy & WithTags(TagsT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
LifecyclePolicy & WithDateCreated(DateCreatedT &&value)
void SetDateModified(DateModifiedT &&value)
const Aws::Utils::DateTime & GetDateModified() const
LifecyclePolicy & WithPolicyId(PolicyIdT &&value)
LifecyclePolicy & WithPolicyArn(PolicyArnT &&value)
const Aws::Utils::DateTime & GetDateCreated() const
AWS_DLM_API LifecyclePolicy(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetPolicyArn() const
AWS_DLM_API LifecyclePolicy()=default
LifecyclePolicy & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const
LifecyclePolicy & WithDescription(DescriptionT &&value)
GettablePolicyStateValues GetState() const
LifecyclePolicy & WithStatusMessage(StatusMessageT &&value)
void SetPolicyId(PolicyIdT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
void SetStatusMessage(StatusMessageT &&value)
void SetDescription(DescriptionT &&value)
LifecyclePolicy & WithState(GettablePolicyStateValues value)
const Aws::String & GetStatusMessage() const
const Aws::String & GetDescription() const
LifecyclePolicy & WithDateModified(DateModifiedT &&value)
void SetPolicyArn(PolicyArnT &&value)
const Aws::String & GetExecutionRoleArn() const
void SetDateCreated(DateCreatedT &&value)
void SetState(GettablePolicyStateValues value)
const Aws::String & GetPolicyId() const
LifecyclePolicy & WithPolicyDetails(PolicyDetailsT &&value)
LifecyclePolicy & WithDefaultPolicy(bool value)
const PolicyDetails & GetPolicyDetails() const
LifecyclePolicy & WithExecutionRoleArn(ExecutionRoleArnT &&value)
AWS_DLM_API LifecyclePolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
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
Aws::Utils::Json::JsonValue JsonValue