AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
InternalAccessDetails.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/FindingSource.h>
9#include <aws/accessanalyzer/model/InternalAccessType.h>
10#include <aws/accessanalyzer/model/PrincipalType.h>
11#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
12#include <aws/accessanalyzer/model/ServiceControlPolicyRestriction.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
37 public:
38 AWS_ACCESSANALYZER_API InternalAccessDetails() = default;
39 AWS_ACCESSANALYZER_API InternalAccessDetails(Aws::Utils::Json::JsonView jsonValue);
41 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
48 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
49 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
50 template <typename ActionT = Aws::Vector<Aws::String>>
51 void SetAction(ActionT&& value) {
52 m_actionHasBeenSet = true;
53 m_action = std::forward<ActionT>(value);
54 }
55 template <typename ActionT = Aws::Vector<Aws::String>>
57 SetAction(std::forward<ActionT>(value));
58 return *this;
59 }
60 template <typename ActionT = Aws::String>
61 InternalAccessDetails& AddAction(ActionT&& value) {
62 m_actionHasBeenSet = true;
63 m_action.emplace_back(std::forward<ActionT>(value));
64 return *this;
65 }
67
69
73 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
74 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
75 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
76 void SetCondition(ConditionT&& value) {
77 m_conditionHasBeenSet = true;
78 m_condition = std::forward<ConditionT>(value);
79 }
80 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
81 InternalAccessDetails& WithCondition(ConditionT&& value) {
82 SetCondition(std::forward<ConditionT>(value));
83 return *this;
84 }
85 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
86 InternalAccessDetails& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
87 m_conditionHasBeenSet = true;
88 m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value));
89 return *this;
90 }
92
94
98 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
99 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
100 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
101 void SetPrincipal(PrincipalT&& value) {
102 m_principalHasBeenSet = true;
103 m_principal = std::forward<PrincipalT>(value);
104 }
105 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
107 SetPrincipal(std::forward<PrincipalT>(value));
108 return *this;
109 }
110 template <typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
111 InternalAccessDetails& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
112 m_principalHasBeenSet = true;
113 m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value));
114 return *this;
115 }
117
119
123 inline const Aws::String& GetPrincipalOwnerAccount() const { return m_principalOwnerAccount; }
124 inline bool PrincipalOwnerAccountHasBeenSet() const { return m_principalOwnerAccountHasBeenSet; }
125 template <typename PrincipalOwnerAccountT = Aws::String>
126 void SetPrincipalOwnerAccount(PrincipalOwnerAccountT&& value) {
127 m_principalOwnerAccountHasBeenSet = true;
128 m_principalOwnerAccount = std::forward<PrincipalOwnerAccountT>(value);
129 }
130 template <typename PrincipalOwnerAccountT = Aws::String>
131 InternalAccessDetails& WithPrincipalOwnerAccount(PrincipalOwnerAccountT&& value) {
132 SetPrincipalOwnerAccount(std::forward<PrincipalOwnerAccountT>(value));
133 return *this;
134 }
136
138
142 inline InternalAccessType GetAccessType() const { return m_accessType; }
143 inline bool AccessTypeHasBeenSet() const { return m_accessTypeHasBeenSet; }
145 m_accessTypeHasBeenSet = true;
146 m_accessType = value;
147 }
149 SetAccessType(value);
150 return *this;
151 }
153
155
159 inline PrincipalType GetPrincipalType() const { return m_principalType; }
160 inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
161 inline void SetPrincipalType(PrincipalType value) {
162 m_principalTypeHasBeenSet = true;
163 m_principalType = value;
164 }
166 SetPrincipalType(value);
167 return *this;
168 }
170
172
177 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
178 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
179 template <typename SourcesT = Aws::Vector<FindingSource>>
180 void SetSources(SourcesT&& value) {
181 m_sourcesHasBeenSet = true;
182 m_sources = std::forward<SourcesT>(value);
183 }
184 template <typename SourcesT = Aws::Vector<FindingSource>>
186 SetSources(std::forward<SourcesT>(value));
187 return *this;
188 }
189 template <typename SourcesT = FindingSource>
191 m_sourcesHasBeenSet = true;
192 m_sources.emplace_back(std::forward<SourcesT>(value));
193 return *this;
194 }
196
198
219 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
220 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
222 m_resourceControlPolicyRestrictionHasBeenSet = true;
223 m_resourceControlPolicyRestriction = value;
224 }
227 return *this;
228 }
230
232
247 inline ServiceControlPolicyRestriction GetServiceControlPolicyRestriction() const { return m_serviceControlPolicyRestriction; }
248 inline bool ServiceControlPolicyRestrictionHasBeenSet() const { return m_serviceControlPolicyRestrictionHasBeenSet; }
250 m_serviceControlPolicyRestrictionHasBeenSet = true;
251 m_serviceControlPolicyRestriction = value;
252 }
255 return *this;
256 }
258 private:
260
262
264
265 Aws::String m_principalOwnerAccount;
266
268
269 PrincipalType m_principalType{PrincipalType::NOT_SET};
270
272
274
276 bool m_actionHasBeenSet = false;
277 bool m_conditionHasBeenSet = false;
278 bool m_principalHasBeenSet = false;
279 bool m_principalOwnerAccountHasBeenSet = false;
280 bool m_accessTypeHasBeenSet = false;
281 bool m_principalTypeHasBeenSet = false;
282 bool m_sourcesHasBeenSet = false;
283 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
284 bool m_serviceControlPolicyRestrictionHasBeenSet = false;
285};
286
287} // namespace Model
288} // namespace AccessAnalyzer
289} // namespace Aws
AWS_ACCESSANALYZER_API InternalAccessDetails & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetPrincipalOwnerAccount(PrincipalOwnerAccountT &&value)
void SetServiceControlPolicyRestriction(ServiceControlPolicyRestriction value)
AWS_ACCESSANALYZER_API InternalAccessDetails(Aws::Utils::Json::JsonView jsonValue)
InternalAccessDetails & WithPrincipal(PrincipalT &&value)
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
InternalAccessDetails & WithServiceControlPolicyRestriction(ServiceControlPolicyRestriction value)
InternalAccessDetails & WithAccessType(InternalAccessType value)
InternalAccessDetails & WithPrincipalType(PrincipalType value)
InternalAccessDetails & WithSources(SourcesT &&value)
InternalAccessDetails & AddAction(ActionT &&value)
ServiceControlPolicyRestriction GetServiceControlPolicyRestriction() const
InternalAccessDetails & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
InternalAccessDetails & WithCondition(ConditionT &&value)
AWS_ACCESSANALYZER_API InternalAccessDetails()=default
InternalAccessDetails & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
const Aws::Vector< FindingSource > & GetSources() const
InternalAccessDetails & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
InternalAccessDetails & WithPrincipalOwnerAccount(PrincipalOwnerAccountT &&value)
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
const Aws::Vector< Aws::String > & GetAction() const
InternalAccessDetails & WithAction(ActionT &&value)
InternalAccessDetails & AddSources(SourcesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCondition() 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