AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Finding.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/accessanalyzer/model/ResourceType.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/accessanalyzer/model/FindingStatus.h>
14#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
15#include <aws/accessanalyzer/model/FindingSource.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace AccessAnalyzer
29{
30namespace Model
31{
32
38 class Finding
39 {
40 public:
41 AWS_ACCESSANALYZER_API Finding() = default;
42 AWS_ACCESSANALYZER_API Finding(Aws::Utils::Json::JsonView jsonValue);
43 AWS_ACCESSANALYZER_API Finding& operator=(Aws::Utils::Json::JsonView jsonValue);
44 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
51 inline const Aws::String& GetId() const { return m_id; }
52 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
53 template<typename IdT = Aws::String>
54 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
55 template<typename IdT = Aws::String>
56 Finding& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
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) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
68 template<typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
69 Finding& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
70 template<typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
71 Finding& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
72 m_principalHasBeenSet = true; m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value)); return *this;
73 }
75
77
81 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
82 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
83 template<typename ActionT = Aws::Vector<Aws::String>>
84 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
85 template<typename ActionT = Aws::Vector<Aws::String>>
86 Finding& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
87 template<typename ActionT = Aws::String>
88 Finding& AddAction(ActionT&& value) { m_actionHasBeenSet = true; m_action.emplace_back(std::forward<ActionT>(value)); return *this; }
90
92
95 inline const Aws::String& GetResource() const { return m_resource; }
96 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
97 template<typename ResourceT = Aws::String>
98 void SetResource(ResourceT&& value) { m_resourceHasBeenSet = true; m_resource = std::forward<ResourceT>(value); }
99 template<typename ResourceT = Aws::String>
100 Finding& WithResource(ResourceT&& value) { SetResource(std::forward<ResourceT>(value)); return *this;}
102
104
108 inline bool GetIsPublic() const { return m_isPublic; }
109 inline bool IsPublicHasBeenSet() const { return m_isPublicHasBeenSet; }
110 inline void SetIsPublic(bool value) { m_isPublicHasBeenSet = true; m_isPublic = value; }
111 inline Finding& WithIsPublic(bool value) { SetIsPublic(value); return *this;}
113
115
118 inline ResourceType GetResourceType() const { return m_resourceType; }
119 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
120 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
121 inline Finding& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
123
125
129 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
130 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
131 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
132 void SetCondition(ConditionT&& value) { m_conditionHasBeenSet = true; m_condition = std::forward<ConditionT>(value); }
133 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
134 Finding& WithCondition(ConditionT&& value) { SetCondition(std::forward<ConditionT>(value)); return *this;}
135 template<typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
136 Finding& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
137 m_conditionHasBeenSet = true; m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value)); return *this;
138 }
140
142
145 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
146 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
147 template<typename CreatedAtT = Aws::Utils::DateTime>
148 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
149 template<typename CreatedAtT = Aws::Utils::DateTime>
150 Finding& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
152
154
157 inline const Aws::Utils::DateTime& GetAnalyzedAt() const { return m_analyzedAt; }
158 inline bool AnalyzedAtHasBeenSet() const { return m_analyzedAtHasBeenSet; }
159 template<typename AnalyzedAtT = Aws::Utils::DateTime>
160 void SetAnalyzedAt(AnalyzedAtT&& value) { m_analyzedAtHasBeenSet = true; m_analyzedAt = std::forward<AnalyzedAtT>(value); }
161 template<typename AnalyzedAtT = Aws::Utils::DateTime>
162 Finding& WithAnalyzedAt(AnalyzedAtT&& value) { SetAnalyzedAt(std::forward<AnalyzedAtT>(value)); return *this;}
164
166
169 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
170 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
171 template<typename UpdatedAtT = Aws::Utils::DateTime>
172 void SetUpdatedAt(UpdatedAtT&& value) { m_updatedAtHasBeenSet = true; m_updatedAt = std::forward<UpdatedAtT>(value); }
173 template<typename UpdatedAtT = Aws::Utils::DateTime>
174 Finding& WithUpdatedAt(UpdatedAtT&& value) { SetUpdatedAt(std::forward<UpdatedAtT>(value)); return *this;}
176
178
181 inline FindingStatus GetStatus() const { return m_status; }
182 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
183 inline void SetStatus(FindingStatus value) { m_statusHasBeenSet = true; m_status = value; }
184 inline Finding& WithStatus(FindingStatus value) { SetStatus(value); return *this;}
186
188
191 inline const Aws::String& GetResourceOwnerAccount() const { return m_resourceOwnerAccount; }
192 inline bool ResourceOwnerAccountHasBeenSet() const { return m_resourceOwnerAccountHasBeenSet; }
193 template<typename ResourceOwnerAccountT = Aws::String>
194 void SetResourceOwnerAccount(ResourceOwnerAccountT&& value) { m_resourceOwnerAccountHasBeenSet = true; m_resourceOwnerAccount = std::forward<ResourceOwnerAccountT>(value); }
195 template<typename ResourceOwnerAccountT = Aws::String>
196 Finding& WithResourceOwnerAccount(ResourceOwnerAccountT&& value) { SetResourceOwnerAccount(std::forward<ResourceOwnerAccountT>(value)); return *this;}
198
200
203 inline const Aws::String& GetError() const { return m_error; }
204 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
205 template<typename ErrorT = Aws::String>
206 void SetError(ErrorT&& value) { m_errorHasBeenSet = true; m_error = std::forward<ErrorT>(value); }
207 template<typename ErrorT = Aws::String>
208 Finding& WithError(ErrorT&& value) { SetError(std::forward<ErrorT>(value)); return *this;}
210
212
216 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
217 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
218 template<typename SourcesT = Aws::Vector<FindingSource>>
219 void SetSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
220 template<typename SourcesT = Aws::Vector<FindingSource>>
221 Finding& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
222 template<typename SourcesT = FindingSource>
223 Finding& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
225
227
231 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
232 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
233 inline void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value) { m_resourceControlPolicyRestrictionHasBeenSet = true; m_resourceControlPolicyRestriction = value; }
236 private:
237
238 Aws::String m_id;
239 bool m_idHasBeenSet = false;
240
242 bool m_principalHasBeenSet = false;
243
245 bool m_actionHasBeenSet = false;
246
247 Aws::String m_resource;
248 bool m_resourceHasBeenSet = false;
249
250 bool m_isPublic{false};
251 bool m_isPublicHasBeenSet = false;
252
253 ResourceType m_resourceType{ResourceType::NOT_SET};
254 bool m_resourceTypeHasBeenSet = false;
255
257 bool m_conditionHasBeenSet = false;
258
259 Aws::Utils::DateTime m_createdAt{};
260 bool m_createdAtHasBeenSet = false;
261
262 Aws::Utils::DateTime m_analyzedAt{};
263 bool m_analyzedAtHasBeenSet = false;
264
265 Aws::Utils::DateTime m_updatedAt{};
266 bool m_updatedAtHasBeenSet = false;
267
269 bool m_statusHasBeenSet = false;
270
271 Aws::String m_resourceOwnerAccount;
272 bool m_resourceOwnerAccountHasBeenSet = false;
273
274 Aws::String m_error;
275 bool m_errorHasBeenSet = false;
276
278 bool m_sourcesHasBeenSet = false;
279
281 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
282 };
283
284} // namespace Model
285} // namespace AccessAnalyzer
286} // namespace Aws
void SetCondition(ConditionT &&value)
Definition Finding.h:132
Finding & WithAnalyzedAt(AnalyzedAtT &&value)
Definition Finding.h:162
Finding & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
Definition Finding.h:234
FindingStatus GetStatus() const
Definition Finding.h:181
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Finding.h:145
Finding & WithId(IdT &&value)
Definition Finding.h:56
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
Definition Finding.h:233
Finding & WithResourceOwnerAccount(ResourceOwnerAccountT &&value)
Definition Finding.h:196
AWS_ACCESSANALYZER_API Finding & operator=(Aws::Utils::Json::JsonView jsonValue)
Finding & WithIsPublic(bool value)
Definition Finding.h:111
Finding & WithStatus(FindingStatus value)
Definition Finding.h:184
void SetCreatedAt(CreatedAtT &&value)
Definition Finding.h:148
void SetResourceType(ResourceType value)
Definition Finding.h:120
Finding & AddSources(SourcesT &&value)
Definition Finding.h:223
const Aws::String & GetResourceOwnerAccount() const
Definition Finding.h:191
void SetResourceOwnerAccount(ResourceOwnerAccountT &&value)
Definition Finding.h:194
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(FindingStatus value)
Definition Finding.h:183
const Aws::Utils::DateTime & GetAnalyzedAt() const
Definition Finding.h:157
const Aws::String & GetId() const
Definition Finding.h:51
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
Definition Finding.h:64
Finding & WithPrincipal(PrincipalT &&value)
Definition Finding.h:69
const Aws::Vector< FindingSource > & GetSources() const
Definition Finding.h:216
bool ResourceControlPolicyRestrictionHasBeenSet() const
Definition Finding.h:232
Finding & WithResourceType(ResourceType value)
Definition Finding.h:121
const Aws::Map< Aws::String, Aws::String > & GetCondition() const
Definition Finding.h:129
const Aws::String & GetResource() const
Definition Finding.h:95
void SetUpdatedAt(UpdatedAtT &&value)
Definition Finding.h:172
Finding & WithCondition(ConditionT &&value)
Definition Finding.h:134
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
Definition Finding.h:231
const Aws::String & GetError() const
Definition Finding.h:203
Finding & WithError(ErrorT &&value)
Definition Finding.h:208
void SetAnalyzedAt(AnalyzedAtT &&value)
Definition Finding.h:160
void SetPrincipal(PrincipalT &&value)
Definition Finding.h:67
Finding & WithUpdatedAt(UpdatedAtT &&value)
Definition Finding.h:174
void SetSources(SourcesT &&value)
Definition Finding.h:219
void SetResource(ResourceT &&value)
Definition Finding.h:98
bool ResourceOwnerAccountHasBeenSet() const
Definition Finding.h:192
Finding & WithSources(SourcesT &&value)
Definition Finding.h:221
Finding & WithResource(ResourceT &&value)
Definition Finding.h:100
Finding & WithCreatedAt(CreatedAtT &&value)
Definition Finding.h:150
Finding & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
Definition Finding.h:136
ResourceType GetResourceType() const
Definition Finding.h:118
const Aws::Vector< Aws::String > & GetAction() const
Definition Finding.h:81
void SetAction(ActionT &&value)
Definition Finding.h:84
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Finding.h:169
AWS_ACCESSANALYZER_API Finding(Aws::Utils::Json::JsonView jsonValue)
void SetError(ErrorT &&value)
Definition Finding.h:206
AWS_ACCESSANALYZER_API Finding()=default
Finding & WithAction(ActionT &&value)
Definition Finding.h:86
Finding & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
Definition Finding.h:71
Finding & AddAction(ActionT &&value)
Definition Finding.h:88
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