AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
Rule.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/mailmanager/MailManager_EXPORTS.h>
10#include <aws/mailmanager/model/RuleAction.h>
11#include <aws/mailmanager/model/RuleCondition.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace MailManager {
23namespace Model {
24
36class Rule {
37 public:
38 AWS_MAILMANAGER_API Rule() = default;
39 AWS_MAILMANAGER_API Rule(Aws::Utils::Json::JsonView jsonValue);
40 AWS_MAILMANAGER_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_MAILMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetName() const { return m_name; }
48 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
49 template <typename NameT = Aws::String>
50 void SetName(NameT&& value) {
51 m_nameHasBeenSet = true;
52 m_name = std::forward<NameT>(value);
53 }
54 template <typename NameT = Aws::String>
55 Rule& WithName(NameT&& value) {
56 SetName(std::forward<NameT>(value));
57 return *this;
58 }
60
62
67 inline const Aws::Vector<RuleCondition>& GetConditions() const { return m_conditions; }
68 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
69 template <typename ConditionsT = Aws::Vector<RuleCondition>>
70 void SetConditions(ConditionsT&& value) {
71 m_conditionsHasBeenSet = true;
72 m_conditions = std::forward<ConditionsT>(value);
73 }
74 template <typename ConditionsT = Aws::Vector<RuleCondition>>
75 Rule& WithConditions(ConditionsT&& value) {
76 SetConditions(std::forward<ConditionsT>(value));
77 return *this;
78 }
79 template <typename ConditionsT = RuleCondition>
80 Rule& AddConditions(ConditionsT&& value) {
81 m_conditionsHasBeenSet = true;
82 m_conditions.emplace_back(std::forward<ConditionsT>(value));
83 return *this;
84 }
86
88
93 inline const Aws::Vector<RuleCondition>& GetUnless() const { return m_unless; }
94 inline bool UnlessHasBeenSet() const { return m_unlessHasBeenSet; }
95 template <typename UnlessT = Aws::Vector<RuleCondition>>
96 void SetUnless(UnlessT&& value) {
97 m_unlessHasBeenSet = true;
98 m_unless = std::forward<UnlessT>(value);
99 }
100 template <typename UnlessT = Aws::Vector<RuleCondition>>
101 Rule& WithUnless(UnlessT&& value) {
102 SetUnless(std::forward<UnlessT>(value));
103 return *this;
104 }
105 template <typename UnlessT = RuleCondition>
106 Rule& AddUnless(UnlessT&& value) {
107 m_unlessHasBeenSet = true;
108 m_unless.emplace_back(std::forward<UnlessT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::Vector<RuleAction>& GetActions() const { return m_actions; }
119 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
120 template <typename ActionsT = Aws::Vector<RuleAction>>
121 void SetActions(ActionsT&& value) {
122 m_actionsHasBeenSet = true;
123 m_actions = std::forward<ActionsT>(value);
124 }
125 template <typename ActionsT = Aws::Vector<RuleAction>>
126 Rule& WithActions(ActionsT&& value) {
127 SetActions(std::forward<ActionsT>(value));
128 return *this;
129 }
130 template <typename ActionsT = RuleAction>
131 Rule& AddActions(ActionsT&& value) {
132 m_actionsHasBeenSet = true;
133 m_actions.emplace_back(std::forward<ActionsT>(value));
134 return *this;
135 }
137 private:
138 Aws::String m_name;
139
140 Aws::Vector<RuleCondition> m_conditions;
141
143
144 Aws::Vector<RuleAction> m_actions;
145 bool m_nameHasBeenSet = false;
146 bool m_conditionsHasBeenSet = false;
147 bool m_unlessHasBeenSet = false;
148 bool m_actionsHasBeenSet = false;
149};
150
151} // namespace Model
152} // namespace MailManager
153} // namespace Aws
Rule & WithConditions(ConditionsT &&value)
Definition Rule.h:75
Rule & WithUnless(UnlessT &&value)
Definition Rule.h:101
const Aws::Vector< RuleCondition > & GetConditions() const
Definition Rule.h:67
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:118
AWS_MAILMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetName() const
Definition Rule.h:47
AWS_MAILMANAGER_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetUnless(UnlessT &&value)
Definition Rule.h:96
void SetName(NameT &&value)
Definition Rule.h:50
Rule & AddConditions(ConditionsT &&value)
Definition Rule.h:80
Rule & AddUnless(UnlessT &&value)
Definition Rule.h:106
const Aws::Vector< RuleCondition > & GetUnless() const
Definition Rule.h:93
void SetActions(ActionsT &&value)
Definition Rule.h:121
bool ActionsHasBeenSet() const
Definition Rule.h:119
AWS_MAILMANAGER_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithActions(ActionsT &&value)
Definition Rule.h:126
Rule & AddActions(ActionsT &&value)
Definition Rule.h:131
bool NameHasBeenSet() const
Definition Rule.h:48
bool ConditionsHasBeenSet() const
Definition Rule.h:68
AWS_MAILMANAGER_API Rule()=default
bool UnlessHasBeenSet() const
Definition Rule.h:94
Rule & WithName(NameT &&value)
Definition Rule.h:55
void SetConditions(ConditionsT &&value)
Definition Rule.h:70
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue