AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ImpersonationRule.h
1
6#pragma once
7#include <aws/workmail/WorkMail_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/workmail/model/AccessEffect.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace WorkMail
24{
25namespace Model
26{
27
34 {
35 public:
36 AWS_WORKMAIL_API ImpersonationRule() = default;
37 AWS_WORKMAIL_API ImpersonationRule(Aws::Utils::Json::JsonView jsonValue);
39 AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Aws::String& GetImpersonationRuleId() const { return m_impersonationRuleId; }
47 inline bool ImpersonationRuleIdHasBeenSet() const { return m_impersonationRuleIdHasBeenSet; }
48 template<typename ImpersonationRuleIdT = Aws::String>
49 void SetImpersonationRuleId(ImpersonationRuleIdT&& value) { m_impersonationRuleIdHasBeenSet = true; m_impersonationRuleId = std::forward<ImpersonationRuleIdT>(value); }
50 template<typename ImpersonationRuleIdT = Aws::String>
51 ImpersonationRule& WithImpersonationRuleId(ImpersonationRuleIdT&& value) { SetImpersonationRuleId(std::forward<ImpersonationRuleIdT>(value)); return *this;}
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) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
62 template<typename NameT = Aws::String>
63 ImpersonationRule& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
65
67
70 inline const Aws::String& GetDescription() const { return m_description; }
71 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
72 template<typename DescriptionT = Aws::String>
73 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
74 template<typename DescriptionT = Aws::String>
75 ImpersonationRule& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
77
79
83 inline AccessEffect GetEffect() const { return m_effect; }
84 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
85 inline void SetEffect(AccessEffect value) { m_effectHasBeenSet = true; m_effect = value; }
86 inline ImpersonationRule& WithEffect(AccessEffect value) { SetEffect(value); return *this;}
88
90
93 inline const Aws::Vector<Aws::String>& GetTargetUsers() const { return m_targetUsers; }
94 inline bool TargetUsersHasBeenSet() const { return m_targetUsersHasBeenSet; }
95 template<typename TargetUsersT = Aws::Vector<Aws::String>>
96 void SetTargetUsers(TargetUsersT&& value) { m_targetUsersHasBeenSet = true; m_targetUsers = std::forward<TargetUsersT>(value); }
97 template<typename TargetUsersT = Aws::Vector<Aws::String>>
98 ImpersonationRule& WithTargetUsers(TargetUsersT&& value) { SetTargetUsers(std::forward<TargetUsersT>(value)); return *this;}
99 template<typename TargetUsersT = Aws::String>
100 ImpersonationRule& AddTargetUsers(TargetUsersT&& value) { m_targetUsersHasBeenSet = true; m_targetUsers.emplace_back(std::forward<TargetUsersT>(value)); return *this; }
102
104
107 inline const Aws::Vector<Aws::String>& GetNotTargetUsers() const { return m_notTargetUsers; }
108 inline bool NotTargetUsersHasBeenSet() const { return m_notTargetUsersHasBeenSet; }
109 template<typename NotTargetUsersT = Aws::Vector<Aws::String>>
110 void SetNotTargetUsers(NotTargetUsersT&& value) { m_notTargetUsersHasBeenSet = true; m_notTargetUsers = std::forward<NotTargetUsersT>(value); }
111 template<typename NotTargetUsersT = Aws::Vector<Aws::String>>
112 ImpersonationRule& WithNotTargetUsers(NotTargetUsersT&& value) { SetNotTargetUsers(std::forward<NotTargetUsersT>(value)); return *this;}
113 template<typename NotTargetUsersT = Aws::String>
114 ImpersonationRule& AddNotTargetUsers(NotTargetUsersT&& value) { m_notTargetUsersHasBeenSet = true; m_notTargetUsers.emplace_back(std::forward<NotTargetUsersT>(value)); return *this; }
116 private:
117
118 Aws::String m_impersonationRuleId;
119 bool m_impersonationRuleIdHasBeenSet = false;
120
121 Aws::String m_name;
122 bool m_nameHasBeenSet = false;
123
124 Aws::String m_description;
125 bool m_descriptionHasBeenSet = false;
126
128 bool m_effectHasBeenSet = false;
129
130 Aws::Vector<Aws::String> m_targetUsers;
131 bool m_targetUsersHasBeenSet = false;
132
133 Aws::Vector<Aws::String> m_notTargetUsers;
134 bool m_notTargetUsersHasBeenSet = false;
135 };
136
137} // namespace Model
138} // namespace WorkMail
139} // 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