AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
FindingSummary.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
35 public:
36 AWS_ACCESSANALYZER_API FindingSummary() = default;
37 AWS_ACCESSANALYZER_API FindingSummary(Aws::Utils::Json::JsonView jsonValue);
38 AWS_ACCESSANALYZER_API FindingSummary& 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 FindingSummary& 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 FindingSummary& WithPrincipal(PrincipalT&& value) {
73 SetPrincipal(std::forward<PrincipalT>(value));
74 return *this;
75 }
76 template <typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
77 FindingSummary& 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 FindingSummary& WithAction(ActionT&& value) {
98 SetAction(std::forward<ActionT>(value));
99 return *this;
100 }
101 template <typename ActionT = Aws::String>
102 FindingSummary& 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 FindingSummary& 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 FindingSummary& 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 FindingSummary& WithCondition(ConditionT&& value) {
174 SetCondition(std::forward<ConditionT>(value));
175 return *this;
176 }
177 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
178 FindingSummary& 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 FindingSummary& WithCreatedAt(CreatedAtT&& value) {
198 SetCreatedAt(std::forward<CreatedAtT>(value));
199 return *this;
200 }
202
204
208 inline const Aws::Utils::DateTime& GetAnalyzedAt() const { return m_analyzedAt; }
209 inline bool AnalyzedAtHasBeenSet() const { return m_analyzedAtHasBeenSet; }
210 template <typename AnalyzedAtT = Aws::Utils::DateTime>
211 void SetAnalyzedAt(AnalyzedAtT&& value) {
212 m_analyzedAtHasBeenSet = true;
213 m_analyzedAt = std::forward<AnalyzedAtT>(value);
214 }
215 template <typename AnalyzedAtT = Aws::Utils::DateTime>
216 FindingSummary& WithAnalyzedAt(AnalyzedAtT&& value) {
217 SetAnalyzedAt(std::forward<AnalyzedAtT>(value));
218 return *this;
219 }
221
223
226 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
227 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
228 template <typename UpdatedAtT = Aws::Utils::DateTime>
229 void SetUpdatedAt(UpdatedAtT&& value) {
230 m_updatedAtHasBeenSet = true;
231 m_updatedAt = std::forward<UpdatedAtT>(value);
232 }
233 template <typename UpdatedAtT = Aws::Utils::DateTime>
234 FindingSummary& WithUpdatedAt(UpdatedAtT&& value) {
235 SetUpdatedAt(std::forward<UpdatedAtT>(value));
236 return *this;
237 }
239
241
244 inline FindingStatus GetStatus() const { return m_status; }
245 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
246 inline void SetStatus(FindingStatus value) {
247 m_statusHasBeenSet = true;
248 m_status = value;
249 }
251 SetStatus(value);
252 return *this;
253 }
255
257
260 inline const Aws::String& GetResourceOwnerAccount() const { return m_resourceOwnerAccount; }
261 inline bool ResourceOwnerAccountHasBeenSet() const { return m_resourceOwnerAccountHasBeenSet; }
262 template <typename ResourceOwnerAccountT = Aws::String>
263 void SetResourceOwnerAccount(ResourceOwnerAccountT&& value) {
264 m_resourceOwnerAccountHasBeenSet = true;
265 m_resourceOwnerAccount = std::forward<ResourceOwnerAccountT>(value);
266 }
267 template <typename ResourceOwnerAccountT = Aws::String>
268 FindingSummary& WithResourceOwnerAccount(ResourceOwnerAccountT&& value) {
269 SetResourceOwnerAccount(std::forward<ResourceOwnerAccountT>(value));
270 return *this;
271 }
273
275
278 inline const Aws::String& GetError() const { return m_error; }
279 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
280 template <typename ErrorT = Aws::String>
281 void SetError(ErrorT&& value) {
282 m_errorHasBeenSet = true;
283 m_error = std::forward<ErrorT>(value);
284 }
285 template <typename ErrorT = Aws::String>
286 FindingSummary& WithError(ErrorT&& value) {
287 SetError(std::forward<ErrorT>(value));
288 return *this;
289 }
291
293
297 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
298 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
299 template <typename SourcesT = Aws::Vector<FindingSource>>
300 void SetSources(SourcesT&& value) {
301 m_sourcesHasBeenSet = true;
302 m_sources = std::forward<SourcesT>(value);
303 }
304 template <typename SourcesT = Aws::Vector<FindingSource>>
305 FindingSummary& WithSources(SourcesT&& value) {
306 SetSources(std::forward<SourcesT>(value));
307 return *this;
308 }
309 template <typename SourcesT = FindingSource>
310 FindingSummary& AddSources(SourcesT&& value) {
311 m_sourcesHasBeenSet = true;
312 m_sources.emplace_back(std::forward<SourcesT>(value));
313 return *this;
314 }
316
318
322 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
323 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
325 m_resourceControlPolicyRestrictionHasBeenSet = true;
326 m_resourceControlPolicyRestriction = value;
327 }
330 return *this;
331 }
333 private:
334 Aws::String m_id;
335
337
339
340 Aws::String m_resource;
341
342 bool m_isPublic{false};
343
344 ResourceType m_resourceType{ResourceType::NOT_SET};
345
347
348 Aws::Utils::DateTime m_createdAt{};
349
350 Aws::Utils::DateTime m_analyzedAt{};
351
352 Aws::Utils::DateTime m_updatedAt{};
353
355
356 Aws::String m_resourceOwnerAccount;
357
358 Aws::String m_error;
359
361
363 bool m_idHasBeenSet = false;
364 bool m_principalHasBeenSet = false;
365 bool m_actionHasBeenSet = false;
366 bool m_resourceHasBeenSet = false;
367 bool m_isPublicHasBeenSet = false;
368 bool m_resourceTypeHasBeenSet = false;
369 bool m_conditionHasBeenSet = false;
370 bool m_createdAtHasBeenSet = false;
371 bool m_analyzedAtHasBeenSet = false;
372 bool m_updatedAtHasBeenSet = false;
373 bool m_statusHasBeenSet = false;
374 bool m_resourceOwnerAccountHasBeenSet = false;
375 bool m_errorHasBeenSet = false;
376 bool m_sourcesHasBeenSet = false;
377 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
378};
379
380} // namespace Model
381} // namespace AccessAnalyzer
382} // namespace Aws
FindingSummary & AddAction(ActionT &&value)
FindingSummary & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
AWS_ACCESSANALYZER_API FindingSummary & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetCreatedAt() const
FindingSummary & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
const Aws::Utils::DateTime & GetAnalyzedAt() const
FindingSummary & WithResource(ResourceT &&value)
FindingSummary & WithUpdatedAt(UpdatedAtT &&value)
FindingSummary & WithResourceOwnerAccount(ResourceOwnerAccountT &&value)
FindingSummary & WithResourceType(ResourceType value)
FindingSummary & WithIsPublic(bool value)
const Aws::Utils::DateTime & GetUpdatedAt() const
const Aws::String & GetResource() const
AWS_ACCESSANALYZER_API FindingSummary()=default
FindingSummary & WithPrincipal(PrincipalT &&value)
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
FindingSummary & WithCreatedAt(CreatedAtT &&value)
FindingSummary & WithStatus(FindingStatus value)
FindingSummary & WithAction(ActionT &&value)
FindingSummary & WithError(ErrorT &&value)
FindingSummary & WithCondition(ConditionT &&value)
const Aws::String & GetResourceOwnerAccount() const
AWS_ACCESSANALYZER_API FindingSummary(Aws::Utils::Json::JsonView jsonValue)
FindingSummary & WithAnalyzedAt(AnalyzedAtT &&value)
const Aws::Vector< FindingSource > & GetSources() const
FindingSummary & AddSources(SourcesT &&value)
void SetResourceOwnerAccount(ResourceOwnerAccountT &&value)
FindingSummary & WithId(IdT &&value)
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
FindingSummary & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
FindingSummary & WithSources(SourcesT &&value)
const Aws::Vector< Aws::String > & GetAction() const
const Aws::Map< Aws::String, Aws::String > & GetCondition() const
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
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