AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/elasticloadbalancingv2/model/RuleCondition.h>
12#include <aws/elasticloadbalancingv2/model/Action.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace ElasticLoadBalancingv2
25{
26namespace Model
27{
28
34 class Rule
35 {
36 public:
37 AWS_ELASTICLOADBALANCINGV2_API Rule() = default;
38 AWS_ELASTICLOADBALANCINGV2_API Rule(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_ELASTICLOADBALANCINGV2_API Rule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
49 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
50 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
51 template<typename RuleArnT = Aws::String>
52 void SetRuleArn(RuleArnT&& value) { m_ruleArnHasBeenSet = true; m_ruleArn = std::forward<RuleArnT>(value); }
53 template<typename RuleArnT = Aws::String>
54 Rule& WithRuleArn(RuleArnT&& value) { SetRuleArn(std::forward<RuleArnT>(value)); return *this;}
56
58
61 inline const Aws::String& GetPriority() const { return m_priority; }
62 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
63 template<typename PriorityT = Aws::String>
64 void SetPriority(PriorityT&& value) { m_priorityHasBeenSet = true; m_priority = std::forward<PriorityT>(value); }
65 template<typename PriorityT = Aws::String>
66 Rule& WithPriority(PriorityT&& value) { SetPriority(std::forward<PriorityT>(value)); return *this;}
68
70
77 inline const Aws::Vector<RuleCondition>& GetConditions() const { return m_conditions; }
78 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
79 template<typename ConditionsT = Aws::Vector<RuleCondition>>
80 void SetConditions(ConditionsT&& value) { m_conditionsHasBeenSet = true; m_conditions = std::forward<ConditionsT>(value); }
81 template<typename ConditionsT = Aws::Vector<RuleCondition>>
82 Rule& WithConditions(ConditionsT&& value) { SetConditions(std::forward<ConditionsT>(value)); return *this;}
83 template<typename ConditionsT = RuleCondition>
84 Rule& AddConditions(ConditionsT&& value) { m_conditionsHasBeenSet = true; m_conditions.emplace_back(std::forward<ConditionsT>(value)); return *this; }
86
88
93 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
94 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
95 template<typename ActionsT = Aws::Vector<Action>>
96 void SetActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions = std::forward<ActionsT>(value); }
97 template<typename ActionsT = Aws::Vector<Action>>
98 Rule& WithActions(ActionsT&& value) { SetActions(std::forward<ActionsT>(value)); return *this;}
99 template<typename ActionsT = Action>
100 Rule& AddActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions.emplace_back(std::forward<ActionsT>(value)); return *this; }
102
104
107 inline bool GetIsDefault() const { return m_isDefault; }
108 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
109 inline void SetIsDefault(bool value) { m_isDefaultHasBeenSet = true; m_isDefault = value; }
110 inline Rule& WithIsDefault(bool value) { SetIsDefault(value); return *this;}
112 private:
113
114 Aws::String m_ruleArn;
115 bool m_ruleArnHasBeenSet = false;
116
117 Aws::String m_priority;
118 bool m_priorityHasBeenSet = false;
119
120 Aws::Vector<RuleCondition> m_conditions;
121 bool m_conditionsHasBeenSet = false;
122
123 Aws::Vector<Action> m_actions;
124 bool m_actionsHasBeenSet = false;
125
126 bool m_isDefault{false};
127 bool m_isDefaultHasBeenSet = false;
128 };
129
130} // namespace Model
131} // namespace ElasticLoadBalancingv2
132} // namespace Aws
AWS_ELASTICLOADBALANCINGV2_API Rule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetActions(ActionsT &&value)
Definition Rule.h:96
AWS_ELASTICLOADBALANCINGV2_API Rule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Rule & AddConditions(ConditionsT &&value)
Definition Rule.h:84
AWS_ELASTICLOADBALANCINGV2_API Rule()=default
Rule & AddActions(ActionsT &&value)
Definition Rule.h:100
Rule & WithRuleArn(RuleArnT &&value)
Definition Rule.h:54
const Aws::Vector< Action > & GetActions() const
Definition Rule.h:93
const Aws::Vector< RuleCondition > & GetConditions() const
Definition Rule.h:77
void SetRuleArn(RuleArnT &&value)
Definition Rule.h:52
const Aws::String & GetRuleArn() const
Definition Rule.h:49
Rule & WithActions(ActionsT &&value)
Definition Rule.h:98
void SetPriority(PriorityT &&value)
Definition Rule.h:64
Rule & WithConditions(ConditionsT &&value)
Definition Rule.h:82
void SetConditions(ConditionsT &&value)
Definition Rule.h:80
Rule & WithPriority(PriorityT &&value)
Definition Rule.h:66
const Aws::String & GetPriority() const
Definition Rule.h:61
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream