AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
RateBasedRule.h
1
6#pragma once
7#include <aws/waf-regional/WAFRegional_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/waf-regional/model/RateKey.h>
11#include <aws/waf-regional/model/Predicate.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace WAFRegional
25{
26namespace Model
27{
28
53 {
54 public:
55 AWS_WAFREGIONAL_API RateBasedRule() = default;
56 AWS_WAFREGIONAL_API RateBasedRule(Aws::Utils::Json::JsonView jsonValue);
57 AWS_WAFREGIONAL_API RateBasedRule& operator=(Aws::Utils::Json::JsonView jsonValue);
58 AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const;
59
60
62
71 inline const Aws::String& GetRuleId() const { return m_ruleId; }
72 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
73 template<typename RuleIdT = Aws::String>
74 void SetRuleId(RuleIdT&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::forward<RuleIdT>(value); }
75 template<typename RuleIdT = Aws::String>
76 RateBasedRule& WithRuleId(RuleIdT&& value) { SetRuleId(std::forward<RuleIdT>(value)); return *this;}
78
80
84 inline const Aws::String& GetName() const { return m_name; }
85 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
86 template<typename NameT = Aws::String>
87 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
88 template<typename NameT = Aws::String>
89 RateBasedRule& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
91
93
101 inline const Aws::String& GetMetricName() const { return m_metricName; }
102 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
103 template<typename MetricNameT = Aws::String>
104 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
105 template<typename MetricNameT = Aws::String>
106 RateBasedRule& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
108
110
116 inline const Aws::Vector<Predicate>& GetMatchPredicates() const { return m_matchPredicates; }
117 inline bool MatchPredicatesHasBeenSet() const { return m_matchPredicatesHasBeenSet; }
118 template<typename MatchPredicatesT = Aws::Vector<Predicate>>
119 void SetMatchPredicates(MatchPredicatesT&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = std::forward<MatchPredicatesT>(value); }
120 template<typename MatchPredicatesT = Aws::Vector<Predicate>>
121 RateBasedRule& WithMatchPredicates(MatchPredicatesT&& value) { SetMatchPredicates(std::forward<MatchPredicatesT>(value)); return *this;}
122 template<typename MatchPredicatesT = Predicate>
123 RateBasedRule& AddMatchPredicates(MatchPredicatesT&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.emplace_back(std::forward<MatchPredicatesT>(value)); return *this; }
125
127
134 inline RateKey GetRateKey() const { return m_rateKey; }
135 inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
136 inline void SetRateKey(RateKey value) { m_rateKeyHasBeenSet = true; m_rateKey = value; }
137 inline RateBasedRule& WithRateKey(RateKey value) { SetRateKey(value); return *this;}
139
141
148 inline long long GetRateLimit() const { return m_rateLimit; }
149 inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
150 inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; }
151 inline RateBasedRule& WithRateLimit(long long value) { SetRateLimit(value); return *this;}
153 private:
154
155 Aws::String m_ruleId;
156 bool m_ruleIdHasBeenSet = false;
157
158 Aws::String m_name;
159 bool m_nameHasBeenSet = false;
160
161 Aws::String m_metricName;
162 bool m_metricNameHasBeenSet = false;
163
164 Aws::Vector<Predicate> m_matchPredicates;
165 bool m_matchPredicatesHasBeenSet = false;
166
167 RateKey m_rateKey{RateKey::NOT_SET};
168 bool m_rateKeyHasBeenSet = false;
169
170 long long m_rateLimit{0};
171 bool m_rateLimitHasBeenSet = false;
172 };
173
174} // namespace Model
175} // namespace WAFRegional
176} // namespace Aws
AWS_WAFREGIONAL_API RateBasedRule & operator=(Aws::Utils::Json::JsonView jsonValue)
RateBasedRule & WithRateLimit(long long value)
RateBasedRule & WithMatchPredicates(MatchPredicatesT &&value)
void SetMetricName(MetricNameT &&value)
RateBasedRule & WithMetricName(MetricNameT &&value)
void SetMatchPredicates(MatchPredicatesT &&value)
const Aws::Vector< Predicate > & GetMatchPredicates() const
AWS_WAFREGIONAL_API RateBasedRule()=default
RateBasedRule & WithRateKey(RateKey value)
AWS_WAFREGIONAL_API RateBasedRule(Aws::Utils::Json::JsonView jsonValue)
AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetRuleId() const
const Aws::String & GetName() const
RateBasedRule & AddMatchPredicates(MatchPredicatesT &&value)
const Aws::String & GetMetricName() const
RateBasedRule & WithName(NameT &&value)
RateBasedRule & WithRuleId(RuleIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue