AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
AccessPreviewFinding.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/FindingChangeType.h>
9#include <aws/accessanalyzer/model/FindingSource.h>
10#include <aws/accessanalyzer/model/FindingStatus.h>
11#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
12#include <aws/accessanalyzer/model/ResourceType.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace AccessAnalyzer {
28namespace Model {
29
37 public:
38 AWS_ACCESSANALYZER_API AccessPreviewFinding() = default;
39 AWS_ACCESSANALYZER_API AccessPreviewFinding(Aws::Utils::Json::JsonView jsonValue);
40 AWS_ACCESSANALYZER_API AccessPreviewFinding& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
49 inline const Aws::String& GetId() const { return m_id; }
50 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
51 template <typename IdT = Aws::String>
52 void SetId(IdT&& value) {
53 m_idHasBeenSet = true;
54 m_id = std::forward<IdT>(value);
55 }
56 template <typename IdT = Aws::String>
58 SetId(std::forward<IdT>(value));
59 return *this;
60 }
62
64
68 inline const Aws::String& GetExistingFindingId() const { return m_existingFindingId; }
69 inline bool ExistingFindingIdHasBeenSet() const { return m_existingFindingIdHasBeenSet; }
70 template <typename ExistingFindingIdT = Aws::String>
71 void SetExistingFindingId(ExistingFindingIdT&& value) {
72 m_existingFindingIdHasBeenSet = true;
73 m_existingFindingId = std::forward<ExistingFindingIdT>(value);
74 }
75 template <typename ExistingFindingIdT = Aws::String>
76 AccessPreviewFinding& WithExistingFindingId(ExistingFindingIdT&& value) {
77 SetExistingFindingId(std::forward<ExistingFindingIdT>(value));
78 return *this;
79 }
81
83
86 inline FindingStatus GetExistingFindingStatus() const { return m_existingFindingStatus; }
87 inline bool ExistingFindingStatusHasBeenSet() const { return m_existingFindingStatusHasBeenSet; }
89 m_existingFindingStatusHasBeenSet = true;
90 m_existingFindingStatus = value;
91 }
94 return *this;
95 }
97
99
103 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
104 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
105 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
106 void SetPrincipal(PrincipalT&& value) {
107 m_principalHasBeenSet = true;
108 m_principal = std::forward<PrincipalT>(value);
109 }
110 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
111 AccessPreviewFinding& WithPrincipal(PrincipalT&& value) {
112 SetPrincipal(std::forward<PrincipalT>(value));
113 return *this;
114 }
115 template <typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
116 AccessPreviewFinding& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
117 m_principalHasBeenSet = true;
118 m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value));
119 return *this;
120 }
122
124
128 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
129 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
130 template <typename ActionT = Aws::Vector<Aws::String>>
131 void SetAction(ActionT&& value) {
132 m_actionHasBeenSet = true;
133 m_action = std::forward<ActionT>(value);
134 }
135 template <typename ActionT = Aws::Vector<Aws::String>>
137 SetAction(std::forward<ActionT>(value));
138 return *this;
139 }
140 template <typename ActionT = Aws::String>
141 AccessPreviewFinding& AddAction(ActionT&& value) {
142 m_actionHasBeenSet = true;
143 m_action.emplace_back(std::forward<ActionT>(value));
144 return *this;
145 }
147
149
153 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
154 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
155 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
156 void SetCondition(ConditionT&& value) {
157 m_conditionHasBeenSet = true;
158 m_condition = std::forward<ConditionT>(value);
159 }
160 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
161 AccessPreviewFinding& WithCondition(ConditionT&& value) {
162 SetCondition(std::forward<ConditionT>(value));
163 return *this;
164 }
165 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
166 AccessPreviewFinding& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
167 m_conditionHasBeenSet = true;
168 m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value));
169 return *this;
170 }
172
174
178 inline const Aws::String& GetResource() const { return m_resource; }
179 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
180 template <typename ResourceT = Aws::String>
181 void SetResource(ResourceT&& value) {
182 m_resourceHasBeenSet = true;
183 m_resource = std::forward<ResourceT>(value);
184 }
185 template <typename ResourceT = Aws::String>
186 AccessPreviewFinding& WithResource(ResourceT&& value) {
187 SetResource(std::forward<ResourceT>(value));
188 return *this;
189 }
191
193
197 inline bool GetIsPublic() const { return m_isPublic; }
198 inline bool IsPublicHasBeenSet() const { return m_isPublicHasBeenSet; }
199 inline void SetIsPublic(bool value) {
200 m_isPublicHasBeenSet = true;
201 m_isPublic = value;
202 }
203 inline AccessPreviewFinding& WithIsPublic(bool value) {
204 SetIsPublic(value);
205 return *this;
206 }
208
210
213 inline ResourceType GetResourceType() const { return m_resourceType; }
214 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
215 inline void SetResourceType(ResourceType value) {
216 m_resourceTypeHasBeenSet = true;
217 m_resourceType = value;
218 }
220 SetResourceType(value);
221 return *this;
222 }
224
226
229 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
230 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
231 template <typename CreatedAtT = Aws::Utils::DateTime>
232 void SetCreatedAt(CreatedAtT&& value) {
233 m_createdAtHasBeenSet = true;
234 m_createdAt = std::forward<CreatedAtT>(value);
235 }
236 template <typename CreatedAtT = Aws::Utils::DateTime>
237 AccessPreviewFinding& WithCreatedAt(CreatedAtT&& value) {
238 SetCreatedAt(std::forward<CreatedAtT>(value));
239 return *this;
240 }
242
244
256 inline FindingChangeType GetChangeType() const { return m_changeType; }
257 inline bool ChangeTypeHasBeenSet() const { return m_changeTypeHasBeenSet; }
258 inline void SetChangeType(FindingChangeType value) {
259 m_changeTypeHasBeenSet = true;
260 m_changeType = value;
261 }
263 SetChangeType(value);
264 return *this;
265 }
267
269
276 inline FindingStatus GetStatus() const { return m_status; }
277 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
278 inline void SetStatus(FindingStatus value) {
279 m_statusHasBeenSet = true;
280 m_status = value;
281 }
283 SetStatus(value);
284 return *this;
285 }
287
289
294 inline const Aws::String& GetResourceOwnerAccount() const { return m_resourceOwnerAccount; }
295 inline bool ResourceOwnerAccountHasBeenSet() const { return m_resourceOwnerAccountHasBeenSet; }
296 template <typename ResourceOwnerAccountT = Aws::String>
297 void SetResourceOwnerAccount(ResourceOwnerAccountT&& value) {
298 m_resourceOwnerAccountHasBeenSet = true;
299 m_resourceOwnerAccount = std::forward<ResourceOwnerAccountT>(value);
300 }
301 template <typename ResourceOwnerAccountT = Aws::String>
302 AccessPreviewFinding& WithResourceOwnerAccount(ResourceOwnerAccountT&& value) {
303 SetResourceOwnerAccount(std::forward<ResourceOwnerAccountT>(value));
304 return *this;
305 }
307
309
312 inline const Aws::String& GetError() const { return m_error; }
313 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
314 template <typename ErrorT = Aws::String>
315 void SetError(ErrorT&& value) {
316 m_errorHasBeenSet = true;
317 m_error = std::forward<ErrorT>(value);
318 }
319 template <typename ErrorT = Aws::String>
321 SetError(std::forward<ErrorT>(value));
322 return *this;
323 }
325
327
331 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
332 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
333 template <typename SourcesT = Aws::Vector<FindingSource>>
334 void SetSources(SourcesT&& value) {
335 m_sourcesHasBeenSet = true;
336 m_sources = std::forward<SourcesT>(value);
337 }
338 template <typename SourcesT = Aws::Vector<FindingSource>>
340 SetSources(std::forward<SourcesT>(value));
341 return *this;
342 }
343 template <typename SourcesT = FindingSource>
344 AccessPreviewFinding& AddSources(SourcesT&& value) {
345 m_sourcesHasBeenSet = true;
346 m_sources.emplace_back(std::forward<SourcesT>(value));
347 return *this;
348 }
350
352
356 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
357 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
359 m_resourceControlPolicyRestrictionHasBeenSet = true;
360 m_resourceControlPolicyRestriction = value;
361 }
364 return *this;
365 }
367 private:
368 Aws::String m_id;
369
370 Aws::String m_existingFindingId;
371
372 FindingStatus m_existingFindingStatus{FindingStatus::NOT_SET};
373
375
377
379
380 Aws::String m_resource;
381
382 bool m_isPublic{false};
383
384 ResourceType m_resourceType{ResourceType::NOT_SET};
385
386 Aws::Utils::DateTime m_createdAt{};
387
389
391
392 Aws::String m_resourceOwnerAccount;
393
394 Aws::String m_error;
395
397
399 bool m_idHasBeenSet = false;
400 bool m_existingFindingIdHasBeenSet = false;
401 bool m_existingFindingStatusHasBeenSet = false;
402 bool m_principalHasBeenSet = false;
403 bool m_actionHasBeenSet = false;
404 bool m_conditionHasBeenSet = false;
405 bool m_resourceHasBeenSet = false;
406 bool m_isPublicHasBeenSet = false;
407 bool m_resourceTypeHasBeenSet = false;
408 bool m_createdAtHasBeenSet = false;
409 bool m_changeTypeHasBeenSet = false;
410 bool m_statusHasBeenSet = false;
411 bool m_resourceOwnerAccountHasBeenSet = false;
412 bool m_errorHasBeenSet = false;
413 bool m_sourcesHasBeenSet = false;
414 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
415};
416
417} // namespace Model
418} // namespace AccessAnalyzer
419} // namespace Aws
AccessPreviewFinding & WithExistingFindingId(ExistingFindingIdT &&value)
AccessPreviewFinding & WithResourceOwnerAccount(ResourceOwnerAccountT &&value)
AccessPreviewFinding & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
AccessPreviewFinding & WithPrincipal(PrincipalT &&value)
const Aws::Utils::DateTime & GetCreatedAt() const
void SetResourceOwnerAccount(ResourceOwnerAccountT &&value)
AWS_ACCESSANALYZER_API AccessPreviewFinding()=default
AccessPreviewFinding & WithChangeType(FindingChangeType value)
AccessPreviewFinding & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
const Aws::Vector< FindingSource > & GetSources() const
const Aws::Map< Aws::String, Aws::String > & GetCondition() const
AWS_ACCESSANALYZER_API AccessPreviewFinding(Aws::Utils::Json::JsonView jsonValue)
AccessPreviewFinding & WithError(ErrorT &&value)
AccessPreviewFinding & WithResourceType(ResourceType value)
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
const Aws::Vector< Aws::String > & GetAction() const
AccessPreviewFinding & WithResource(ResourceT &&value)
AccessPreviewFinding & WithSources(SourcesT &&value)
void SetExistingFindingId(ExistingFindingIdT &&value)
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
AccessPreviewFinding & WithExistingFindingStatus(FindingStatus value)
AccessPreviewFinding & WithStatus(FindingStatus value)
AccessPreviewFinding & WithCondition(ConditionT &&value)
AccessPreviewFinding & WithAction(ActionT &&value)
AccessPreviewFinding & AddSources(SourcesT &&value)
AWS_ACCESSANALYZER_API AccessPreviewFinding & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
AccessPreviewFinding & AddAction(ActionT &&value)
AccessPreviewFinding & WithCreatedAt(CreatedAtT &&value)
AccessPreviewFinding & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
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