AWS SDK for C++  1.9.132
AWS SDK for C++
RateBasedRule.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20  class JsonValue;
21  class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace WAFRegional
25 {
26 namespace Model
27 {
28 
53  {
54  public:
59 
60 
70  inline const Aws::String& GetRuleId() const{ return m_ruleId; }
71 
81  inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
82 
92  inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
93 
103  inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); }
104 
114  inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
115 
125  inline RateBasedRule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
126 
136  inline RateBasedRule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;}
137 
147  inline RateBasedRule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
148 
149 
154  inline const Aws::String& GetName() const{ return m_name; }
155 
160  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
161 
166  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
167 
172  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
173 
178  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
179 
184  inline RateBasedRule& WithName(const Aws::String& value) { SetName(value); return *this;}
185 
190  inline RateBasedRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
191 
196  inline RateBasedRule& WithName(const char* value) { SetName(value); return *this;}
197 
198 
207  inline const Aws::String& GetMetricName() const{ return m_metricName; }
208 
217  inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
218 
227  inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
228 
237  inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
238 
247  inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
248 
257  inline RateBasedRule& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
258 
267  inline RateBasedRule& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
268 
277  inline RateBasedRule& WithMetricName(const char* value) { SetMetricName(value); return *this;}
278 
279 
286  inline const Aws::Vector<Predicate>& GetMatchPredicates() const{ return m_matchPredicates; }
287 
294  inline bool MatchPredicatesHasBeenSet() const { return m_matchPredicatesHasBeenSet; }
295 
302  inline void SetMatchPredicates(const Aws::Vector<Predicate>& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = value; }
303 
310  inline void SetMatchPredicates(Aws::Vector<Predicate>&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = std::move(value); }
311 
318  inline RateBasedRule& WithMatchPredicates(const Aws::Vector<Predicate>& value) { SetMatchPredicates(value); return *this;}
319 
326  inline RateBasedRule& WithMatchPredicates(Aws::Vector<Predicate>&& value) { SetMatchPredicates(std::move(value)); return *this;}
327 
334  inline RateBasedRule& AddMatchPredicates(const Predicate& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(value); return *this; }
335 
342  inline RateBasedRule& AddMatchPredicates(Predicate&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(std::move(value)); return *this; }
343 
344 
352  inline const RateKey& GetRateKey() const{ return m_rateKey; }
353 
361  inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
362 
370  inline void SetRateKey(const RateKey& value) { m_rateKeyHasBeenSet = true; m_rateKey = value; }
371 
379  inline void SetRateKey(RateKey&& value) { m_rateKeyHasBeenSet = true; m_rateKey = std::move(value); }
380 
388  inline RateBasedRule& WithRateKey(const RateKey& value) { SetRateKey(value); return *this;}
389 
397  inline RateBasedRule& WithRateKey(RateKey&& value) { SetRateKey(std::move(value)); return *this;}
398 
399 
407  inline long long GetRateLimit() const{ return m_rateLimit; }
408 
416  inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
417 
425  inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; }
426 
434  inline RateBasedRule& WithRateLimit(long long value) { SetRateLimit(value); return *this;}
435 
436  private:
437 
438  Aws::String m_ruleId;
439  bool m_ruleIdHasBeenSet;
440 
441  Aws::String m_name;
442  bool m_nameHasBeenSet;
443 
444  Aws::String m_metricName;
445  bool m_metricNameHasBeenSet;
446 
447  Aws::Vector<Predicate> m_matchPredicates;
448  bool m_matchPredicatesHasBeenSet;
449 
450  RateKey m_rateKey;
451  bool m_rateKeyHasBeenSet;
452 
453  long long m_rateLimit;
454  bool m_rateLimitHasBeenSet;
455  };
456 
457 } // namespace Model
458 } // namespace WAFRegional
459 } // namespace Aws
Aws::WAFRegional::Model::RateBasedRule::WithRateKey
RateBasedRule & WithRateKey(RateKey &&value)
Definition: RateBasedRule.h:397
Aws::WAFRegional::Model::RateBasedRule::WithMatchPredicates
RateBasedRule & WithMatchPredicates(const Aws::Vector< Predicate > &value)
Definition: RateBasedRule.h:318
Aws::WAFRegional::Model::RateBasedRule::WithRuleId
RateBasedRule & WithRuleId(const char *value)
Definition: RateBasedRule.h:147
Aws::WAFRegional::Model::RateBasedRule::SetMetricName
void SetMetricName(const char *value)
Definition: RateBasedRule.h:247
Aws::WAFRegional::Model::RateBasedRule::WithName
RateBasedRule & WithName(const Aws::String &value)
Definition: RateBasedRule.h:184
Aws::WAFRegional::Model::RateBasedRule::NameHasBeenSet
bool NameHasBeenSet() const
Definition: RateBasedRule.h:160
Aws::WAFRegional::Model::RateBasedRule::SetMatchPredicates
void SetMatchPredicates(const Aws::Vector< Predicate > &value)
Definition: RateBasedRule.h:302
Aws::WAFRegional::Model::RateBasedRule::RateLimitHasBeenSet
bool RateLimitHasBeenSet() const
Definition: RateBasedRule.h:416
Aws::WAFRegional::Model::RateBasedRule::WithMetricName
RateBasedRule & WithMetricName(const Aws::String &value)
Definition: RateBasedRule.h:257
Aws::WAFRegional::Model::RateBasedRule::SetRateKey
void SetRateKey(RateKey &&value)
Definition: RateBasedRule.h:379
Aws::WAFRegional::Model::RateBasedRule::SetRuleId
void SetRuleId(const char *value)
Definition: RateBasedRule.h:114
Aws::WAFRegional::Model::RateBasedRule::MatchPredicatesHasBeenSet
bool MatchPredicatesHasBeenSet() const
Definition: RateBasedRule.h:294
Aws::WAFRegional::Model::RateBasedRule::WithRuleId
RateBasedRule & WithRuleId(Aws::String &&value)
Definition: RateBasedRule.h:136
Aws::WAFRegional::Model::RateBasedRule::RateBasedRule
RateBasedRule()
Aws::WAFRegional::Model::RateBasedRule::GetMetricName
const Aws::String & GetMetricName() const
Definition: RateBasedRule.h:207
Aws::WAFRegional::Model::RateBasedRule::WithRateLimit
RateBasedRule & WithRateLimit(long long value)
Definition: RateBasedRule.h:434
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWS_WAFREGIONAL_API
#define AWS_WAFREGIONAL_API
Definition: WAFRegional_EXPORTS.h:28
Aws::WAFRegional::Model::RateBasedRule::GetMatchPredicates
const Aws::Vector< Predicate > & GetMatchPredicates() const
Definition: RateBasedRule.h:286
Aws::WAFRegional::Model::RateBasedRule::MetricNameHasBeenSet
bool MetricNameHasBeenSet() const
Definition: RateBasedRule.h:217
AWSVector.h
Aws::WAFRegional::Model::RateBasedRule::WithMatchPredicates
RateBasedRule & WithMatchPredicates(Aws::Vector< Predicate > &&value)
Definition: RateBasedRule.h:326
Predicate.h
Aws::WAFRegional::Model::RateBasedRule::WithName
RateBasedRule & WithName(const char *value)
Definition: RateBasedRule.h:196
Aws::WAFRegional::Model::RateKey
RateKey
Definition: RateKey.h:17
Aws::WAFRegional::Model::RateBasedRule::WithRateKey
RateBasedRule & WithRateKey(const RateKey &value)
Definition: RateBasedRule.h:388
Aws::WAFRegional::Model::RateBasedRule::RateKeyHasBeenSet
bool RateKeyHasBeenSet() const
Definition: RateBasedRule.h:361
Aws::WAFRegional::Model::RateBasedRule::SetName
void SetName(const Aws::String &value)
Definition: RateBasedRule.h:166
Aws::WAFRegional::Model::RateBasedRule::RuleIdHasBeenSet
bool RuleIdHasBeenSet() const
Definition: RateBasedRule.h:81
Aws::WAFRegional::Model::RateBasedRule::SetRuleId
void SetRuleId(Aws::String &&value)
Definition: RateBasedRule.h:103
Aws::WAFRegional::Model::RateBasedRule::SetRateLimit
void SetRateLimit(long long value)
Definition: RateBasedRule.h:425
Aws::WAFRegional::Model::RateBasedRule::operator=
RateBasedRule & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::WAFRegional::Model::RateBasedRule::SetName
void SetName(Aws::String &&value)
Definition: RateBasedRule.h:172
Aws::WAFRegional::Model::RateBasedRule::GetName
const Aws::String & GetName() const
Definition: RateBasedRule.h:154
Aws::WAFRegional::Model::RateBasedRule::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
WAFRegional_EXPORTS.h
Aws::WAFRegional::Model::RateBasedRule::SetMetricName
void SetMetricName(const Aws::String &value)
Definition: RateBasedRule.h:227
Aws::WAFRegional::Model::RateBasedRule::SetMetricName
void SetMetricName(Aws::String &&value)
Definition: RateBasedRule.h:237
Aws::WAFRegional::Model::RateBasedRule::GetRuleId
const Aws::String & GetRuleId() const
Definition: RateBasedRule.h:70
Aws::WAFRegional::Model::RateBasedRule::WithName
RateBasedRule & WithName(Aws::String &&value)
Definition: RateBasedRule.h:190
Aws::WAFRegional::Model::RateBasedRule::SetRateKey
void SetRateKey(const RateKey &value)
Definition: RateBasedRule.h:370
Aws
Definition: AccessManagementClient.h:15
RateKey.h
Aws::WAFRegional::Model::RateBasedRule::RateBasedRule
RateBasedRule(Aws::Utils::Json::JsonView jsonValue)
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAFRegional::Model::RateBasedRule
Definition: RateBasedRule.h:53
Aws::WAFRegional::Model::RateBasedRule::AddMatchPredicates
RateBasedRule & AddMatchPredicates(Predicate &&value)
Definition: RateBasedRule.h:342
Aws::WAFRegional::Model::RateBasedRule::AddMatchPredicates
RateBasedRule & AddMatchPredicates(const Predicate &value)
Definition: RateBasedRule.h:334
Aws::WAFRegional::Model::RateBasedRule::SetRuleId
void SetRuleId(const Aws::String &value)
Definition: RateBasedRule.h:92
Aws::WAFRegional::Model::Predicate
Definition: Predicate.h:46
Aws::WAFRegional::Model::RateBasedRule::GetRateLimit
long long GetRateLimit() const
Definition: RateBasedRule.h:407
Aws::WAFRegional::Model::RateBasedRule::SetMatchPredicates
void SetMatchPredicates(Aws::Vector< Predicate > &&value)
Definition: RateBasedRule.h:310
Aws::WAFRegional::Model::RateBasedRule::WithMetricName
RateBasedRule & WithMetricName(const char *value)
Definition: RateBasedRule.h:277
Aws::WAFRegional::Model::RateBasedRule::WithRuleId
RateBasedRule & WithRuleId(const Aws::String &value)
Definition: RateBasedRule.h:125
Aws::WAFRegional::Model::RateBasedRule::SetName
void SetName(const char *value)
Definition: RateBasedRule.h:178
Aws::WAFRegional::Model::RateBasedRule::WithMetricName
RateBasedRule & WithMetricName(Aws::String &&value)
Definition: RateBasedRule.h:267
Aws::WAFRegional::Model::RateBasedRule::GetRateKey
const RateKey & GetRateKey() const
Definition: RateBasedRule.h:352