AWS SDK for C++  0.14.3
AWS SDK for C++
CreateRuleRequest.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 ElasticLoadBalancingv2
26 {
27 namespace Model
28 {
29 
34  {
35  public:
37  Aws::String SerializePayload() const override;
38 
42  inline const Aws::String& GetListenerArn() const{ return m_listenerArn; }
43 
47  inline void SetListenerArn(const Aws::String& value) { m_listenerArnHasBeenSet = true; m_listenerArn = value; }
48 
52  inline void SetListenerArn(Aws::String&& value) { m_listenerArnHasBeenSet = true; m_listenerArn = value; }
53 
57  inline void SetListenerArn(const char* value) { m_listenerArnHasBeenSet = true; m_listenerArn.assign(value); }
58 
62  inline CreateRuleRequest& WithListenerArn(const Aws::String& value) { SetListenerArn(value); return *this;}
63 
67  inline CreateRuleRequest& WithListenerArn(Aws::String&& value) { SetListenerArn(value); return *this;}
68 
72  inline CreateRuleRequest& WithListenerArn(const char* value) { SetListenerArn(value); return *this;}
73 
77  inline const Aws::Vector<RuleCondition>& GetConditions() const{ return m_conditions; }
78 
82  inline void SetConditions(const Aws::Vector<RuleCondition>& value) { m_conditionsHasBeenSet = true; m_conditions = value; }
83 
87  inline void SetConditions(Aws::Vector<RuleCondition>&& value) { m_conditionsHasBeenSet = true; m_conditions = value; }
88 
92  inline CreateRuleRequest& WithConditions(const Aws::Vector<RuleCondition>& value) { SetConditions(value); return *this;}
93 
97  inline CreateRuleRequest& WithConditions(Aws::Vector<RuleCondition>&& value) { SetConditions(value); return *this;}
98 
102  inline CreateRuleRequest& AddConditions(const RuleCondition& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; }
103 
107  inline CreateRuleRequest& AddConditions(RuleCondition&& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; }
108 
113  inline int GetPriority() const{ return m_priority; }
114 
119  inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
120 
125  inline CreateRuleRequest& WithPriority(int value) { SetPriority(value); return *this;}
126 
130  inline const Aws::Vector<Action>& GetActions() const{ return m_actions; }
131 
135  inline void SetActions(const Aws::Vector<Action>& value) { m_actionsHasBeenSet = true; m_actions = value; }
136 
140  inline void SetActions(Aws::Vector<Action>&& value) { m_actionsHasBeenSet = true; m_actions = value; }
141 
145  inline CreateRuleRequest& WithActions(const Aws::Vector<Action>& value) { SetActions(value); return *this;}
146 
150  inline CreateRuleRequest& WithActions(Aws::Vector<Action>&& value) { SetActions(value); return *this;}
151 
155  inline CreateRuleRequest& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
156 
160  inline CreateRuleRequest& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
161 
162  private:
163  Aws::String m_listenerArn;
164  bool m_listenerArnHasBeenSet;
165  Aws::Vector<RuleCondition> m_conditions;
166  bool m_conditionsHasBeenSet;
167  int m_priority;
168  bool m_priorityHasBeenSet;
169  Aws::Vector<Action> m_actions;
170  bool m_actionsHasBeenSet;
171  };
172 
173 } // namespace Model
174 } // namespace ElasticLoadBalancingv2
175 } // namespace Aws
CreateRuleRequest & WithConditions(const Aws::Vector< RuleCondition > &value)
CreateRuleRequest & AddConditions(RuleCondition &&value)
CreateRuleRequest & AddActions(const Action &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< Action > & GetActions() const
void SetActions(const Aws::Vector< Action > &value)
CreateRuleRequest & WithListenerArn(const char *value)
CreateRuleRequest & WithActions(const Aws::Vector< Action > &value)
void SetConditions(const Aws::Vector< RuleCondition > &value)
CreateRuleRequest & WithListenerArn(Aws::String &&value)
void SetConditions(Aws::Vector< RuleCondition > &&value)
const Aws::Vector< RuleCondition > & GetConditions() const
CreateRuleRequest & AddConditions(const RuleCondition &value)
CreateRuleRequest & WithListenerArn(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
CreateRuleRequest & WithActions(Aws::Vector< Action > &&value)
#define AWS_ELASTICLOADBALANCINGV2_API
JSON (JavaScript Object Notation).
CreateRuleRequest & WithConditions(Aws::Vector< RuleCondition > &&value)