AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
AccessControlRule.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/workmail/WorkMail_EXPORTS.h>
11#include <aws/workmail/model/AccessControlRuleEffect.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace WorkMail {
23namespace Model {
24
32 public:
33 AWS_WORKMAIL_API AccessControlRule() = default;
34 AWS_WORKMAIL_API AccessControlRule(Aws::Utils::Json::JsonView jsonValue);
36 AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
50 AccessControlRule& WithName(NameT&& value) {
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
60 inline AccessControlRuleEffect GetEffect() const { return m_effect; }
61 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
63 m_effectHasBeenSet = true;
64 m_effect = value;
65 }
67 SetEffect(value);
68 return *this;
69 }
71
73
76 inline const Aws::String& GetDescription() const { return m_description; }
77 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
78 template <typename DescriptionT = Aws::String>
79 void SetDescription(DescriptionT&& value) {
80 m_descriptionHasBeenSet = true;
81 m_description = std::forward<DescriptionT>(value);
82 }
83 template <typename DescriptionT = Aws::String>
84 AccessControlRule& WithDescription(DescriptionT&& value) {
85 SetDescription(std::forward<DescriptionT>(value));
86 return *this;
87 }
89
91
94 inline const Aws::Vector<Aws::String>& GetIpRanges() const { return m_ipRanges; }
95 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
96 template <typename IpRangesT = Aws::Vector<Aws::String>>
97 void SetIpRanges(IpRangesT&& value) {
98 m_ipRangesHasBeenSet = true;
99 m_ipRanges = std::forward<IpRangesT>(value);
100 }
101 template <typename IpRangesT = Aws::Vector<Aws::String>>
102 AccessControlRule& WithIpRanges(IpRangesT&& value) {
103 SetIpRanges(std::forward<IpRangesT>(value));
104 return *this;
105 }
106 template <typename IpRangesT = Aws::String>
107 AccessControlRule& AddIpRanges(IpRangesT&& value) {
108 m_ipRangesHasBeenSet = true;
109 m_ipRanges.emplace_back(std::forward<IpRangesT>(value));
110 return *this;
111 }
113
115
118 inline const Aws::Vector<Aws::String>& GetNotIpRanges() const { return m_notIpRanges; }
119 inline bool NotIpRangesHasBeenSet() const { return m_notIpRangesHasBeenSet; }
120 template <typename NotIpRangesT = Aws::Vector<Aws::String>>
121 void SetNotIpRanges(NotIpRangesT&& value) {
122 m_notIpRangesHasBeenSet = true;
123 m_notIpRanges = std::forward<NotIpRangesT>(value);
124 }
125 template <typename NotIpRangesT = Aws::Vector<Aws::String>>
126 AccessControlRule& WithNotIpRanges(NotIpRangesT&& value) {
127 SetNotIpRanges(std::forward<NotIpRangesT>(value));
128 return *this;
129 }
130 template <typename NotIpRangesT = Aws::String>
131 AccessControlRule& AddNotIpRanges(NotIpRangesT&& value) {
132 m_notIpRangesHasBeenSet = true;
133 m_notIpRanges.emplace_back(std::forward<NotIpRangesT>(value));
134 return *this;
135 }
137
139
145 inline const Aws::Vector<Aws::String>& GetActions() const { return m_actions; }
146 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
147 template <typename ActionsT = Aws::Vector<Aws::String>>
148 void SetActions(ActionsT&& value) {
149 m_actionsHasBeenSet = true;
150 m_actions = std::forward<ActionsT>(value);
151 }
152 template <typename ActionsT = Aws::Vector<Aws::String>>
153 AccessControlRule& WithActions(ActionsT&& value) {
154 SetActions(std::forward<ActionsT>(value));
155 return *this;
156 }
157 template <typename ActionsT = Aws::String>
158 AccessControlRule& AddActions(ActionsT&& value) {
159 m_actionsHasBeenSet = true;
160 m_actions.emplace_back(std::forward<ActionsT>(value));
161 return *this;
162 }
164
166
172 inline const Aws::Vector<Aws::String>& GetNotActions() const { return m_notActions; }
173 inline bool NotActionsHasBeenSet() const { return m_notActionsHasBeenSet; }
174 template <typename NotActionsT = Aws::Vector<Aws::String>>
175 void SetNotActions(NotActionsT&& value) {
176 m_notActionsHasBeenSet = true;
177 m_notActions = std::forward<NotActionsT>(value);
178 }
179 template <typename NotActionsT = Aws::Vector<Aws::String>>
180 AccessControlRule& WithNotActions(NotActionsT&& value) {
181 SetNotActions(std::forward<NotActionsT>(value));
182 return *this;
183 }
184 template <typename NotActionsT = Aws::String>
185 AccessControlRule& AddNotActions(NotActionsT&& value) {
186 m_notActionsHasBeenSet = true;
187 m_notActions.emplace_back(std::forward<NotActionsT>(value));
188 return *this;
189 }
191
193
196 inline const Aws::Vector<Aws::String>& GetUserIds() const { return m_userIds; }
197 inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; }
198 template <typename UserIdsT = Aws::Vector<Aws::String>>
199 void SetUserIds(UserIdsT&& value) {
200 m_userIdsHasBeenSet = true;
201 m_userIds = std::forward<UserIdsT>(value);
202 }
203 template <typename UserIdsT = Aws::Vector<Aws::String>>
204 AccessControlRule& WithUserIds(UserIdsT&& value) {
205 SetUserIds(std::forward<UserIdsT>(value));
206 return *this;
207 }
208 template <typename UserIdsT = Aws::String>
209 AccessControlRule& AddUserIds(UserIdsT&& value) {
210 m_userIdsHasBeenSet = true;
211 m_userIds.emplace_back(std::forward<UserIdsT>(value));
212 return *this;
213 }
215
217
220 inline const Aws::Vector<Aws::String>& GetNotUserIds() const { return m_notUserIds; }
221 inline bool NotUserIdsHasBeenSet() const { return m_notUserIdsHasBeenSet; }
222 template <typename NotUserIdsT = Aws::Vector<Aws::String>>
223 void SetNotUserIds(NotUserIdsT&& value) {
224 m_notUserIdsHasBeenSet = true;
225 m_notUserIds = std::forward<NotUserIdsT>(value);
226 }
227 template <typename NotUserIdsT = Aws::Vector<Aws::String>>
228 AccessControlRule& WithNotUserIds(NotUserIdsT&& value) {
229 SetNotUserIds(std::forward<NotUserIdsT>(value));
230 return *this;
231 }
232 template <typename NotUserIdsT = Aws::String>
233 AccessControlRule& AddNotUserIds(NotUserIdsT&& value) {
234 m_notUserIdsHasBeenSet = true;
235 m_notUserIds.emplace_back(std::forward<NotUserIdsT>(value));
236 return *this;
237 }
239
241
244 inline const Aws::Utils::DateTime& GetDateCreated() const { return m_dateCreated; }
245 inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; }
246 template <typename DateCreatedT = Aws::Utils::DateTime>
247 void SetDateCreated(DateCreatedT&& value) {
248 m_dateCreatedHasBeenSet = true;
249 m_dateCreated = std::forward<DateCreatedT>(value);
250 }
251 template <typename DateCreatedT = Aws::Utils::DateTime>
252 AccessControlRule& WithDateCreated(DateCreatedT&& value) {
253 SetDateCreated(std::forward<DateCreatedT>(value));
254 return *this;
255 }
257
259
262 inline const Aws::Utils::DateTime& GetDateModified() const { return m_dateModified; }
263 inline bool DateModifiedHasBeenSet() const { return m_dateModifiedHasBeenSet; }
264 template <typename DateModifiedT = Aws::Utils::DateTime>
265 void SetDateModified(DateModifiedT&& value) {
266 m_dateModifiedHasBeenSet = true;
267 m_dateModified = std::forward<DateModifiedT>(value);
268 }
269 template <typename DateModifiedT = Aws::Utils::DateTime>
270 AccessControlRule& WithDateModified(DateModifiedT&& value) {
271 SetDateModified(std::forward<DateModifiedT>(value));
272 return *this;
273 }
275
277
280 inline const Aws::Vector<Aws::String>& GetImpersonationRoleIds() const { return m_impersonationRoleIds; }
281 inline bool ImpersonationRoleIdsHasBeenSet() const { return m_impersonationRoleIdsHasBeenSet; }
282 template <typename ImpersonationRoleIdsT = Aws::Vector<Aws::String>>
283 void SetImpersonationRoleIds(ImpersonationRoleIdsT&& value) {
284 m_impersonationRoleIdsHasBeenSet = true;
285 m_impersonationRoleIds = std::forward<ImpersonationRoleIdsT>(value);
286 }
287 template <typename ImpersonationRoleIdsT = Aws::Vector<Aws::String>>
288 AccessControlRule& WithImpersonationRoleIds(ImpersonationRoleIdsT&& value) {
289 SetImpersonationRoleIds(std::forward<ImpersonationRoleIdsT>(value));
290 return *this;
291 }
292 template <typename ImpersonationRoleIdsT = Aws::String>
293 AccessControlRule& AddImpersonationRoleIds(ImpersonationRoleIdsT&& value) {
294 m_impersonationRoleIdsHasBeenSet = true;
295 m_impersonationRoleIds.emplace_back(std::forward<ImpersonationRoleIdsT>(value));
296 return *this;
297 }
299
301
304 inline const Aws::Vector<Aws::String>& GetNotImpersonationRoleIds() const { return m_notImpersonationRoleIds; }
305 inline bool NotImpersonationRoleIdsHasBeenSet() const { return m_notImpersonationRoleIdsHasBeenSet; }
306 template <typename NotImpersonationRoleIdsT = Aws::Vector<Aws::String>>
307 void SetNotImpersonationRoleIds(NotImpersonationRoleIdsT&& value) {
308 m_notImpersonationRoleIdsHasBeenSet = true;
309 m_notImpersonationRoleIds = std::forward<NotImpersonationRoleIdsT>(value);
310 }
311 template <typename NotImpersonationRoleIdsT = Aws::Vector<Aws::String>>
312 AccessControlRule& WithNotImpersonationRoleIds(NotImpersonationRoleIdsT&& value) {
313 SetNotImpersonationRoleIds(std::forward<NotImpersonationRoleIdsT>(value));
314 return *this;
315 }
316 template <typename NotImpersonationRoleIdsT = Aws::String>
317 AccessControlRule& AddNotImpersonationRoleIds(NotImpersonationRoleIdsT&& value) {
318 m_notImpersonationRoleIdsHasBeenSet = true;
319 m_notImpersonationRoleIds.emplace_back(std::forward<NotImpersonationRoleIdsT>(value));
320 return *this;
321 }
323 private:
324 Aws::String m_name;
325
327
328 Aws::String m_description;
329
330 Aws::Vector<Aws::String> m_ipRanges;
331
332 Aws::Vector<Aws::String> m_notIpRanges;
333
334 Aws::Vector<Aws::String> m_actions;
335
336 Aws::Vector<Aws::String> m_notActions;
337
338 Aws::Vector<Aws::String> m_userIds;
339
340 Aws::Vector<Aws::String> m_notUserIds;
341
342 Aws::Utils::DateTime m_dateCreated{};
343
344 Aws::Utils::DateTime m_dateModified{};
345
346 Aws::Vector<Aws::String> m_impersonationRoleIds;
347
348 Aws::Vector<Aws::String> m_notImpersonationRoleIds;
349 bool m_nameHasBeenSet = false;
350 bool m_effectHasBeenSet = false;
351 bool m_descriptionHasBeenSet = false;
352 bool m_ipRangesHasBeenSet = false;
353 bool m_notIpRangesHasBeenSet = false;
354 bool m_actionsHasBeenSet = false;
355 bool m_notActionsHasBeenSet = false;
356 bool m_userIdsHasBeenSet = false;
357 bool m_notUserIdsHasBeenSet = false;
358 bool m_dateCreatedHasBeenSet = false;
359 bool m_dateModifiedHasBeenSet = false;
360 bool m_impersonationRoleIdsHasBeenSet = false;
361 bool m_notImpersonationRoleIdsHasBeenSet = false;
362};
363
364} // namespace Model
365} // namespace WorkMail
366} // namespace Aws
void SetDescription(DescriptionT &&value)
AccessControlRule & AddUserIds(UserIdsT &&value)
AccessControlRule & WithName(NameT &&value)
AccessControlRule & AddNotActions(NotActionsT &&value)
const Aws::Vector< Aws::String > & GetNotImpersonationRoleIds() const
const Aws::Vector< Aws::String > & GetUserIds() const
void SetDateModified(DateModifiedT &&value)
void SetDateCreated(DateCreatedT &&value)
AccessControlRule & WithDateCreated(DateCreatedT &&value)
AccessControlRule & AddNotIpRanges(NotIpRangesT &&value)
AccessControlRule & AddImpersonationRoleIds(ImpersonationRoleIdsT &&value)
AccessControlRule & WithActions(ActionsT &&value)
const Aws::String & GetDescription() const
AccessControlRule & WithDescription(DescriptionT &&value)
const Aws::Vector< Aws::String > & GetIpRanges() const
const Aws::Utils::DateTime & GetDateCreated() const
void SetNotImpersonationRoleIds(NotImpersonationRoleIdsT &&value)
AccessControlRule & WithNotImpersonationRoleIds(NotImpersonationRoleIdsT &&value)
void SetImpersonationRoleIds(ImpersonationRoleIdsT &&value)
AWS_WORKMAIL_API AccessControlRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetEffect(AccessControlRuleEffect value)
AccessControlRule & WithImpersonationRoleIds(ImpersonationRoleIdsT &&value)
AccessControlRule & WithIpRanges(IpRangesT &&value)
AccessControlRule & AddActions(ActionsT &&value)
AccessControlRuleEffect GetEffect() const
AccessControlRule & AddNotUserIds(NotUserIdsT &&value)
AccessControlRule & AddIpRanges(IpRangesT &&value)
AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const
AccessControlRule & WithNotIpRanges(NotIpRangesT &&value)
const Aws::Vector< Aws::String > & GetNotActions() const
AccessControlRule & WithNotUserIds(NotUserIdsT &&value)
const Aws::Vector< Aws::String > & GetActions() const
AccessControlRule & WithNotActions(NotActionsT &&value)
AWS_WORKMAIL_API AccessControlRule()=default
AccessControlRule & WithDateModified(DateModifiedT &&value)
const Aws::Utils::DateTime & GetDateModified() const
AccessControlRule & AddNotImpersonationRoleIds(NotImpersonationRoleIdsT &&value)
void SetNotIpRanges(NotIpRangesT &&value)
const Aws::Vector< Aws::String > & GetNotUserIds() const
AWS_WORKMAIL_API AccessControlRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetNotIpRanges() const
AccessControlRule & WithEffect(AccessControlRuleEffect value)
AccessControlRule & WithUserIds(UserIdsT &&value)
const Aws::Vector< Aws::String > & GetImpersonationRoleIds() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue