AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
ImpersonationRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/workmail/WorkMail_EXPORTS.h>
10#include <aws/workmail/model/AccessEffect.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace WorkMail {
22namespace Model {
23
30 public:
31 AWS_WORKMAIL_API ImpersonationRule() = default;
32 AWS_WORKMAIL_API ImpersonationRule(Aws::Utils::Json::JsonView jsonValue);
34 AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetImpersonationRuleId() const { return m_impersonationRuleId; }
41 inline bool ImpersonationRuleIdHasBeenSet() const { return m_impersonationRuleIdHasBeenSet; }
42 template <typename ImpersonationRuleIdT = Aws::String>
43 void SetImpersonationRuleId(ImpersonationRuleIdT&& value) {
44 m_impersonationRuleIdHasBeenSet = true;
45 m_impersonationRuleId = std::forward<ImpersonationRuleIdT>(value);
46 }
47 template <typename ImpersonationRuleIdT = Aws::String>
48 ImpersonationRule& WithImpersonationRuleId(ImpersonationRuleIdT&& value) {
49 SetImpersonationRuleId(std::forward<ImpersonationRuleIdT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetName() const { return m_name; }
59 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
60 template <typename NameT = Aws::String>
61 void SetName(NameT&& value) {
62 m_nameHasBeenSet = true;
63 m_name = std::forward<NameT>(value);
64 }
65 template <typename NameT = Aws::String>
66 ImpersonationRule& WithName(NameT&& value) {
67 SetName(std::forward<NameT>(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 ImpersonationRule& WithDescription(DescriptionT&& value) {
85 SetDescription(std::forward<DescriptionT>(value));
86 return *this;
87 }
89
91
95 inline AccessEffect GetEffect() const { return m_effect; }
96 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
97 inline void SetEffect(AccessEffect value) {
98 m_effectHasBeenSet = true;
99 m_effect = value;
100 }
102 SetEffect(value);
103 return *this;
104 }
106
108
111 inline const Aws::Vector<Aws::String>& GetTargetUsers() const { return m_targetUsers; }
112 inline bool TargetUsersHasBeenSet() const { return m_targetUsersHasBeenSet; }
113 template <typename TargetUsersT = Aws::Vector<Aws::String>>
114 void SetTargetUsers(TargetUsersT&& value) {
115 m_targetUsersHasBeenSet = true;
116 m_targetUsers = std::forward<TargetUsersT>(value);
117 }
118 template <typename TargetUsersT = Aws::Vector<Aws::String>>
119 ImpersonationRule& WithTargetUsers(TargetUsersT&& value) {
120 SetTargetUsers(std::forward<TargetUsersT>(value));
121 return *this;
122 }
123 template <typename TargetUsersT = Aws::String>
124 ImpersonationRule& AddTargetUsers(TargetUsersT&& value) {
125 m_targetUsersHasBeenSet = true;
126 m_targetUsers.emplace_back(std::forward<TargetUsersT>(value));
127 return *this;
128 }
130
132
135 inline const Aws::Vector<Aws::String>& GetNotTargetUsers() const { return m_notTargetUsers; }
136 inline bool NotTargetUsersHasBeenSet() const { return m_notTargetUsersHasBeenSet; }
137 template <typename NotTargetUsersT = Aws::Vector<Aws::String>>
138 void SetNotTargetUsers(NotTargetUsersT&& value) {
139 m_notTargetUsersHasBeenSet = true;
140 m_notTargetUsers = std::forward<NotTargetUsersT>(value);
141 }
142 template <typename NotTargetUsersT = Aws::Vector<Aws::String>>
143 ImpersonationRule& WithNotTargetUsers(NotTargetUsersT&& value) {
144 SetNotTargetUsers(std::forward<NotTargetUsersT>(value));
145 return *this;
146 }
147 template <typename NotTargetUsersT = Aws::String>
148 ImpersonationRule& AddNotTargetUsers(NotTargetUsersT&& value) {
149 m_notTargetUsersHasBeenSet = true;
150 m_notTargetUsers.emplace_back(std::forward<NotTargetUsersT>(value));
151 return *this;
152 }
154 private:
155 Aws::String m_impersonationRuleId;
156
157 Aws::String m_name;
158
159 Aws::String m_description;
160
162
163 Aws::Vector<Aws::String> m_targetUsers;
164
165 Aws::Vector<Aws::String> m_notTargetUsers;
166 bool m_impersonationRuleIdHasBeenSet = false;
167 bool m_nameHasBeenSet = false;
168 bool m_descriptionHasBeenSet = false;
169 bool m_effectHasBeenSet = false;
170 bool m_targetUsersHasBeenSet = false;
171 bool m_notTargetUsersHasBeenSet = false;
172};
173
174} // namespace Model
175} // namespace WorkMail
176} // namespace Aws
ImpersonationRule & WithImpersonationRuleId(ImpersonationRuleIdT &&value)
AWS_WORKMAIL_API ImpersonationRule()=default
AWS_WORKMAIL_API ImpersonationRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetTargetUsers() const
ImpersonationRule & AddNotTargetUsers(NotTargetUsersT &&value)
void SetTargetUsers(TargetUsersT &&value)
void SetImpersonationRuleId(ImpersonationRuleIdT &&value)
ImpersonationRule & WithDescription(DescriptionT &&value)
AWS_WORKMAIL_API ImpersonationRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDescription(DescriptionT &&value)
ImpersonationRule & WithTargetUsers(TargetUsersT &&value)
ImpersonationRule & WithName(NameT &&value)
ImpersonationRule & WithNotTargetUsers(NotTargetUsersT &&value)
ImpersonationRule & AddTargetUsers(TargetUsersT &&value)
ImpersonationRule & WithEffect(AccessEffect value)
const Aws::Vector< Aws::String > & GetNotTargetUsers() const
AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetDescription() const
const Aws::String & GetImpersonationRuleId() const
void SetNotTargetUsers(NotTargetUsersT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue