AWS SDK for C++  0.14.3
AWS SDK for C++
Rule.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace ElasticLoadBalancingv2
33 {
34 namespace Model
35 {
36 
41  {
42  public:
43  Rule();
44  Rule(const Aws::Utils::Xml::XmlNode& xmlNode);
45  Rule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::String& GetRuleArn() const{ return m_ruleArn; }
54 
58  inline void SetRuleArn(const Aws::String& value) { m_ruleArnHasBeenSet = true; m_ruleArn = value; }
59 
63  inline void SetRuleArn(Aws::String&& value) { m_ruleArnHasBeenSet = true; m_ruleArn = value; }
64 
68  inline void SetRuleArn(const char* value) { m_ruleArnHasBeenSet = true; m_ruleArn.assign(value); }
69 
73  inline Rule& WithRuleArn(const Aws::String& value) { SetRuleArn(value); return *this;}
74 
78  inline Rule& WithRuleArn(Aws::String&& value) { SetRuleArn(value); return *this;}
79 
83  inline Rule& WithRuleArn(const char* value) { SetRuleArn(value); return *this;}
84 
88  inline const Aws::String& GetPriority() const{ return m_priority; }
89 
93  inline void SetPriority(const Aws::String& value) { m_priorityHasBeenSet = true; m_priority = value; }
94 
98  inline void SetPriority(Aws::String&& value) { m_priorityHasBeenSet = true; m_priority = value; }
99 
103  inline void SetPriority(const char* value) { m_priorityHasBeenSet = true; m_priority.assign(value); }
104 
108  inline Rule& WithPriority(const Aws::String& value) { SetPriority(value); return *this;}
109 
113  inline Rule& WithPriority(Aws::String&& value) { SetPriority(value); return *this;}
114 
118  inline Rule& WithPriority(const char* value) { SetPriority(value); return *this;}
119 
123  inline const Aws::Vector<RuleCondition>& GetConditions() const{ return m_conditions; }
124 
128  inline void SetConditions(const Aws::Vector<RuleCondition>& value) { m_conditionsHasBeenSet = true; m_conditions = value; }
129 
133  inline void SetConditions(Aws::Vector<RuleCondition>&& value) { m_conditionsHasBeenSet = true; m_conditions = value; }
134 
138  inline Rule& WithConditions(const Aws::Vector<RuleCondition>& value) { SetConditions(value); return *this;}
139 
143  inline Rule& WithConditions(Aws::Vector<RuleCondition>&& value) { SetConditions(value); return *this;}
144 
148  inline Rule& AddConditions(const RuleCondition& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; }
149 
153  inline Rule& AddConditions(RuleCondition&& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; }
154 
158  inline const Aws::Vector<Action>& GetActions() const{ return m_actions; }
159 
163  inline void SetActions(const Aws::Vector<Action>& value) { m_actionsHasBeenSet = true; m_actions = value; }
164 
168  inline void SetActions(Aws::Vector<Action>&& value) { m_actionsHasBeenSet = true; m_actions = value; }
169 
173  inline Rule& WithActions(const Aws::Vector<Action>& value) { SetActions(value); return *this;}
174 
178  inline Rule& WithActions(Aws::Vector<Action>&& value) { SetActions(value); return *this;}
179 
183  inline Rule& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
184 
188  inline Rule& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
189 
193  inline bool GetIsDefault() const{ return m_isDefault; }
194 
198  inline void SetIsDefault(bool value) { m_isDefaultHasBeenSet = true; m_isDefault = value; }
199 
203  inline Rule& WithIsDefault(bool value) { SetIsDefault(value); return *this;}
204 
205  private:
206  Aws::String m_ruleArn;
207  bool m_ruleArnHasBeenSet;
208  Aws::String m_priority;
209  bool m_priorityHasBeenSet;
210  Aws::Vector<RuleCondition> m_conditions;
211  bool m_conditionsHasBeenSet;
212  Aws::Vector<Action> m_actions;
213  bool m_actionsHasBeenSet;
214  bool m_isDefault;
215  bool m_isDefaultHasBeenSet;
216  };
217 
218 } // namespace Model
219 } // namespace ElasticLoadBalancingv2
220 } // namespace Aws
void SetRuleArn(const Aws::String &value)
Definition: Rule.h:58
Rule & WithPriority(const char *value)
Definition: Rule.h:118
void SetRuleArn(Aws::String &&value)
Definition: Rule.h:63
Rule & WithActions(const Aws::Vector< Action > &value)
Definition: Rule.h:173
Rule & WithPriority(const Aws::String &value)
Definition: Rule.h:108
Rule & WithPriority(Aws::String &&value)
Definition: Rule.h:113
void SetConditions(Aws::Vector< RuleCondition > &&value)
Definition: Rule.h:133
void SetPriority(Aws::String &&value)
Definition: Rule.h:98
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetRuleArn(const char *value)
Definition: Rule.h:68
Rule & WithRuleArn(const Aws::String &value)
Definition: Rule.h:73
Rule & AddConditions(const RuleCondition &value)
Definition: Rule.h:148
Rule & WithActions(Aws::Vector< Action > &&value)
Definition: Rule.h:178
void SetActions(Aws::Vector< Action > &&value)
Definition: Rule.h:168
const Aws::Vector< RuleCondition > & GetConditions() const
Definition: Rule.h:123
const Aws::String & GetPriority() const
Definition: Rule.h:88
void SetPriority(const char *value)
Definition: Rule.h:103
Rule & WithRuleArn(Aws::String &&value)
Definition: Rule.h:78
Rule & WithConditions(const Aws::Vector< RuleCondition > &value)
Definition: Rule.h:138
Rule & WithIsDefault(bool value)
Definition: Rule.h:203
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
Rule & WithRuleArn(const char *value)
Definition: Rule.h:83
void SetConditions(const Aws::Vector< RuleCondition > &value)
Definition: Rule.h:128
void SetActions(const Aws::Vector< Action > &value)
Definition: Rule.h:163
void SetPriority(const Aws::String &value)
Definition: Rule.h:93
Rule & AddActions(const Action &value)
Definition: Rule.h:183
Rule & WithConditions(Aws::Vector< RuleCondition > &&value)
Definition: Rule.h:143
const Aws::Vector< Action > & GetActions() const
Definition: Rule.h:158
const Aws::String & GetRuleArn() const
Definition: Rule.h:53
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_ELASTICLOADBALANCINGV2_API
Rule & AddActions(Action &&value)
Definition: Rule.h:188
Rule & AddConditions(RuleCondition &&value)
Definition: Rule.h:153
JSON (JavaScript Object Notation).