AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
11#include <aws/elasticloadbalancingv2/model/Action.h>
12#include <aws/elasticloadbalancingv2/model/RuleCondition.h>
13#include <aws/elasticloadbalancingv2/model/RuleTransform.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace ElasticLoadBalancingv2 {
24namespace Model {
25
31class Rule {
32 public:
33 AWS_ELASTICLOADBALANCINGV2_API Rule() = default;
34 AWS_ELASTICLOADBALANCINGV2_API Rule(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_ELASTICLOADBALANCINGV2_API Rule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index,
38 const char* locationValue) const;
39 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
46 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
47 template <typename RuleArnT = Aws::String>
48 void SetRuleArn(RuleArnT&& value) {
49 m_ruleArnHasBeenSet = true;
50 m_ruleArn = std::forward<RuleArnT>(value);
51 }
52 template <typename RuleArnT = Aws::String>
53 Rule& WithRuleArn(RuleArnT&& value) {
54 SetRuleArn(std::forward<RuleArnT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetPriority() const { return m_priority; }
64 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
65 template <typename PriorityT = Aws::String>
66 void SetPriority(PriorityT&& value) {
67 m_priorityHasBeenSet = true;
68 m_priority = std::forward<PriorityT>(value);
69 }
70 template <typename PriorityT = Aws::String>
71 Rule& WithPriority(PriorityT&& value) {
72 SetPriority(std::forward<PriorityT>(value));
73 return *this;
74 }
76
78
85 inline const Aws::Vector<RuleCondition>& GetConditions() const { return m_conditions; }
86 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
87 template <typename ConditionsT = Aws::Vector<RuleCondition>>
88 void SetConditions(ConditionsT&& value) {
89 m_conditionsHasBeenSet = true;
90 m_conditions = std::forward<ConditionsT>(value);
91 }
92 template <typename ConditionsT = Aws::Vector<RuleCondition>>
93 Rule& WithConditions(ConditionsT&& value) {
94 SetConditions(std::forward<ConditionsT>(value));
95 return *this;
96 }
97 template <typename ConditionsT = RuleCondition>
98 Rule& AddConditions(ConditionsT&& value) {
99 m_conditionsHasBeenSet = true;
100 m_conditions.emplace_back(std::forward<ConditionsT>(value));
101 return *this;
102 }
104
106
111 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
112 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
113 template <typename ActionsT = Aws::Vector<Action>>
114 void SetActions(ActionsT&& value) {
115 m_actionsHasBeenSet = true;
116 m_actions = std::forward<ActionsT>(value);
117 }
118 template <typename ActionsT = Aws::Vector<Action>>
119 Rule& WithActions(ActionsT&& value) {
120 SetActions(std::forward<ActionsT>(value));
121 return *this;
122 }
123 template <typename ActionsT = Action>
124 Rule& AddActions(ActionsT&& value) {
125 m_actionsHasBeenSet = true;
126 m_actions.emplace_back(std::forward<ActionsT>(value));
127 return *this;
128 }
130
132
135 inline bool GetIsDefault() const { return m_isDefault; }
136 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
137 inline void SetIsDefault(bool value) {
138 m_isDefaultHasBeenSet = true;
139 m_isDefault = value;
140 }
141 inline Rule& WithIsDefault(bool value) {
142 SetIsDefault(value);
143 return *this;
144 }
146
148
151 inline const Aws::Vector<RuleTransform>& GetTransforms() const { return m_transforms; }
152 inline bool TransformsHasBeenSet() const { return m_transformsHasBeenSet; }
153 template <typename TransformsT = Aws::Vector<RuleTransform>>
154 void SetTransforms(TransformsT&& value) {
155 m_transformsHasBeenSet = true;
156 m_transforms = std::forward<TransformsT>(value);
157 }
158 template <typename TransformsT = Aws::Vector<RuleTransform>>
159 Rule& WithTransforms(TransformsT&& value) {
160 SetTransforms(std::forward<TransformsT>(value));
161 return *this;
162 }
163 template <typename TransformsT = RuleTransform>
164 Rule& AddTransforms(TransformsT&& value) {
165 m_transformsHasBeenSet = true;
166 m_transforms.emplace_back(std::forward<TransformsT>(value));
167 return *this;
168 }
170 private:
171 Aws::String m_ruleArn;
172
173 Aws::String m_priority;
174
175 Aws::Vector<RuleCondition> m_conditions;
176
177 Aws::Vector<Action> m_actions;
178
179 bool m_isDefault{false};
180
181 Aws::Vector<RuleTransform> m_transforms;
182 bool m_ruleArnHasBeenSet = false;
183 bool m_priorityHasBeenSet = false;
184 bool m_conditionsHasBeenSet = false;
185 bool m_actionsHasBeenSet = false;
186 bool m_isDefaultHasBeenSet = false;
187 bool m_transformsHasBeenSet = false;
188};
189
190} // namespace Model
191} // namespace ElasticLoadBalancingv2
192} // namespace Aws
AWS_ELASTICLOADBALANCINGV2_API Rule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetActions(ActionsT &&value)
Definition Rule.h:114
AWS_ELASTICLOADBALANCINGV2_API Rule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Rule & AddConditions(ConditionsT &&value)
Definition Rule.h:98
const Aws::Vector< RuleTransform > & GetTransforms() const
Definition Rule.h:151
AWS_ELASTICLOADBALANCINGV2_API Rule()=default
Rule & AddActions(ActionsT &&value)
Definition Rule.h:124
Rule & WithTransforms(TransformsT &&value)
Definition Rule.h:159
Rule & AddTransforms(TransformsT &&value)
Definition Rule.h:164
Rule & WithRuleArn(RuleArnT &&value)
Definition Rule.h:53
const Aws::Vector< Action > & GetActions() const
Definition Rule.h:111
const Aws::Vector< RuleCondition > & GetConditions() const
Definition Rule.h:85
void SetRuleArn(RuleArnT &&value)
Definition Rule.h:48
const Aws::String & GetRuleArn() const
Definition Rule.h:45
Rule & WithActions(ActionsT &&value)
Definition Rule.h:119
void SetTransforms(TransformsT &&value)
Definition Rule.h:154
void SetPriority(PriorityT &&value)
Definition Rule.h:66
Rule & WithConditions(ConditionsT &&value)
Definition Rule.h:93
void SetConditions(ConditionsT &&value)
Definition Rule.h:88
Rule & WithPriority(PriorityT &&value)
Definition Rule.h:71
const Aws::String & GetPriority() const
Definition Rule.h:63
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