AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
AccessPreviewFinding.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/accessanalyzer/model/FindingStatus.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/accessanalyzer/model/ResourceType.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/accessanalyzer/model/FindingChangeType.h>
15#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
16#include <aws/accessanalyzer/model/FindingSource.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Json
24{
25 class JsonValue;
26 class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace AccessAnalyzer
30{
31namespace Model
32{
33
41 {
42 public:
43 AWS_ACCESSANALYZER_API AccessPreviewFinding() = default;
44 AWS_ACCESSANALYZER_API AccessPreviewFinding(Aws::Utils::Json::JsonView jsonValue);
45 AWS_ACCESSANALYZER_API AccessPreviewFinding& operator=(Aws::Utils::Json::JsonView jsonValue);
46 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
55 inline const Aws::String& GetId() const { return m_id; }
56 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
57 template<typename IdT = Aws::String>
58 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
59 template<typename IdT = Aws::String>
60 AccessPreviewFinding& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
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) { m_existingFindingIdHasBeenSet = true; m_existingFindingId = std::forward<ExistingFindingIdT>(value); }
72 template<typename ExistingFindingIdT = Aws::String>
73 AccessPreviewFinding& WithExistingFindingId(ExistingFindingIdT&& value) { SetExistingFindingId(std::forward<ExistingFindingIdT>(value)); return *this;}
75
77
80 inline FindingStatus GetExistingFindingStatus() const { return m_existingFindingStatus; }
81 inline bool ExistingFindingStatusHasBeenSet() const { return m_existingFindingStatusHasBeenSet; }
82 inline void SetExistingFindingStatus(FindingStatus value) { m_existingFindingStatusHasBeenSet = true; m_existingFindingStatus = value; }
85
87
91 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
92 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
93 template<typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
94 void SetPrincipal(PrincipalT&& value) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
95 template<typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
96 AccessPreviewFinding& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
97 template<typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
98 AccessPreviewFinding& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
99 m_principalHasBeenSet = true; m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value)); return *this;
100 }
102
104
108 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
109 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
110 template<typename ActionT = Aws::Vector<Aws::String>>
111 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
112 template<typename ActionT = Aws::Vector<Aws::String>>
113 AccessPreviewFinding& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
114 template<typename ActionT = Aws::String>
115 AccessPreviewFinding& AddAction(ActionT&& value) { m_actionHasBeenSet = true; m_action.emplace_back(std::forward<ActionT>(value)); return *this; }
117
119
123 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
124 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
125 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
126 void SetCondition(ConditionT&& value) { m_conditionHasBeenSet = true; m_condition = std::forward<ConditionT>(value); }
127 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
128 AccessPreviewFinding& WithCondition(ConditionT&& value) { SetCondition(std::forward<ConditionT>(value)); return *this;}
129 template<typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
130 AccessPreviewFinding& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
131 m_conditionHasBeenSet = true; m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value)); return *this;
132 }
134
136
140 inline const Aws::String& GetResource() const { return m_resource; }
141 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
142 template<typename ResourceT = Aws::String>
143 void SetResource(ResourceT&& value) { m_resourceHasBeenSet = true; m_resource = std::forward<ResourceT>(value); }
144 template<typename ResourceT = Aws::String>
145 AccessPreviewFinding& WithResource(ResourceT&& value) { SetResource(std::forward<ResourceT>(value)); return *this;}
147
149
153 inline bool GetIsPublic() const { return m_isPublic; }
154 inline bool IsPublicHasBeenSet() const { return m_isPublicHasBeenSet; }
155 inline void SetIsPublic(bool value) { m_isPublicHasBeenSet = true; m_isPublic = value; }
156 inline AccessPreviewFinding& WithIsPublic(bool value) { SetIsPublic(value); return *this;}
158
160
163 inline ResourceType GetResourceType() const { return m_resourceType; }
164 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
165 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
168
170
173 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
174 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
175 template<typename CreatedAtT = Aws::Utils::DateTime>
176 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
177 template<typename CreatedAtT = Aws::Utils::DateTime>
178 AccessPreviewFinding& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
180
182
194 inline FindingChangeType GetChangeType() const { return m_changeType; }
195 inline bool ChangeTypeHasBeenSet() const { return m_changeTypeHasBeenSet; }
196 inline void SetChangeType(FindingChangeType value) { m_changeTypeHasBeenSet = true; m_changeType = value; }
199
201
208 inline FindingStatus GetStatus() const { return m_status; }
209 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
210 inline void SetStatus(FindingStatus value) { m_statusHasBeenSet = true; m_status = value; }
211 inline AccessPreviewFinding& WithStatus(FindingStatus value) { SetStatus(value); return *this;}
213
215
220 inline const Aws::String& GetResourceOwnerAccount() const { return m_resourceOwnerAccount; }
221 inline bool ResourceOwnerAccountHasBeenSet() const { return m_resourceOwnerAccountHasBeenSet; }
222 template<typename ResourceOwnerAccountT = Aws::String>
223 void SetResourceOwnerAccount(ResourceOwnerAccountT&& value) { m_resourceOwnerAccountHasBeenSet = true; m_resourceOwnerAccount = std::forward<ResourceOwnerAccountT>(value); }
224 template<typename ResourceOwnerAccountT = Aws::String>
225 AccessPreviewFinding& WithResourceOwnerAccount(ResourceOwnerAccountT&& value) { SetResourceOwnerAccount(std::forward<ResourceOwnerAccountT>(value)); return *this;}
227
229
232 inline const Aws::String& GetError() const { return m_error; }
233 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
234 template<typename ErrorT = Aws::String>
235 void SetError(ErrorT&& value) { m_errorHasBeenSet = true; m_error = std::forward<ErrorT>(value); }
236 template<typename ErrorT = Aws::String>
237 AccessPreviewFinding& WithError(ErrorT&& value) { SetError(std::forward<ErrorT>(value)); return *this;}
239
241
245 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
246 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
247 template<typename SourcesT = Aws::Vector<FindingSource>>
248 void SetSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
249 template<typename SourcesT = Aws::Vector<FindingSource>>
250 AccessPreviewFinding& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
251 template<typename SourcesT = FindingSource>
252 AccessPreviewFinding& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
254
256
260 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
261 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
262 inline void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value) { m_resourceControlPolicyRestrictionHasBeenSet = true; m_resourceControlPolicyRestriction = value; }
265 private:
266
267 Aws::String m_id;
268 bool m_idHasBeenSet = false;
269
270 Aws::String m_existingFindingId;
271 bool m_existingFindingIdHasBeenSet = false;
272
273 FindingStatus m_existingFindingStatus{FindingStatus::NOT_SET};
274 bool m_existingFindingStatusHasBeenSet = false;
275
277 bool m_principalHasBeenSet = false;
278
280 bool m_actionHasBeenSet = false;
281
283 bool m_conditionHasBeenSet = false;
284
285 Aws::String m_resource;
286 bool m_resourceHasBeenSet = false;
287
288 bool m_isPublic{false};
289 bool m_isPublicHasBeenSet = false;
290
291 ResourceType m_resourceType{ResourceType::NOT_SET};
292 bool m_resourceTypeHasBeenSet = false;
293
294 Aws::Utils::DateTime m_createdAt{};
295 bool m_createdAtHasBeenSet = false;
296
298 bool m_changeTypeHasBeenSet = false;
299
301 bool m_statusHasBeenSet = false;
302
303 Aws::String m_resourceOwnerAccount;
304 bool m_resourceOwnerAccountHasBeenSet = false;
305
306 Aws::String m_error;
307 bool m_errorHasBeenSet = false;
308
310 bool m_sourcesHasBeenSet = false;
311
313 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
314 };
315
316} // namespace Model
317} // namespace AccessAnalyzer
318} // 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