AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
LifecyclePolicy.h
1
6#pragma once
7#include <aws/dlm/DLM_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/dlm/model/GettablePolicyStateValues.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/dlm/model/PolicyDetails.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace DLM
26{
27namespace Model
28{
29
36 {
37 public:
38 AWS_DLM_API LifecyclePolicy() = default;
42
43
45
48 inline const Aws::String& GetPolicyId() const { return m_policyId; }
49 inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
50 template<typename PolicyIdT = Aws::String>
51 void SetPolicyId(PolicyIdT&& value) { m_policyIdHasBeenSet = true; m_policyId = std::forward<PolicyIdT>(value); }
52 template<typename PolicyIdT = Aws::String>
53 LifecyclePolicy& WithPolicyId(PolicyIdT&& value) { SetPolicyId(std::forward<PolicyIdT>(value)); return *this;}
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) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
64 template<typename DescriptionT = Aws::String>
65 LifecyclePolicy& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
67
69
72 inline GettablePolicyStateValues GetState() const { return m_state; }
73 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
74 inline void SetState(GettablePolicyStateValues value) { m_stateHasBeenSet = true; m_state = value; }
75 inline LifecyclePolicy& WithState(GettablePolicyStateValues value) { SetState(value); return *this;}
77
79
82 inline const Aws::String& GetStatusMessage() const { return m_statusMessage; }
83 inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
84 template<typename StatusMessageT = Aws::String>
85 void SetStatusMessage(StatusMessageT&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::forward<StatusMessageT>(value); }
86 template<typename StatusMessageT = Aws::String>
87 LifecyclePolicy& WithStatusMessage(StatusMessageT&& value) { SetStatusMessage(std::forward<StatusMessageT>(value)); return *this;}
89
91
95 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
96 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
97 template<typename ExecutionRoleArnT = Aws::String>
98 void SetExecutionRoleArn(ExecutionRoleArnT&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::forward<ExecutionRoleArnT>(value); }
99 template<typename ExecutionRoleArnT = Aws::String>
100 LifecyclePolicy& WithExecutionRoleArn(ExecutionRoleArnT&& value) { SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value)); return *this;}
102
104
107 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
108 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
109 template<typename DateCreatedT = Aws::Utils::DateTime>
110 void SetDateCreated(DateCreatedT&& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = std::forward<DateCreatedT>(value); }
111 template<typename DateCreatedT = Aws::Utils::DateTime>
112 LifecyclePolicy& WithDateCreated(DateCreatedT&& value) { SetDateCreated(std::forward<DateCreatedT>(value)); return *this;}
114
116
119 inline const Aws::Utils::DateTime& GetDateModified() const { return m_dateModified; }
120 inline bool DateModifiedHasBeenSet() const { return m_dateModifiedHasBeenSet; }
121 template<typename DateModifiedT = Aws::Utils::DateTime>
122 void SetDateModified(DateModifiedT&& value) { m_dateModifiedHasBeenSet = true; m_dateModified = std::forward<DateModifiedT>(value); }
123 template<typename DateModifiedT = Aws::Utils::DateTime>
124 LifecyclePolicy& WithDateModified(DateModifiedT&& value) { SetDateModified(std::forward<DateModifiedT>(value)); return *this;}
126
128
131 inline const PolicyDetails& GetPolicyDetails() const { return m_policyDetails; }
132 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
133 template<typename PolicyDetailsT = PolicyDetails>
134 void SetPolicyDetails(PolicyDetailsT&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails = std::forward<PolicyDetailsT>(value); }
135 template<typename PolicyDetailsT = PolicyDetails>
136 LifecyclePolicy& WithPolicyDetails(PolicyDetailsT&& value) { SetPolicyDetails(std::forward<PolicyDetailsT>(value)); return *this;}
138
140
143 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
144 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
145 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
146 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
147 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
148 LifecyclePolicy& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
149 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
150 LifecyclePolicy& AddTags(TagsKeyT&& key, TagsValueT&& value) {
151 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
152 }
154
156
159 inline const Aws::String& GetPolicyArn() const { return m_policyArn; }
160 inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; }
161 template<typename PolicyArnT = Aws::String>
162 void SetPolicyArn(PolicyArnT&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::forward<PolicyArnT>(value); }
163 template<typename PolicyArnT = Aws::String>
164 LifecyclePolicy& WithPolicyArn(PolicyArnT&& value) { SetPolicyArn(std::forward<PolicyArnT>(value)); return *this;}
166
168
174 inline bool GetDefaultPolicy() const { return m_defaultPolicy; }
175 inline bool DefaultPolicyHasBeenSet() const { return m_defaultPolicyHasBeenSet; }
176 inline void SetDefaultPolicy(bool value) { m_defaultPolicyHasBeenSet = true; m_defaultPolicy = value; }
177 inline LifecyclePolicy& WithDefaultPolicy(bool value) { SetDefaultPolicy(value); return *this;}
179 private:
180
181 Aws::String m_policyId;
182 bool m_policyIdHasBeenSet = false;
183
184 Aws::String m_description;
185 bool m_descriptionHasBeenSet = false;
186
188 bool m_stateHasBeenSet = false;
189
190 Aws::String m_statusMessage;
191 bool m_statusMessageHasBeenSet = false;
192
193 Aws::String m_executionRoleArn;
194 bool m_executionRoleArnHasBeenSet = false;
195
196 Aws::Utils::DateTime m_dateCreated{};
197 bool m_dateCreatedHasBeenSet = false;
198
199 Aws::Utils::DateTime m_dateModified{};
200 bool m_dateModifiedHasBeenSet = false;
201
202 PolicyDetails m_policyDetails;
203 bool m_policyDetailsHasBeenSet = false;
204
206 bool m_tagsHasBeenSet = false;
207
208 Aws::String m_policyArn;
209 bool m_policyArnHasBeenSet = false;
210
211 bool m_defaultPolicy{false};
212 bool m_defaultPolicyHasBeenSet = false;
213 };
214
215} // namespace Model
216} // namespace DLM
217} // 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