AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
InternalAccessDetails.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/accessanalyzer/model/InternalAccessType.h>
12#include <aws/accessanalyzer/model/PrincipalType.h>
13#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
14#include <aws/accessanalyzer/model/ServiceControlPolicyRestriction.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
41 {
42 public:
43 AWS_ACCESSANALYZER_API InternalAccessDetails() = default;
44 AWS_ACCESSANALYZER_API InternalAccessDetails(Aws::Utils::Json::JsonView jsonValue);
46 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
54 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
55 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
56 template<typename ActionT = Aws::Vector<Aws::String>>
57 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
58 template<typename ActionT = Aws::Vector<Aws::String>>
59 InternalAccessDetails& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
60 template<typename ActionT = Aws::String>
61 InternalAccessDetails& AddAction(ActionT&& value) { m_actionHasBeenSet = true; m_action.emplace_back(std::forward<ActionT>(value)); return *this; }
63
65
69 inline const Aws::Map<Aws::String, Aws::String>& GetCondition() const { return m_condition; }
70 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
71 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
72 void SetCondition(ConditionT&& value) { m_conditionHasBeenSet = true; m_condition = std::forward<ConditionT>(value); }
73 template<typename ConditionT = Aws::Map<Aws::String, Aws::String>>
74 InternalAccessDetails& WithCondition(ConditionT&& value) { SetCondition(std::forward<ConditionT>(value)); return *this;}
75 template<typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
76 InternalAccessDetails& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
77 m_conditionHasBeenSet = true; m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value)); return *this;
78 }
80
82
86 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
87 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
88 template<typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
89 void SetPrincipal(PrincipalT&& value) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
90 template<typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
91 InternalAccessDetails& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
92 template<typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
93 InternalAccessDetails& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
94 m_principalHasBeenSet = true; m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value)); return *this;
95 }
97
99
103 inline const Aws::String& GetPrincipalOwnerAccount() const { return m_principalOwnerAccount; }
104 inline bool PrincipalOwnerAccountHasBeenSet() const { return m_principalOwnerAccountHasBeenSet; }
105 template<typename PrincipalOwnerAccountT = Aws::String>
106 void SetPrincipalOwnerAccount(PrincipalOwnerAccountT&& value) { m_principalOwnerAccountHasBeenSet = true; m_principalOwnerAccount = std::forward<PrincipalOwnerAccountT>(value); }
107 template<typename PrincipalOwnerAccountT = Aws::String>
108 InternalAccessDetails& WithPrincipalOwnerAccount(PrincipalOwnerAccountT&& value) { SetPrincipalOwnerAccount(std::forward<PrincipalOwnerAccountT>(value)); return *this;}
110
112
116 inline InternalAccessType GetAccessType() const { return m_accessType; }
117 inline bool AccessTypeHasBeenSet() const { return m_accessTypeHasBeenSet; }
118 inline void SetAccessType(InternalAccessType value) { m_accessTypeHasBeenSet = true; m_accessType = value; }
121
123
127 inline PrincipalType GetPrincipalType() const { return m_principalType; }
128 inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
129 inline void SetPrincipalType(PrincipalType value) { m_principalTypeHasBeenSet = true; m_principalType = value; }
132
134
139 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
140 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
141 template<typename SourcesT = Aws::Vector<FindingSource>>
142 void SetSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
143 template<typename SourcesT = Aws::Vector<FindingSource>>
144 InternalAccessDetails& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
145 template<typename SourcesT = FindingSource>
146 InternalAccessDetails& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
148
150
171 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
172 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
173 inline void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value) { m_resourceControlPolicyRestrictionHasBeenSet = true; m_resourceControlPolicyRestriction = value; }
176
178
193 inline ServiceControlPolicyRestriction GetServiceControlPolicyRestriction() const { return m_serviceControlPolicyRestriction; }
194 inline bool ServiceControlPolicyRestrictionHasBeenSet() const { return m_serviceControlPolicyRestrictionHasBeenSet; }
195 inline void SetServiceControlPolicyRestriction(ServiceControlPolicyRestriction value) { m_serviceControlPolicyRestrictionHasBeenSet = true; m_serviceControlPolicyRestriction = value; }
198 private:
199
201 bool m_actionHasBeenSet = false;
202
204 bool m_conditionHasBeenSet = false;
205
207 bool m_principalHasBeenSet = false;
208
209 Aws::String m_principalOwnerAccount;
210 bool m_principalOwnerAccountHasBeenSet = false;
211
213 bool m_accessTypeHasBeenSet = false;
214
215 PrincipalType m_principalType{PrincipalType::NOT_SET};
216 bool m_principalTypeHasBeenSet = false;
217
219 bool m_sourcesHasBeenSet = false;
220
222 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
223
225 bool m_serviceControlPolicyRestrictionHasBeenSet = false;
226 };
227
228} // namespace Model
229} // namespace AccessAnalyzer
230} // 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