AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
RateBasedStatement.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSAllocator.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/wafv2/WAFV2_EXPORTS.h>
10#include <aws/wafv2/model/ForwardedIPConfig.h>
11#include <aws/wafv2/model/RateBasedStatementAggregateKeyType.h>
12#include <aws/wafv2/model/RateBasedStatementCustomKey.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace WAFV2 {
24namespace Model {
25class Statement;
26
92 public:
93 AWS_WAFV2_API RateBasedStatement() = default;
96 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
97
99
109 inline long long GetLimit() const { return m_limit; }
110 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; }
111 inline void SetLimit(long long value) {
112 m_limitHasBeenSet = true;
113 m_limit = value;
114 }
115 inline RateBasedStatement& WithLimit(long long value) {
116 SetLimit(value);
117 return *this;
118 }
120
122
131 inline long long GetEvaluationWindowSec() const { return m_evaluationWindowSec; }
132 inline bool EvaluationWindowSecHasBeenSet() const { return m_evaluationWindowSecHasBeenSet; }
133 inline void SetEvaluationWindowSec(long long value) {
134 m_evaluationWindowSecHasBeenSet = true;
135 m_evaluationWindowSec = value;
136 }
139 return *this;
140 }
142
144
170 inline RateBasedStatementAggregateKeyType GetAggregateKeyType() const { return m_aggregateKeyType; }
171 inline bool AggregateKeyTypeHasBeenSet() const { return m_aggregateKeyTypeHasBeenSet; }
173 m_aggregateKeyTypeHasBeenSet = true;
174 m_aggregateKeyType = value;
175 }
181
183
191 inline const Statement& GetScopeDownStatement() const { return *m_scopeDownStatement; }
192 inline bool ScopeDownStatementHasBeenSet() const { return m_scopeDownStatementHasBeenSet; }
193 template <typename ScopeDownStatementT = Statement>
194 void SetScopeDownStatement(ScopeDownStatementT&& value) {
195 m_scopeDownStatementHasBeenSet = true;
196 m_scopeDownStatement = Aws::MakeShared<Statement>("RateBasedStatement", std::forward<ScopeDownStatementT>(value));
197 }
198 template <typename ScopeDownStatementT = Statement>
199 RateBasedStatement& WithScopeDownStatement(ScopeDownStatementT&& value) {
200 SetScopeDownStatement(std::forward<ScopeDownStatementT>(value));
201 return *this;
202 }
204
206
215 inline const ForwardedIPConfig& GetForwardedIPConfig() const { return m_forwardedIPConfig; }
216 inline bool ForwardedIPConfigHasBeenSet() const { return m_forwardedIPConfigHasBeenSet; }
217 template <typename ForwardedIPConfigT = ForwardedIPConfig>
218 void SetForwardedIPConfig(ForwardedIPConfigT&& value) {
219 m_forwardedIPConfigHasBeenSet = true;
220 m_forwardedIPConfig = std::forward<ForwardedIPConfigT>(value);
221 }
222 template <typename ForwardedIPConfigT = ForwardedIPConfig>
223 RateBasedStatement& WithForwardedIPConfig(ForwardedIPConfigT&& value) {
224 SetForwardedIPConfig(std::forward<ForwardedIPConfigT>(value));
225 return *this;
226 }
228
230
233 inline const Aws::Vector<RateBasedStatementCustomKey>& GetCustomKeys() const { return m_customKeys; }
234 inline bool CustomKeysHasBeenSet() const { return m_customKeysHasBeenSet; }
235 template <typename CustomKeysT = Aws::Vector<RateBasedStatementCustomKey>>
236 void SetCustomKeys(CustomKeysT&& value) {
237 m_customKeysHasBeenSet = true;
238 m_customKeys = std::forward<CustomKeysT>(value);
239 }
240 template <typename CustomKeysT = Aws::Vector<RateBasedStatementCustomKey>>
241 RateBasedStatement& WithCustomKeys(CustomKeysT&& value) {
242 SetCustomKeys(std::forward<CustomKeysT>(value));
243 return *this;
244 }
245 template <typename CustomKeysT = RateBasedStatementCustomKey>
246 RateBasedStatement& AddCustomKeys(CustomKeysT&& value) {
247 m_customKeysHasBeenSet = true;
248 m_customKeys.emplace_back(std::forward<CustomKeysT>(value));
249 return *this;
250 }
252 private:
253 long long m_limit{0};
254
255 long long m_evaluationWindowSec{0};
256
258
259 std::shared_ptr<Statement> m_scopeDownStatement;
260
261 ForwardedIPConfig m_forwardedIPConfig;
262
264 bool m_limitHasBeenSet = false;
265 bool m_evaluationWindowSecHasBeenSet = false;
266 bool m_aggregateKeyTypeHasBeenSet = false;
267 bool m_scopeDownStatementHasBeenSet = false;
268 bool m_forwardedIPConfigHasBeenSet = false;
269 bool m_customKeysHasBeenSet = false;
270};
271
272} // namespace Model
273} // namespace WAFV2
274} // namespace Aws
RateBasedStatement & AddCustomKeys(CustomKeysT &&value)
const Statement & GetScopeDownStatement() const
const ForwardedIPConfig & GetForwardedIPConfig() const
const Aws::Vector< RateBasedStatementCustomKey > & GetCustomKeys() const
RateBasedStatement & WithEvaluationWindowSec(long long value)
AWS_WAFV2_API RateBasedStatement & operator=(Aws::Utils::Json::JsonView jsonValue)
RateBasedStatement & WithCustomKeys(CustomKeysT &&value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
RateBasedStatement & WithLimit(long long value)
RateBasedStatement & WithScopeDownStatement(ScopeDownStatementT &&value)
void SetForwardedIPConfig(ForwardedIPConfigT &&value)
RateBasedStatement & WithAggregateKeyType(RateBasedStatementAggregateKeyType value)
AWS_WAFV2_API RateBasedStatement(Aws::Utils::Json::JsonView jsonValue)
AWS_WAFV2_API RateBasedStatement()=default
RateBasedStatementAggregateKeyType GetAggregateKeyType() const
void SetScopeDownStatement(ScopeDownStatementT &&value)
void SetAggregateKeyType(RateBasedStatementAggregateKeyType value)
RateBasedStatement & WithForwardedIPConfig(ForwardedIPConfigT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue