AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
RateBasedStatement.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/model/RateBasedStatementAggregateKeyType.h>
9#include <aws/wafv2/model/ForwardedIPConfig.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/wafv2/model/RateBasedStatementCustomKey.h>
12#include <aws/core/utils/memory/stl/AWSAllocator.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace WAFV2
26{
27namespace Model
28{
29 class Statement;
30
96 {
97 public:
98 AWS_WAFV2_API RateBasedStatement() = default;
102
103
105
115 inline long long GetLimit() const { return m_limit; }
116 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; }
117 inline void SetLimit(long long value) { m_limitHasBeenSet = true; m_limit = value; }
118 inline RateBasedStatement& WithLimit(long long value) { SetLimit(value); return *this;}
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) { m_evaluationWindowSecHasBeenSet = true; m_evaluationWindowSec = value; }
134 inline RateBasedStatement& WithEvaluationWindowSec(long long value) { SetEvaluationWindowSec(value); return *this;}
136
138
164 inline RateBasedStatementAggregateKeyType GetAggregateKeyType() const { return m_aggregateKeyType; }
165 inline bool AggregateKeyTypeHasBeenSet() const { return m_aggregateKeyTypeHasBeenSet; }
166 inline void SetAggregateKeyType(RateBasedStatementAggregateKeyType value) { m_aggregateKeyTypeHasBeenSet = true; m_aggregateKeyType = value; }
169
171
179 inline const Statement& GetScopeDownStatement() const{
180 return *m_scopeDownStatement;
181 }
182 inline bool ScopeDownStatementHasBeenSet() const { return m_scopeDownStatementHasBeenSet; }
183 template<typename ScopeDownStatementT = Statement>
185 m_scopeDownStatementHasBeenSet = true;
186 m_scopeDownStatement = Aws::MakeShared<Statement>("RateBasedStatement", std::forward<ScopeDownStatementT>(value));
187 }
188 template<typename ScopeDownStatementT = Statement>
189 RateBasedStatement& WithScopeDownStatement(ScopeDownStatementT&& value) { SetScopeDownStatement(std::forward<ScopeDownStatementT>(value)); return *this;}
191
193
202 inline const ForwardedIPConfig& GetForwardedIPConfig() const { return m_forwardedIPConfig; }
203 inline bool ForwardedIPConfigHasBeenSet() const { return m_forwardedIPConfigHasBeenSet; }
204 template<typename ForwardedIPConfigT = ForwardedIPConfig>
205 void SetForwardedIPConfig(ForwardedIPConfigT&& value) { m_forwardedIPConfigHasBeenSet = true; m_forwardedIPConfig = std::forward<ForwardedIPConfigT>(value); }
206 template<typename ForwardedIPConfigT = ForwardedIPConfig>
207 RateBasedStatement& WithForwardedIPConfig(ForwardedIPConfigT&& value) { SetForwardedIPConfig(std::forward<ForwardedIPConfigT>(value)); return *this;}
209
211
214 inline const Aws::Vector<RateBasedStatementCustomKey>& GetCustomKeys() const { return m_customKeys; }
215 inline bool CustomKeysHasBeenSet() const { return m_customKeysHasBeenSet; }
216 template<typename CustomKeysT = Aws::Vector<RateBasedStatementCustomKey>>
217 void SetCustomKeys(CustomKeysT&& value) { m_customKeysHasBeenSet = true; m_customKeys = std::forward<CustomKeysT>(value); }
218 template<typename CustomKeysT = Aws::Vector<RateBasedStatementCustomKey>>
219 RateBasedStatement& WithCustomKeys(CustomKeysT&& value) { SetCustomKeys(std::forward<CustomKeysT>(value)); return *this;}
220 template<typename CustomKeysT = RateBasedStatementCustomKey>
221 RateBasedStatement& AddCustomKeys(CustomKeysT&& value) { m_customKeysHasBeenSet = true; m_customKeys.emplace_back(std::forward<CustomKeysT>(value)); return *this; }
223 private:
224
225 long long m_limit{0};
226 bool m_limitHasBeenSet = false;
227
228 long long m_evaluationWindowSec{0};
229 bool m_evaluationWindowSecHasBeenSet = false;
230
232 bool m_aggregateKeyTypeHasBeenSet = false;
233
234 std::shared_ptr<Statement> m_scopeDownStatement;
235 bool m_scopeDownStatementHasBeenSet = false;
236
237 ForwardedIPConfig m_forwardedIPConfig;
238 bool m_forwardedIPConfigHasBeenSet = false;
239
241 bool m_customKeysHasBeenSet = false;
242 };
243
244} // namespace Model
245} // namespace WAFV2
246} // 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