AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
CreateRateBasedRuleRequest.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/waf/WAFRequest.h>
10#include <aws/waf/WAF_EXPORTS.h>
11#include <aws/waf/model/RateKey.h>
12#include <aws/waf/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace WAF {
18namespace Model {
19
23 public:
24 AWS_WAF_API CreateRateBasedRuleRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateRateBasedRule"; }
31
32 AWS_WAF_API Aws::String SerializePayload() const override;
33
35
37
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
64 inline const Aws::String& GetMetricName() const { return m_metricName; }
65 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
66 template <typename MetricNameT = Aws::String>
67 void SetMetricName(MetricNameT&& value) {
68 m_metricNameHasBeenSet = true;
69 m_metricName = std::forward<MetricNameT>(value);
70 }
71 template <typename MetricNameT = Aws::String>
73 SetMetricName(std::forward<MetricNameT>(value));
74 return *this;
75 }
77
79
86 inline RateKey GetRateKey() const { return m_rateKey; }
87 inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
88 inline void SetRateKey(RateKey value) {
89 m_rateKeyHasBeenSet = true;
90 m_rateKey = value;
91 }
93 SetRateKey(value);
94 return *this;
95 }
97
99
106 inline long long GetRateLimit() const { return m_rateLimit; }
107 inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
108 inline void SetRateLimit(long long value) {
109 m_rateLimitHasBeenSet = true;
110 m_rateLimit = value;
111 }
112 inline CreateRateBasedRuleRequest& WithRateLimit(long long value) {
113 SetRateLimit(value);
114 return *this;
115 }
117
119
125 inline const Aws::String& GetChangeToken() const { return m_changeToken; }
126 inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
127 template <typename ChangeTokenT = Aws::String>
128 void SetChangeToken(ChangeTokenT&& value) {
129 m_changeTokenHasBeenSet = true;
130 m_changeToken = std::forward<ChangeTokenT>(value);
131 }
132 template <typename ChangeTokenT = Aws::String>
134 SetChangeToken(std::forward<ChangeTokenT>(value));
135 return *this;
136 }
138
140
143 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
144 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
145 template <typename TagsT = Aws::Vector<Tag>>
146 void SetTags(TagsT&& value) {
147 m_tagsHasBeenSet = true;
148 m_tags = std::forward<TagsT>(value);
149 }
150 template <typename TagsT = Aws::Vector<Tag>>
152 SetTags(std::forward<TagsT>(value));
153 return *this;
154 }
155 template <typename TagsT = Tag>
157 m_tagsHasBeenSet = true;
158 m_tags.emplace_back(std::forward<TagsT>(value));
159 return *this;
160 }
162 private:
163 Aws::String m_name;
164
165 Aws::String m_metricName;
166
167 RateKey m_rateKey{RateKey::NOT_SET};
168
169 long long m_rateLimit{0};
170
171 Aws::String m_changeToken;
172
173 Aws::Vector<Tag> m_tags;
174 bool m_nameHasBeenSet = false;
175 bool m_metricNameHasBeenSet = false;
176 bool m_rateKeyHasBeenSet = false;
177 bool m_rateLimitHasBeenSet = false;
178 bool m_changeTokenHasBeenSet = false;
179 bool m_tagsHasBeenSet = false;
180};
181
182} // namespace Model
183} // namespace WAF
184} // namespace Aws
CreateRateBasedRuleRequest & AddTags(TagsT &&value)
CreateRateBasedRuleRequest & WithTags(TagsT &&value)
CreateRateBasedRuleRequest & WithName(NameT &&value)
AWS_WAF_API Aws::String SerializePayload() const override
AWS_WAF_API CreateRateBasedRuleRequest()=default
CreateRateBasedRuleRequest & WithChangeToken(ChangeTokenT &&value)
AWS_WAF_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateRateBasedRuleRequest & WithRateKey(RateKey value)
CreateRateBasedRuleRequest & WithRateLimit(long long value)
virtual const char * GetServiceRequestName() const override
CreateRateBasedRuleRequest & WithMetricName(MetricNameT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector