AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ExternalAccessDetails.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/FindingSource.h>
9#include <aws/accessanalyzer/model/ResourceControlPolicyRestriction.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace AccessAnalyzer {
24namespace Model {
25
33 public:
34 AWS_ACCESSANALYZER_API ExternalAccessDetails() = default;
35 AWS_ACCESSANALYZER_API ExternalAccessDetails(Aws::Utils::Json::JsonView jsonValue);
37 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
44 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
45 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
46 template <typename ActionT = Aws::Vector<Aws::String>>
47 void SetAction(ActionT&& value) {
48 m_actionHasBeenSet = true;
49 m_action = std::forward<ActionT>(value);
50 }
51 template <typename ActionT = Aws::Vector<Aws::String>>
53 SetAction(std::forward<ActionT>(value));
54 return *this;
55 }
56 template <typename ActionT = Aws::String>
57 ExternalAccessDetails& AddAction(ActionT&& value) {
58 m_actionHasBeenSet = true;
59 m_action.emplace_back(std::forward<ActionT>(value));
60 return *this;
61 }
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) {
73 m_conditionHasBeenSet = true;
74 m_condition = std::forward<ConditionT>(value);
75 }
76 template <typename ConditionT = Aws::Map<Aws::String, Aws::String>>
77 ExternalAccessDetails& WithCondition(ConditionT&& value) {
78 SetCondition(std::forward<ConditionT>(value));
79 return *this;
80 }
81 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::String>
82 ExternalAccessDetails& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
83 m_conditionHasBeenSet = true;
84 m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value));
85 return *this;
86 }
88
90
93 inline bool GetIsPublic() const { return m_isPublic; }
94 inline bool IsPublicHasBeenSet() const { return m_isPublicHasBeenSet; }
95 inline void SetIsPublic(bool value) {
96 m_isPublicHasBeenSet = true;
97 m_isPublic = value;
98 }
99 inline ExternalAccessDetails& WithIsPublic(bool value) {
100 SetIsPublic(value);
101 return *this;
102 }
104
106
110 inline const Aws::Map<Aws::String, Aws::String>& GetPrincipal() const { return m_principal; }
111 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
112 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
113 void SetPrincipal(PrincipalT&& value) {
114 m_principalHasBeenSet = true;
115 m_principal = std::forward<PrincipalT>(value);
116 }
117 template <typename PrincipalT = Aws::Map<Aws::String, Aws::String>>
119 SetPrincipal(std::forward<PrincipalT>(value));
120 return *this;
121 }
122 template <typename PrincipalKeyT = Aws::String, typename PrincipalValueT = Aws::String>
123 ExternalAccessDetails& AddPrincipal(PrincipalKeyT&& key, PrincipalValueT&& value) {
124 m_principalHasBeenSet = true;
125 m_principal.emplace(std::forward<PrincipalKeyT>(key), std::forward<PrincipalValueT>(value));
126 return *this;
127 }
129
131
136 inline const Aws::Vector<FindingSource>& GetSources() const { return m_sources; }
137 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
138 template <typename SourcesT = Aws::Vector<FindingSource>>
139 void SetSources(SourcesT&& value) {
140 m_sourcesHasBeenSet = true;
141 m_sources = std::forward<SourcesT>(value);
142 }
143 template <typename SourcesT = Aws::Vector<FindingSource>>
145 SetSources(std::forward<SourcesT>(value));
146 return *this;
147 }
148 template <typename SourcesT = FindingSource>
150 m_sourcesHasBeenSet = true;
151 m_sources.emplace_back(std::forward<SourcesT>(value));
152 return *this;
153 }
155
157
173 inline ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const { return m_resourceControlPolicyRestriction; }
174 inline bool ResourceControlPolicyRestrictionHasBeenSet() const { return m_resourceControlPolicyRestrictionHasBeenSet; }
176 m_resourceControlPolicyRestrictionHasBeenSet = true;
177 m_resourceControlPolicyRestriction = value;
178 }
181 return *this;
182 }
184 private:
186
188
189 bool m_isPublic{false};
190
192
194
196 bool m_actionHasBeenSet = false;
197 bool m_conditionHasBeenSet = false;
198 bool m_isPublicHasBeenSet = false;
199 bool m_principalHasBeenSet = false;
200 bool m_sourcesHasBeenSet = false;
201 bool m_resourceControlPolicyRestrictionHasBeenSet = false;
202};
203
204} // namespace Model
205} // namespace AccessAnalyzer
206} // namespace Aws
AWS_ACCESSANALYZER_API ExternalAccessDetails()=default
ExternalAccessDetails & AddAction(ActionT &&value)
const Aws::Vector< FindingSource > & GetSources() const
ExternalAccessDetails & AddPrincipal(PrincipalKeyT &&key, PrincipalValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCondition() const
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_ACCESSANALYZER_API ExternalAccessDetails(Aws::Utils::Json::JsonView jsonValue)
ExternalAccessDetails & WithAction(ActionT &&value)
const Aws::Vector< Aws::String > & GetAction() const
ExternalAccessDetails & WithResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
ResourceControlPolicyRestriction GetResourceControlPolicyRestriction() const
ExternalAccessDetails & AddSources(SourcesT &&value)
ExternalAccessDetails & WithSources(SourcesT &&value)
AWS_ACCESSANALYZER_API ExternalAccessDetails & operator=(Aws::Utils::Json::JsonView jsonValue)
ExternalAccessDetails & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
void SetResourceControlPolicyRestriction(ResourceControlPolicyRestriction value)
ExternalAccessDetails & WithPrincipal(PrincipalT &&value)
ExternalAccessDetails & WithCondition(ConditionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetPrincipal() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue