AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
PolicyVersion.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/mpa/MPA_EXPORTS.h>
10#include <aws/mpa/model/PolicyStatus.h>
11#include <aws/mpa/model/PolicyType.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace MPA {
23namespace Model {
24
33 public:
34 AWS_MPA_API PolicyVersion() = default;
38
40
43 inline const Aws::String& GetArn() const { return m_arn; }
44 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
45 template <typename ArnT = Aws::String>
46 void SetArn(ArnT&& value) {
47 m_arnHasBeenSet = true;
48 m_arn = std::forward<ArnT>(value);
49 }
50 template <typename ArnT = Aws::String>
51 PolicyVersion& WithArn(ArnT&& value) {
52 SetArn(std::forward<ArnT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetPolicyArn() const { return m_policyArn; }
62 inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; }
63 template <typename PolicyArnT = Aws::String>
64 void SetPolicyArn(PolicyArnT&& value) {
65 m_policyArnHasBeenSet = true;
66 m_policyArn = std::forward<PolicyArnT>(value);
67 }
68 template <typename PolicyArnT = Aws::String>
69 PolicyVersion& WithPolicyArn(PolicyArnT&& value) {
70 SetPolicyArn(std::forward<PolicyArnT>(value));
71 return *this;
72 }
74
76
79 inline int GetVersionId() const { return m_versionId; }
80 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
81 inline void SetVersionId(int value) {
82 m_versionIdHasBeenSet = true;
83 m_versionId = value;
84 }
85 inline PolicyVersion& WithVersionId(int value) {
86 SetVersionId(value);
87 return *this;
88 }
90
92
95 inline PolicyType GetPolicyType() const { return m_policyType; }
96 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
97 inline void SetPolicyType(PolicyType value) {
98 m_policyTypeHasBeenSet = true;
99 m_policyType = value;
100 }
102 SetPolicyType(value);
103 return *this;
104 }
106
108
111 inline bool GetIsDefault() const { return m_isDefault; }
112 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
113 inline void SetIsDefault(bool value) {
114 m_isDefaultHasBeenSet = true;
115 m_isDefault = value;
116 }
117 inline PolicyVersion& WithIsDefault(bool value) {
118 SetIsDefault(value);
119 return *this;
120 }
122
124
127 inline const Aws::String& GetName() const { return m_name; }
128 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
129 template <typename NameT = Aws::String>
130 void SetName(NameT&& value) {
131 m_nameHasBeenSet = true;
132 m_name = std::forward<NameT>(value);
133 }
134 template <typename NameT = Aws::String>
135 PolicyVersion& WithName(NameT&& value) {
136 SetName(std::forward<NameT>(value));
137 return *this;
138 }
140
142
148 inline PolicyStatus GetStatus() const { return m_status; }
149 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
150 inline void SetStatus(PolicyStatus value) {
151 m_statusHasBeenSet = true;
152 m_status = value;
153 }
155 SetStatus(value);
156 return *this;
157 }
159
161
164 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
165 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
166 template <typename CreationTimeT = Aws::Utils::DateTime>
167 void SetCreationTime(CreationTimeT&& value) {
168 m_creationTimeHasBeenSet = true;
169 m_creationTime = std::forward<CreationTimeT>(value);
170 }
171 template <typename CreationTimeT = Aws::Utils::DateTime>
172 PolicyVersion& WithCreationTime(CreationTimeT&& value) {
173 SetCreationTime(std::forward<CreationTimeT>(value));
174 return *this;
175 }
177
179
182 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
183 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
184 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
185 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
186 m_lastUpdatedTimeHasBeenSet = true;
187 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
188 }
189 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
190 PolicyVersion& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
191 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
192 return *this;
193 }
195
197
200 inline const Aws::String& GetDocument() const { return m_document; }
201 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
202 template <typename DocumentT = Aws::String>
203 void SetDocument(DocumentT&& value) {
204 m_documentHasBeenSet = true;
205 m_document = std::forward<DocumentT>(value);
206 }
207 template <typename DocumentT = Aws::String>
208 PolicyVersion& WithDocument(DocumentT&& value) {
209 SetDocument(std::forward<DocumentT>(value));
210 return *this;
211 }
213 private:
214 Aws::String m_arn;
215
216 Aws::String m_policyArn;
217
218 int m_versionId{0};
219
220 PolicyType m_policyType{PolicyType::NOT_SET};
221
222 bool m_isDefault{false};
223
224 Aws::String m_name;
225
227
228 Aws::Utils::DateTime m_creationTime{};
229
230 Aws::Utils::DateTime m_lastUpdatedTime{};
231
232 Aws::String m_document;
233 bool m_arnHasBeenSet = false;
234 bool m_policyArnHasBeenSet = false;
235 bool m_versionIdHasBeenSet = false;
236 bool m_policyTypeHasBeenSet = false;
237 bool m_isDefaultHasBeenSet = false;
238 bool m_nameHasBeenSet = false;
239 bool m_statusHasBeenSet = false;
240 bool m_creationTimeHasBeenSet = false;
241 bool m_lastUpdatedTimeHasBeenSet = false;
242 bool m_documentHasBeenSet = false;
243};
244
245} // namespace Model
246} // namespace MPA
247} // namespace Aws
PolicyStatus GetStatus() const
const Aws::String & GetDocument() const
PolicyVersion & WithVersionId(int value)
AWS_MPA_API Aws::Utils::Json::JsonValue Jsonize() const
PolicyVersion & WithIsDefault(bool value)
AWS_MPA_API PolicyVersion()=default
const Aws::Utils::DateTime & GetCreationTime() const
PolicyVersion & WithStatus(PolicyStatus value)
void SetStatus(PolicyStatus value)
PolicyType GetPolicyType() const
PolicyVersion & WithCreationTime(CreationTimeT &&value)
PolicyVersion & WithArn(ArnT &&value)
void SetDocument(DocumentT &&value)
const Aws::String & GetPolicyArn() const
PolicyVersion & WithLastUpdatedTime(LastUpdatedTimeT &&value)
PolicyVersion & WithPolicyType(PolicyType value)
void SetCreationTime(CreationTimeT &&value)
PolicyVersion & WithDocument(DocumentT &&value)
const Aws::Utils::DateTime & GetLastUpdatedTime() const
AWS_MPA_API PolicyVersion & operator=(Aws::Utils::Json::JsonView jsonValue)
PolicyVersion & WithPolicyArn(PolicyArnT &&value)
const Aws::String & GetName() const
AWS_MPA_API PolicyVersion(Aws::Utils::Json::JsonView jsonValue)
PolicyVersion & WithName(NameT &&value)
void SetPolicyType(PolicyType value)
const Aws::String & GetArn() const
void SetPolicyArn(PolicyArnT &&value)
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue