AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2Request.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#include <aws/elasticloadbalancingv2/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace ElasticLoadBalancingv2 {
20namespace Model {
21
25 public:
26 AWS_ELASTICLOADBALANCINGV2_API CreateRuleRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
33
34 AWS_ELASTICLOADBALANCINGV2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_ELASTICLOADBALANCINGV2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
38
39 public:
41
44 inline const Aws::String& GetListenerArn() const { return m_listenerArn; }
45 inline bool ListenerArnHasBeenSet() const { return m_listenerArnHasBeenSet; }
46 template <typename ListenerArnT = Aws::String>
47 void SetListenerArn(ListenerArnT&& value) {
48 m_listenerArnHasBeenSet = true;
49 m_listenerArn = std::forward<ListenerArnT>(value);
50 }
51 template <typename ListenerArnT = Aws::String>
52 CreateRuleRequest& WithListenerArn(ListenerArnT&& value) {
53 SetListenerArn(std::forward<ListenerArnT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::Vector<RuleCondition>& GetConditions() const { return m_conditions; }
63 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
64 template <typename ConditionsT = Aws::Vector<RuleCondition>>
65 void SetConditions(ConditionsT&& value) {
66 m_conditionsHasBeenSet = true;
67 m_conditions = std::forward<ConditionsT>(value);
68 }
69 template <typename ConditionsT = Aws::Vector<RuleCondition>>
70 CreateRuleRequest& WithConditions(ConditionsT&& value) {
71 SetConditions(std::forward<ConditionsT>(value));
72 return *this;
73 }
74 template <typename ConditionsT = RuleCondition>
75 CreateRuleRequest& AddConditions(ConditionsT&& value) {
76 m_conditionsHasBeenSet = true;
77 m_conditions.emplace_back(std::forward<ConditionsT>(value));
78 return *this;
79 }
81
83
87 inline int GetPriority() const { return m_priority; }
88 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
89 inline void SetPriority(int value) {
90 m_priorityHasBeenSet = true;
91 m_priority = value;
92 }
93 inline CreateRuleRequest& WithPriority(int value) {
94 SetPriority(value);
95 return *this;
96 }
98
100
103 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
104 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
105 template <typename ActionsT = Aws::Vector<Action>>
106 void SetActions(ActionsT&& value) {
107 m_actionsHasBeenSet = true;
108 m_actions = std::forward<ActionsT>(value);
109 }
110 template <typename ActionsT = Aws::Vector<Action>>
111 CreateRuleRequest& WithActions(ActionsT&& value) {
112 SetActions(std::forward<ActionsT>(value));
113 return *this;
114 }
115 template <typename ActionsT = Action>
116 CreateRuleRequest& AddActions(ActionsT&& value) {
117 m_actionsHasBeenSet = true;
118 m_actions.emplace_back(std::forward<ActionsT>(value));
119 return *this;
120 }
122
124
127 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
128 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
129 template <typename TagsT = Aws::Vector<Tag>>
130 void SetTags(TagsT&& value) {
131 m_tagsHasBeenSet = true;
132 m_tags = std::forward<TagsT>(value);
133 }
134 template <typename TagsT = Aws::Vector<Tag>>
135 CreateRuleRequest& WithTags(TagsT&& value) {
136 SetTags(std::forward<TagsT>(value));
137 return *this;
138 }
139 template <typename TagsT = Tag>
140 CreateRuleRequest& AddTags(TagsT&& value) {
141 m_tagsHasBeenSet = true;
142 m_tags.emplace_back(std::forward<TagsT>(value));
143 return *this;
144 }
146
148
152 inline const Aws::Vector<RuleTransform>& GetTransforms() const { return m_transforms; }
153 inline bool TransformsHasBeenSet() const { return m_transformsHasBeenSet; }
154 template <typename TransformsT = Aws::Vector<RuleTransform>>
155 void SetTransforms(TransformsT&& value) {
156 m_transformsHasBeenSet = true;
157 m_transforms = std::forward<TransformsT>(value);
158 }
159 template <typename TransformsT = Aws::Vector<RuleTransform>>
160 CreateRuleRequest& WithTransforms(TransformsT&& value) {
161 SetTransforms(std::forward<TransformsT>(value));
162 return *this;
163 }
164 template <typename TransformsT = RuleTransform>
165 CreateRuleRequest& AddTransforms(TransformsT&& value) {
166 m_transformsHasBeenSet = true;
167 m_transforms.emplace_back(std::forward<TransformsT>(value));
168 return *this;
169 }
171 private:
172 Aws::String m_listenerArn;
173
174 Aws::Vector<RuleCondition> m_conditions;
175
176 int m_priority{0};
177
178 Aws::Vector<Action> m_actions;
179
180 Aws::Vector<Tag> m_tags;
181
182 Aws::Vector<RuleTransform> m_transforms;
183 bool m_listenerArnHasBeenSet = false;
184 bool m_conditionsHasBeenSet = false;
185 bool m_priorityHasBeenSet = false;
186 bool m_actionsHasBeenSet = false;
187 bool m_tagsHasBeenSet = false;
188 bool m_transformsHasBeenSet = false;
189};
190
191} // namespace Model
192} // namespace ElasticLoadBalancingv2
193} // namespace Aws
AWS_ELASTICLOADBALANCINGV2_API CreateRuleRequest()=default
const Aws::Vector< RuleCondition > & GetConditions() const
AWS_ELASTICLOADBALANCINGV2_API Aws::String SerializePayload() const override
CreateRuleRequest & WithActions(ActionsT &&value)
CreateRuleRequest & AddActions(ActionsT &&value)
CreateRuleRequest & WithListenerArn(ListenerArnT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Action > & GetActions() const
CreateRuleRequest & WithTransforms(TransformsT &&value)
CreateRuleRequest & AddConditions(ConditionsT &&value)
CreateRuleRequest & AddTransforms(TransformsT &&value)
const Aws::Vector< RuleTransform > & GetTransforms() const
AWS_ELASTICLOADBALANCINGV2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateRuleRequest & WithConditions(ConditionsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector