AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
8#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2Request.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 <aws/elasticloadbalancingv2/model/Tag.h>
14#include <utility>
15
16namespace Aws
17{
18namespace ElasticLoadBalancingv2
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_ELASTICLOADBALANCINGV2_API CreateRuleRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
35
36 AWS_ELASTICLOADBALANCINGV2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_ELASTICLOADBALANCINGV2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
47 inline const Aws::String& GetListenerArn() const { return m_listenerArn; }
48 inline bool ListenerArnHasBeenSet() const { return m_listenerArnHasBeenSet; }
49 template<typename ListenerArnT = Aws::String>
50 void SetListenerArn(ListenerArnT&& value) { m_listenerArnHasBeenSet = true; m_listenerArn = std::forward<ListenerArnT>(value); }
51 template<typename ListenerArnT = Aws::String>
52 CreateRuleRequest& WithListenerArn(ListenerArnT&& value) { SetListenerArn(std::forward<ListenerArnT>(value)); return *this;}
54
56
59 inline const Aws::Vector<RuleCondition>& GetConditions() const { return m_conditions; }
60 inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; }
61 template<typename ConditionsT = Aws::Vector<RuleCondition>>
62 void SetConditions(ConditionsT&& value) { m_conditionsHasBeenSet = true; m_conditions = std::forward<ConditionsT>(value); }
63 template<typename ConditionsT = Aws::Vector<RuleCondition>>
64 CreateRuleRequest& WithConditions(ConditionsT&& value) { SetConditions(std::forward<ConditionsT>(value)); return *this;}
65 template<typename ConditionsT = RuleCondition>
66 CreateRuleRequest& AddConditions(ConditionsT&& value) { m_conditionsHasBeenSet = true; m_conditions.emplace_back(std::forward<ConditionsT>(value)); return *this; }
68
70
74 inline int GetPriority() const { return m_priority; }
75 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
76 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
77 inline CreateRuleRequest& WithPriority(int value) { SetPriority(value); return *this;}
79
81
84 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
85 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
86 template<typename ActionsT = Aws::Vector<Action>>
87 void SetActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions = std::forward<ActionsT>(value); }
88 template<typename ActionsT = Aws::Vector<Action>>
89 CreateRuleRequest& WithActions(ActionsT&& value) { SetActions(std::forward<ActionsT>(value)); return *this;}
90 template<typename ActionsT = Action>
91 CreateRuleRequest& AddActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions.emplace_back(std::forward<ActionsT>(value)); return *this; }
93
95
98 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
99 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
100 template<typename TagsT = Aws::Vector<Tag>>
101 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
102 template<typename TagsT = Aws::Vector<Tag>>
103 CreateRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
104 template<typename TagsT = Tag>
105 CreateRuleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
107 private:
108
109 Aws::String m_listenerArn;
110 bool m_listenerArnHasBeenSet = false;
111
112 Aws::Vector<RuleCondition> m_conditions;
113 bool m_conditionsHasBeenSet = false;
114
115 int m_priority{0};
116 bool m_priorityHasBeenSet = false;
117
118 Aws::Vector<Action> m_actions;
119 bool m_actionsHasBeenSet = false;
120
121 Aws::Vector<Tag> m_tags;
122 bool m_tagsHasBeenSet = false;
123 };
124
125} // namespace Model
126} // namespace ElasticLoadBalancingv2
127} // 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 & AddConditions(ConditionsT &&value)
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