AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/mailmanager/MailManager_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/mailmanager/model/RuleAction.h>
11#include <aws/mailmanager/model/RuleCondition.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();
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
54 inline const Aws::Vector<RuleAction>& GetActions() const{ return m_actions; }
55 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
56 inline void SetActions(const Aws::Vector<RuleAction>& value) { m_actionsHasBeenSet = true; m_actions = value; }
57 inline void SetActions(Aws::Vector<RuleAction>&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); }
58 inline Rule& WithActions(const Aws::Vector<RuleAction>& value) { SetActions(value); return *this;}
59 inline Rule& WithActions(Aws::Vector<RuleAction>&& value) { SetActions(std::move(value)); return *this;}
60 inline Rule& AddActions(const RuleAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
61 inline Rule& AddActions(RuleAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; }
63
65
70 inline const Aws::Vector<RuleCondition>& GetConditions() const{ return m_conditions; }
71 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
72 inline void SetConditions(const Aws::Vector<RuleCondition>& value) { m_conditionsHasBeenSet = true; m_conditions = value; }
73 inline void SetConditions(Aws::Vector<RuleCondition>&& value) { m_conditionsHasBeenSet = true; m_conditions = std::move(value); }
74 inline Rule& WithConditions(const Aws::Vector<RuleCondition>& value) { SetConditions(value); return *this;}
75 inline Rule& WithConditions(Aws::Vector<RuleCondition>&& value) { SetConditions(std::move(value)); return *this;}
76 inline Rule& AddConditions(const RuleCondition& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; }
77 inline Rule& AddConditions(RuleCondition&& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(std::move(value)); return *this; }
79
81
84 inline const Aws::String& GetName() const{ return m_name; }
85 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
86 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
87 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
88 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
89 inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
90 inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
91 inline Rule& WithName(const char* value) { SetName(value); return *this;}
93
95
100 inline const Aws::Vector<RuleCondition>& GetUnless() const{ return m_unless; }
101 inline bool UnlessHasBeenSet() const { return m_unlessHasBeenSet; }
102 inline void SetUnless(const Aws::Vector<RuleCondition>& value) { m_unlessHasBeenSet = true; m_unless = value; }
103 inline void SetUnless(Aws::Vector<RuleCondition>&& value) { m_unlessHasBeenSet = true; m_unless = std::move(value); }
104 inline Rule& WithUnless(const Aws::Vector<RuleCondition>& value) { SetUnless(value); return *this;}
105 inline Rule& WithUnless(Aws::Vector<RuleCondition>&& value) { SetUnless(std::move(value)); return *this;}
106 inline Rule& AddUnless(const RuleCondition& value) { m_unlessHasBeenSet = true; m_unless.push_back(value); return *this; }
107 inline Rule& AddUnless(RuleCondition&& value) { m_unlessHasBeenSet = true; m_unless.push_back(std::move(value)); return *this; }
109 private:
110
111 Aws::Vector<RuleAction> m_actions;
112 bool m_actionsHasBeenSet = false;
113
114 Aws::Vector<RuleCondition> m_conditions;
115 bool m_conditionsHasBeenSet = false;
116
117 Aws::String m_name;
118 bool m_nameHasBeenSet = false;
119
121 bool m_unlessHasBeenSet = false;
122 };
123
124} // namespace Model
125} // namespace MailManager
126} // namespace Aws
Rule & WithUnless(const Aws::Vector< RuleCondition > &value)
Definition Rule.h:104
void SetActions(Aws::Vector< RuleAction > &&value)
Definition Rule.h:57
const Aws::Vector< RuleCondition > & GetConditions() const
Definition Rule.h:70
Rule & WithName(Aws::String &&value)
Definition Rule.h:90
Rule & WithActions(const Aws::Vector< RuleAction > &value)
Definition Rule.h:58
void SetUnless(const Aws::Vector< RuleCondition > &value)
Definition Rule.h:102
Rule & AddActions(const RuleAction &value)
Definition Rule.h:60
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:54
AWS_MAILMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetName(Aws::String &&value)
Definition Rule.h:87
Rule & AddUnless(const RuleCondition &value)
Definition Rule.h:106
void SetUnless(Aws::Vector< RuleCondition > &&value)
Definition Rule.h:103
AWS_MAILMANAGER_API Rule()
const Aws::String & GetName() const
Definition Rule.h:84
AWS_MAILMANAGER_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetActions(const Aws::Vector< RuleAction > &value)
Definition Rule.h:56
Rule & WithName(const Aws::String &value)
Definition Rule.h:89
Rule & AddUnless(RuleCondition &&value)
Definition Rule.h:107
const Aws::Vector< RuleCondition > & GetUnless() const
Definition Rule.h:100
Rule & WithActions(Aws::Vector< RuleAction > &&value)
Definition Rule.h:59
Rule & AddActions(RuleAction &&value)
Definition Rule.h:61
void SetName(const char *value)
Definition Rule.h:88
bool ActionsHasBeenSet() const
Definition Rule.h:55
AWS_MAILMANAGER_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithUnless(Aws::Vector< RuleCondition > &&value)
Definition Rule.h:105
Rule & WithConditions(const Aws::Vector< RuleCondition > &value)
Definition Rule.h:74
Rule & AddConditions(RuleCondition &&value)
Definition Rule.h:77
void SetConditions(const Aws::Vector< RuleCondition > &value)
Definition Rule.h:72
bool NameHasBeenSet() const
Definition Rule.h:85
Rule & AddConditions(const RuleCondition &value)
Definition Rule.h:76
Rule & WithName(const char *value)
Definition Rule.h:91
void SetConditions(Aws::Vector< RuleCondition > &&value)
Definition Rule.h:73
bool ConditionsHasBeenSet() const
Definition Rule.h:71
void SetName(const Aws::String &value)
Definition Rule.h:86
bool UnlessHasBeenSet() const
Definition Rule.h:101
Rule & WithConditions(Aws::Vector< RuleCondition > &&value)
Definition Rule.h:75
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue