AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Finding.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/FindingSource.h>
9#include <aws/accessanalyzer/model/FindingStatus.h>
10#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
11#include <aws/accessanalyzer/model/ResourceType.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace AccessAnalyzer {
27namespace Model {
28
34class Finding {
35 public:
36 AWS_ACCESSANALYZER_API Finding() = default;
37 AWS_ACCESSANALYZER_API Finding(Aws::Utils::Json::JsonView jsonValue);
38 AWS_ACCESSANALYZER_API Finding& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 template <typename IdT = Aws::String>
48 void SetId(IdT&& value) {
49 m_idHasBeenSet = true;
50 m_id = std::forward<IdT>(value);
51 }
52 template <typename IdT = Aws::String>
53 Finding& WithId(IdT&& value) {
54 SetId(std::forward<IdT>(value));
55 return *this;
56 }
58
60
64 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
65 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
66 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
67 void SetPrincipal(PrincipalT&& value) {
68 m_principalHasBeenSet = true;
69 m_principal = std::forward<PrincipalT>(value);
70 }
71 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
72 Finding& WithPrincipal(PrincipalT&& value) {
73 SetPrincipal(std::forward<PrincipalT>(value));
74 return *this;
75 }
76 template <typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
77 Finding& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
78 m_principalHasBeenSet = true;
79 m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value));
80 return *this;
81 }
83
85
89 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
90 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
91 template <typename ActionT = Aws::Vector<Aws::String>>
92 void SetAction(ActionT&& value) {
93 m_actionHasBeenSet = true;
94 m_action = std::forward<ActionT>(value);
95 }
96 template <typename ActionT = Aws::Vector<Aws::String>>
97 Finding& WithAction(ActionT&& value) {
98 SetAction(std::forward<ActionT>(value));
99 return *this;
100 }
101 template <typename ActionT = Aws::String>
102 Finding& AddAction(ActionT&& value) {
103 m_actionHasBeenSet = true;
104 m_action.emplace_back(std::forward<ActionT>(value));
105 return *this;
106 }
108
110
113 inline const Aws::String& GetResource() const { return m_resource; }
114 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
115 template <typename ResourceT = Aws::String>
116 void SetResource(ResourceT&& value) {
117 m_resourceHasBeenSet = true;
118 m_resource = std::forward<ResourceT>(value);
119 }
120 template <typename ResourceT = Aws::String>
121 Finding& WithResource(ResourceT&& value) {
122 SetResource(std::forward<ResourceT>(value));
123 return *this;
124 }
126
128
132 inline bool GetIsPublic() const { return m_isPublic; }
133 inline bool IsPublicHasBeenSet() const { return m_isPublicHasBeenSet; }
134 inline void SetIsPublic(bool value) {
135 m_isPublicHasBeenSet = true;
136 m_isPublic = value;
137 }
138 inline Finding& WithIsPublic(bool value) {
139 SetIsPublic(value);
140 return *this;
141 }
143
145
148 inline ResourceType GetResourceType() const { return m_resourceType; }
149 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
150 inline void SetResourceType(ResourceType value) {
151 m_resourceTypeHasBeenSet = true;
152 m_resourceType = value;
153 }
155 SetResourceType(value);
156 return *this;
157 }
159
161
165 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
166 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
167 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
168 void SetCondition(ConditionT&& value) {
169 m_conditionHasBeenSet = true;
170 m_condition = std::forward<ConditionT>(value);
171 }
172 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
173 Finding& WithCondition(ConditionT&& value) {
174 SetCondition(std::forward<ConditionT>(value));
175 return *this;
176 }
177 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
178 Finding& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
179 m_conditionHasBeenSet = true;
180 m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value));
181 return *this;
182 }
184
186
189 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
190 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
191 template <typename CreatedAtT = Aws::Utils::DateTime>
192 void SetCreatedAt(CreatedAtT&& value) {
193 m_createdAtHasBeenSet = true;
194 m_createdAt = std::forward<CreatedAtT>(value);
195 }
196 template <typename CreatedAtT = Aws::Utils::DateTime>
197 Finding& WithCreatedAt(CreatedAtT&& value) {
198 SetCreatedAt(std::forward<CreatedAtT>(value));
199 return *this;
200 }
202
204
207 inline const Aws::Utils::DateTime& GetAnalyzedAt() const { return m_analyzedAt; }
208 inline bool AnalyzedAtHasBeenSet() const { return m_analyzedAtHasBeenSet; }
209 template <typename AnalyzedAtT = Aws::Utils::DateTime>
210 void SetAnalyzedAt(AnalyzedAtT&& value) {
211 m_analyzedAtHasBeenSet = true;
212 m_analyzedAt = std::forward<AnalyzedAtT>(value);
213 }
214 template <typename AnalyzedAtT = Aws::Utils::DateTime>
215 Finding& WithAnalyzedAt(AnalyzedAtT&& value) {
216 SetAnalyzedAt(std::forward<AnalyzedAtT>(value));
217 return *this;
218 }
220
222
225 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
226 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
227 template <typename UpdatedAtT = Aws::Utils::DateTime>
228 void SetUpdatedAt(UpdatedAtT&& value) {
229 m_updatedAtHasBeenSet = true;
230 m_updatedAt = std::forward<UpdatedAtT>(value);
231 }
232 template <typename UpdatedAtT = Aws::Utils::DateTime>
233 Finding& WithUpdatedAt(UpdatedAtT&& value) {
234 SetUpdatedAt(std::forward<UpdatedAtT>(value));
235 return *this;
236 }
238
240
243 inline FindingStatus GetStatus() const { return m_status; }
244 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
245 inline void SetStatus(FindingStatus value) {
246 m_statusHasBeenSet = true;
247 m_status = value;
248 }
250 SetStatus(value);
251 return *this;
252 }
254
256
259 inline const Aws::String& GetResourceOwnerAccount() const { return m_resourceOwnerAccount; }
260 inline bool ResourceOwnerAccountHasBeenSet() const { return m_resourceOwnerAccountHasBeenSet; }
261 template <typename ResourceOwnerAccountT = Aws::String>
262 void SetResourceOwnerAccount(ResourceOwnerAccountT&& value) {
263 m_resourceOwnerAccountHasBeenSet = true;
264 m_resourceOwnerAccount = std::forward<ResourceOwnerAccountT>(value);
265 }
266 template <typename ResourceOwnerAccountT = Aws::String>
267 Finding& WithResourceOwnerAccount(ResourceOwnerAccountT&& value) {
268 SetResourceOwnerAccount(std::forward<ResourceOwnerAccountT>(value));
269 return *this;
270 }
272
274
277 inline const Aws::String& GetError() const { return m_error; }
278 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
279 template <typename ErrorT = Aws::String>
280 void SetError(ErrorT&& value) {
281 m_errorHasBeenSet = true;
282 m_error = std::forward<ErrorT>(value);
283 }
284 template <typename ErrorT = Aws::String>
285 Finding& WithError(ErrorT&& value) {
286 SetError(std::forward<ErrorT>(value));
287 return *this;
288 }
290
292
296 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
297 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
298 template <typename SourcesT = Aws::Vector<FindingSource>>
299 void SetSources(SourcesT&& value) {
300 m_sourcesHasBeenSet = true;
301 m_sources = std::forward<SourcesT>(value);
302 }
303 template <typename SourcesT = Aws::Vector<FindingSource>>
304 Finding& WithSources(SourcesT&& value) {
305 SetSources(std::forward<SourcesT>(value));
306 return *this;
307 }
308 template <typename SourcesT = FindingSource>
309 Finding& AddSources(SourcesT&& value) {
310 m_sourcesHasBeenSet = true;
311 m_sources.emplace_back(std::forward<SourcesT>(value));
312 return *this;
313 }
315
317
321 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
322 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
324 m_resourceControlPolicyRestrictionHasBeenSet = true;
325 m_resourceControlPolicyRestriction = value;
326 }
329 return *this;
330 }
332 private:
333 Aws::String m_id;
334
336
338
339 Aws::String m_resource;
340
341 bool m_isPublic{false};
342
343 ResourceType m_resourceType{ResourceType::NOT_SET};
344
346
347 Aws::Utils::DateTime m_createdAt{};
348
349 Aws::Utils::DateTime m_analyzedAt{};
350
351 Aws::Utils::DateTime m_updatedAt{};
352
354
355 Aws::String m_resourceOwnerAccount;
356
357 Aws::String m_error;
358
360
362 bool m_idHasBeenSet = false;
363 bool m_principalHasBeenSet = false;
364 bool m_actionHasBeenSet = false;
365 bool m_resourceHasBeenSet = false;
366 bool m_isPublicHasBeenSet = false;
367 bool m_resourceTypeHasBeenSet = false;
368 bool m_conditionHasBeenSet = false;
369 bool m_createdAtHasBeenSet = false;
370 bool m_analyzedAtHasBeenSet = false;
371 bool m_updatedAtHasBeenSet = false;
372 bool m_statusHasBeenSet = false;
373 bool m_resourceOwnerAccountHasBeenSet = false;
374 bool m_errorHasBeenSet = false;
375 bool m_sourcesHasBeenSet = false;
376 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
377};
378
379} // namespace Model
380} // namespace AccessAnalyzer
381} // namespace Aws
void SetCondition(ConditionT &&value)
Definition Finding.h:168
Finding & WithAnalyzedAt(AnalyzedAtT &&value)
Definition Finding.h:215
Finding & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
Definition Finding.h:327
FindingStatus GetStatus() const
Definition Finding.h:243
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Finding.h:189
Finding & WithId(IdT &&value)
Definition Finding.h:53
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
Definition Finding.h:323
Finding & WithResourceOwnerAccount(ResourceOwnerAccountT &&value)
Definition Finding.h:267
AWS_ACCESSANALYZER_API Finding & operator=(Aws::Utils::Json::JsonView jsonValue)
Finding & WithIsPublic(bool value)
Definition Finding.h:138
Finding & WithStatus(FindingStatus value)
Definition Finding.h:249
void SetCreatedAt(CreatedAtT &&value)
Definition Finding.h:192
void SetResourceType(ResourceType value)
Definition Finding.h:150
Finding & AddSources(SourcesT &&value)
Definition Finding.h:309
const Aws::String & GetResourceOwnerAccount() const
Definition Finding.h:259
void SetResourceOwnerAccount(ResourceOwnerAccountT &&value)
Definition Finding.h:262
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(FindingStatus value)
Definition Finding.h:245
const Aws::Utils::DateTime & GetAnalyzedAt() const
Definition Finding.h:207
const Aws::String & GetId() const
Definition Finding.h:45
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
Definition Finding.h:64
Finding & WithPrincipal(PrincipalT &&value)
Definition Finding.h:72
const Aws::Vector< FindingSource > & GetSources() const
Definition Finding.h:296
bool ResourceControlPolicyRestrictionHasBeenSet() const
Definition Finding.h:322
Finding & WithResourceType(ResourceType value)
Definition Finding.h:154
const Aws::Map< Aws::String, Aws::String > & GetCondition() const
Definition Finding.h:165
const Aws::String & GetResource() const
Definition Finding.h:113
void SetUpdatedAt(UpdatedAtT &&value)
Definition Finding.h:228
Finding & WithCondition(ConditionT &&value)
Definition Finding.h:173
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
Definition Finding.h:321
const Aws::String & GetError() const
Definition Finding.h:277
Finding & WithError(ErrorT &&value)
Definition Finding.h:285
void SetAnalyzedAt(AnalyzedAtT &&value)
Definition Finding.h:210
void SetPrincipal(PrincipalT &&value)
Definition Finding.h:67
Finding & WithUpdatedAt(UpdatedAtT &&value)
Definition Finding.h:233
void SetSources(SourcesT &&value)
Definition Finding.h:299
void SetResource(ResourceT &&value)
Definition Finding.h:116
bool ResourceOwnerAccountHasBeenSet() const
Definition Finding.h:260
Finding & WithSources(SourcesT &&value)
Definition Finding.h:304
Finding & WithResource(ResourceT &&value)
Definition Finding.h:121
Finding & WithCreatedAt(CreatedAtT &&value)
Definition Finding.h:197
Finding & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
Definition Finding.h:178
ResourceType GetResourceType() const
Definition Finding.h:148
const Aws::Vector< Aws::String > & GetAction() const
Definition Finding.h:89
void SetAction(ActionT &&value)
Definition Finding.h:92
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Finding.h:225
AWS_ACCESSANALYZER_API Finding(Aws::Utils::Json::JsonView jsonValue)
void SetError(ErrorT &&value)
Definition Finding.h:280
AWS_ACCESSANALYZER_API Finding()=default
Finding & WithAction(ActionT &&value)
Definition Finding.h:97
Finding & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
Definition Finding.h:77
Finding & AddAction(ActionT &&value)
Definition Finding.h:102
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