AWS SDK for C++

AWS SDK for C++ Version 1.11.718

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
37 public:
38 AWS_MPA_API PolicyVersion() = default;
42
44
47 inline const Aws::String& GetArn() const { return m_arn; }
48 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
49 template <typename ArnT = Aws::String>
50 void SetArn(ArnT&& value) {
51 m_arnHasBeenSet = true;
52 m_arn = std::forward<ArnT>(value);
53 }
54 template <typename ArnT = Aws::String>
55 PolicyVersion& WithArn(ArnT&& value) {
56 SetArn(std::forward<ArnT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetPolicyArn() const { return m_policyArn; }
66 inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; }
67 template <typename PolicyArnT = Aws::String>
68 void SetPolicyArn(PolicyArnT&& value) {
69 m_policyArnHasBeenSet = true;
70 m_policyArn = std::forward<PolicyArnT>(value);
71 }
72 template <typename PolicyArnT = Aws::String>
73 PolicyVersion& WithPolicyArn(PolicyArnT&& value) {
74 SetPolicyArn(std::forward<PolicyArnT>(value));
75 return *this;
76 }
78
80
83 inline int GetVersionId() const { return m_versionId; }
84 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
85 inline void SetVersionId(int value) {
86 m_versionIdHasBeenSet = true;
87 m_versionId = value;
88 }
89 inline PolicyVersion& WithVersionId(int value) {
90 SetVersionId(value);
91 return *this;
92 }
94
96
99 inline PolicyType GetPolicyType() const { return m_policyType; }
100 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
101 inline void SetPolicyType(PolicyType value) {
102 m_policyTypeHasBeenSet = true;
103 m_policyType = value;
104 }
106 SetPolicyType(value);
107 return *this;
108 }
110
112
115 inline bool GetIsDefault() const { return m_isDefault; }
116 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
117 inline void SetIsDefault(bool value) {
118 m_isDefaultHasBeenSet = true;
119 m_isDefault = value;
120 }
121 inline PolicyVersion& WithIsDefault(bool value) {
122 SetIsDefault(value);
123 return *this;
124 }
126
128
131 inline const Aws::String& GetName() const { return m_name; }
132 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
133 template <typename NameT = Aws::String>
134 void SetName(NameT&& value) {
135 m_nameHasBeenSet = true;
136 m_name = std::forward<NameT>(value);
137 }
138 template <typename NameT = Aws::String>
139 PolicyVersion& WithName(NameT&& value) {
140 SetName(std::forward<NameT>(value));
141 return *this;
142 }
144
146
152 inline PolicyStatus GetStatus() const { return m_status; }
153 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
154 inline void SetStatus(PolicyStatus value) {
155 m_statusHasBeenSet = true;
156 m_status = value;
157 }
159 SetStatus(value);
160 return *this;
161 }
163
165
168 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
169 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
170 template <typename CreationTimeT = Aws::Utils::DateTime>
171 void SetCreationTime(CreationTimeT&& value) {
172 m_creationTimeHasBeenSet = true;
173 m_creationTime = std::forward<CreationTimeT>(value);
174 }
175 template <typename CreationTimeT = Aws::Utils::DateTime>
176 PolicyVersion& WithCreationTime(CreationTimeT&& value) {
177 SetCreationTime(std::forward<CreationTimeT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
187 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
188 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
189 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
190 m_lastUpdatedTimeHasBeenSet = true;
191 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
192 }
193 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
194 PolicyVersion& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
195 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
196 return *this;
197 }
199
201
204 inline const Aws::String& GetDocument() const { return m_document; }
205 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
206 template <typename DocumentT = Aws::String>
207 void SetDocument(DocumentT&& value) {
208 m_documentHasBeenSet = true;
209 m_document = std::forward<DocumentT>(value);
210 }
211 template <typename DocumentT = Aws::String>
212 PolicyVersion& WithDocument(DocumentT&& value) {
213 SetDocument(std::forward<DocumentT>(value));
214 return *this;
215 }
217 private:
218 Aws::String m_arn;
219
220 Aws::String m_policyArn;
221
222 int m_versionId{0};
223
224 PolicyType m_policyType{PolicyType::NOT_SET};
225
226 bool m_isDefault{false};
227
228 Aws::String m_name;
229
231
232 Aws::Utils::DateTime m_creationTime{};
233
234 Aws::Utils::DateTime m_lastUpdatedTime{};
235
236 Aws::String m_document;
237 bool m_arnHasBeenSet = false;
238 bool m_policyArnHasBeenSet = false;
239 bool m_versionIdHasBeenSet = false;
240 bool m_policyTypeHasBeenSet = false;
241 bool m_isDefaultHasBeenSet = false;
242 bool m_nameHasBeenSet = false;
243 bool m_statusHasBeenSet = false;
244 bool m_creationTimeHasBeenSet = false;
245 bool m_lastUpdatedTimeHasBeenSet = false;
246 bool m_documentHasBeenSet = false;
247};
248
249} // namespace Model
250} // namespace MPA
251} // 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