AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
RateBasedRule.h
1
6#pragma once
7#include <aws/waf/WAF_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/waf/model/RateKey.h>
11#include <aws/waf/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 WAF
25{
26namespace Model
27{
28
53 {
54 public:
55 AWS_WAF_API RateBasedRule();
59
60
62
71 inline const Aws::String& GetRuleId() const{ return m_ruleId; }
72 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
73 inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
74 inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); }
75 inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
76 inline RateBasedRule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
77 inline RateBasedRule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;}
78 inline RateBasedRule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
80
82
86 inline const Aws::String& GetName() const{ return m_name; }
87 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
88 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
89 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
90 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
91 inline RateBasedRule& WithName(const Aws::String& value) { SetName(value); return *this;}
92 inline RateBasedRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
93 inline RateBasedRule& WithName(const char* value) { SetName(value); return *this;}
95
97
105 inline const Aws::String& GetMetricName() const{ return m_metricName; }
106 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
107 inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
108 inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
109 inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
110 inline RateBasedRule& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
111 inline RateBasedRule& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
112 inline RateBasedRule& WithMetricName(const char* value) { SetMetricName(value); return *this;}
114
116
122 inline const Aws::Vector<Predicate>& GetMatchPredicates() const{ return m_matchPredicates; }
123 inline bool MatchPredicatesHasBeenSet() const { return m_matchPredicatesHasBeenSet; }
124 inline void SetMatchPredicates(const Aws::Vector<Predicate>& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = value; }
125 inline void SetMatchPredicates(Aws::Vector<Predicate>&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = std::move(value); }
126 inline RateBasedRule& WithMatchPredicates(const Aws::Vector<Predicate>& value) { SetMatchPredicates(value); return *this;}
127 inline RateBasedRule& WithMatchPredicates(Aws::Vector<Predicate>&& value) { SetMatchPredicates(std::move(value)); return *this;}
128 inline RateBasedRule& AddMatchPredicates(const Predicate& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(value); return *this; }
129 inline RateBasedRule& AddMatchPredicates(Predicate&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(std::move(value)); return *this; }
131
133
140 inline const RateKey& GetRateKey() const{ return m_rateKey; }
141 inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
142 inline void SetRateKey(const RateKey& value) { m_rateKeyHasBeenSet = true; m_rateKey = value; }
143 inline void SetRateKey(RateKey&& value) { m_rateKeyHasBeenSet = true; m_rateKey = std::move(value); }
144 inline RateBasedRule& WithRateKey(const RateKey& value) { SetRateKey(value); return *this;}
145 inline RateBasedRule& WithRateKey(RateKey&& value) { SetRateKey(std::move(value)); return *this;}
147
149
156 inline long long GetRateLimit() const{ return m_rateLimit; }
157 inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
158 inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; }
159 inline RateBasedRule& WithRateLimit(long long value) { SetRateLimit(value); return *this;}
161 private:
162
163 Aws::String m_ruleId;
164 bool m_ruleIdHasBeenSet = false;
165
166 Aws::String m_name;
167 bool m_nameHasBeenSet = false;
168
169 Aws::String m_metricName;
170 bool m_metricNameHasBeenSet = false;
171
172 Aws::Vector<Predicate> m_matchPredicates;
173 bool m_matchPredicatesHasBeenSet = false;
174
175 RateKey m_rateKey;
176 bool m_rateKeyHasBeenSet = false;
177
178 long long m_rateLimit;
179 bool m_rateLimitHasBeenSet = false;
180 };
181
182} // namespace Model
183} // namespace WAF
184} // namespace Aws
void SetMetricName(const Aws::String &value)
RateBasedRule & WithName(const Aws::String &value)
RateBasedRule & WithRuleId(Aws::String &&value)
RateBasedRule & AddMatchPredicates(Predicate &&value)
RateBasedRule & AddMatchPredicates(const Predicate &value)
const Aws::String & GetName() const
void SetMatchPredicates(Aws::Vector< Predicate > &&value)
AWS_WAF_API RateBasedRule(Aws::Utils::Json::JsonView jsonValue)
RateBasedRule & WithName(Aws::String &&value)
void SetMetricName(const char *value)
void SetRateKey(RateKey &&value)
void SetRuleId(Aws::String &&value)
void SetName(Aws::String &&value)
void SetMatchPredicates(const Aws::Vector< Predicate > &value)
RateBasedRule & WithMetricName(Aws::String &&value)
void SetName(const char *value)
void SetRuleId(const Aws::String &value)
RateBasedRule & WithName(const char *value)
void SetRuleId(const char *value)
void SetRateKey(const RateKey &value)
AWS_WAF_API RateBasedRule & operator=(Aws::Utils::Json::JsonView jsonValue)
RateBasedRule & WithRuleId(const Aws::String &value)
RateBasedRule & WithRateKey(const RateKey &value)
RateBasedRule & WithMetricName(const Aws::String &value)
const Aws::Vector< Predicate > & GetMatchPredicates() const
const Aws::String & GetRuleId() const
RateBasedRule & WithRateKey(RateKey &&value)
RateBasedRule & WithMatchPredicates(Aws::Vector< Predicate > &&value)
void SetMetricName(Aws::String &&value)
RateBasedRule & WithRateLimit(long long value)
const Aws::String & GetMetricName() const
AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const
const RateKey & GetRateKey() const
RateBasedRule & WithMatchPredicates(const Aws::Vector< Predicate > &value)
RateBasedRule & WithRuleId(const char *value)
RateBasedRule & WithMetricName(const char *value)
void SetRateLimit(long long value)
void SetName(const Aws::String &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