AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/mailmanager/MailManager_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/mailmanager/model/RuleCondition.h>
11#include <aws/mailmanager/model/RuleAction.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace MailManager
25{
26namespace Model
27{
28
40 class Rule
41 {
42 public:
43 AWS_MAILMANAGER_API Rule() = default;
44 AWS_MAILMANAGER_API Rule(Aws::Utils::Json::JsonView jsonValue);
45 AWS_MAILMANAGER_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
46 AWS_MAILMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
53 inline const Aws::String& GetName() const { return m_name; }
54 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
55 template<typename NameT = Aws::String>
56 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
57 template<typename NameT = Aws::String>
58 Rule& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
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) { m_conditionsHasBeenSet = true; m_conditions = std::forward<ConditionsT>(value); }
71 template<typename ConditionsT = Aws::Vector<RuleCondition>>
72 Rule& WithConditions(ConditionsT&& value) { SetConditions(std::forward<ConditionsT>(value)); return *this;}
73 template<typename ConditionsT = RuleCondition>
74 Rule& AddConditions(ConditionsT&& value) { m_conditionsHasBeenSet = true; m_conditions.emplace_back(std::forward<ConditionsT>(value)); return *this; }
76
78
83 inline const Aws::Vector<RuleCondition>& GetUnless() const { return m_unless; }
84 inline bool UnlessHasBeenSet() const { return m_unlessHasBeenSet; }
85 template<typename UnlessT = Aws::Vector<RuleCondition>>
86 void SetUnless(UnlessT&& value) { m_unlessHasBeenSet = true; m_unless = std::forward<UnlessT>(value); }
87 template<typename UnlessT = Aws::Vector<RuleCondition>>
88 Rule& WithUnless(UnlessT&& value) { SetUnless(std::forward<UnlessT>(value)); return *this;}
89 template<typename UnlessT = RuleCondition>
90 Rule& AddUnless(UnlessT&& value) { m_unlessHasBeenSet = true; m_unless.emplace_back(std::forward<UnlessT>(value)); return *this; }
92
94
98 inline const Aws::Vector<RuleAction>& GetActions() const { return m_actions; }
99 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
100 template<typename ActionsT = Aws::Vector<RuleAction>>
101 void SetActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions = std::forward<ActionsT>(value); }
102 template<typename ActionsT = Aws::Vector<RuleAction>>
103 Rule& WithActions(ActionsT&& value) { SetActions(std::forward<ActionsT>(value)); return *this;}
104 template<typename ActionsT = RuleAction>
105 Rule& AddActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions.emplace_back(std::forward<ActionsT>(value)); return *this; }
107 private:
108
109 Aws::String m_name;
110 bool m_nameHasBeenSet = false;
111
112 Aws::Vector<RuleCondition> m_conditions;
113 bool m_conditionsHasBeenSet = false;
114
116 bool m_unlessHasBeenSet = false;
117
118 Aws::Vector<RuleAction> m_actions;
119 bool m_actionsHasBeenSet = false;
120 };
121
122} // namespace Model
123} // namespace MailManager
124} // namespace Aws
Rule & WithConditions(ConditionsT &&value)
Definition Rule.h:72
Rule & WithUnless(UnlessT &&value)
Definition Rule.h:88
const Aws::Vector< RuleCondition > & GetConditions() const
Definition Rule.h:67
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:98
AWS_MAILMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetName() const
Definition Rule.h:53
AWS_MAILMANAGER_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetUnless(UnlessT &&value)
Definition Rule.h:86
void SetName(NameT &&value)
Definition Rule.h:56
Rule & AddConditions(ConditionsT &&value)
Definition Rule.h:74
Rule & AddUnless(UnlessT &&value)
Definition Rule.h:90
const Aws::Vector< RuleCondition > & GetUnless() const
Definition Rule.h:83
void SetActions(ActionsT &&value)
Definition Rule.h:101
bool ActionsHasBeenSet() const
Definition Rule.h:99
AWS_MAILMANAGER_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithActions(ActionsT &&value)
Definition Rule.h:103
Rule & AddActions(ActionsT &&value)
Definition Rule.h:105
bool NameHasBeenSet() const
Definition Rule.h:54
bool ConditionsHasBeenSet() const
Definition Rule.h:68
AWS_MAILMANAGER_API Rule()=default
bool UnlessHasBeenSet() const
Definition Rule.h:84
Rule & WithName(NameT &&value)
Definition Rule.h:58
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