AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Rule.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/Predicate.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace WAFRegional
24{
25namespace Model
26{
27
51 class Rule
52 {
53 public:
54 AWS_WAFREGIONAL_API Rule() = default;
55 AWS_WAFREGIONAL_API Rule(Aws::Utils::Json::JsonView jsonValue);
56 AWS_WAFREGIONAL_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
57 AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const;
58
59
61
70 inline const Aws::String& GetRuleId() const { return m_ruleId; }
71 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
72 template<typename RuleIdT = Aws::String>
73 void SetRuleId(RuleIdT&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::forward<RuleIdT>(value); }
74 template<typename RuleIdT = Aws::String>
75 Rule& WithRuleId(RuleIdT&& value) { SetRuleId(std::forward<RuleIdT>(value)); return *this;}
77
79
83 inline const Aws::String& GetName() const { return m_name; }
84 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
85 template<typename NameT = Aws::String>
86 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
87 template<typename NameT = Aws::String>
88 Rule& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
90
92
99 inline const Aws::String& GetMetricName() const { return m_metricName; }
100 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
101 template<typename MetricNameT = Aws::String>
102 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
103 template<typename MetricNameT = Aws::String>
104 Rule& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
106
108
114 inline const Aws::Vector<Predicate>& GetPredicates() const { return m_predicates; }
115 inline bool PredicatesHasBeenSet() const { return m_predicatesHasBeenSet; }
116 template<typename PredicatesT = Aws::Vector<Predicate>>
117 void SetPredicates(PredicatesT&& value) { m_predicatesHasBeenSet = true; m_predicates = std::forward<PredicatesT>(value); }
118 template<typename PredicatesT = Aws::Vector<Predicate>>
119 Rule& WithPredicates(PredicatesT&& value) { SetPredicates(std::forward<PredicatesT>(value)); return *this;}
120 template<typename PredicatesT = Predicate>
121 Rule& AddPredicates(PredicatesT&& value) { m_predicatesHasBeenSet = true; m_predicates.emplace_back(std::forward<PredicatesT>(value)); return *this; }
123 private:
124
125 Aws::String m_ruleId;
126 bool m_ruleIdHasBeenSet = false;
127
128 Aws::String m_name;
129 bool m_nameHasBeenSet = false;
130
131 Aws::String m_metricName;
132 bool m_metricNameHasBeenSet = false;
133
134 Aws::Vector<Predicate> m_predicates;
135 bool m_predicatesHasBeenSet = false;
136 };
137
138} // namespace Model
139} // namespace WAFRegional
140} // namespace Aws
Rule & WithPredicates(PredicatesT &&value)
Definition Rule.h:119
const Aws::String & GetName() const
Definition Rule.h:83
bool RuleIdHasBeenSet() const
Definition Rule.h:71
bool MetricNameHasBeenSet() const
Definition Rule.h:100
AWS_WAFREGIONAL_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetName(NameT &&value)
Definition Rule.h:86
AWS_WAFREGIONAL_API Rule()=default
const Aws::String & GetRuleId() const
Definition Rule.h:70
AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const
bool PredicatesHasBeenSet() const
Definition Rule.h:115
void SetRuleId(RuleIdT &&value)
Definition Rule.h:73
bool NameHasBeenSet() const
Definition Rule.h:84
AWS_WAFREGIONAL_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithMetricName(MetricNameT &&value)
Definition Rule.h:104
Rule & WithName(NameT &&value)
Definition Rule.h:88
void SetPredicates(PredicatesT &&value)
Definition Rule.h:117
const Aws::Vector< Predicate > & GetPredicates() const
Definition Rule.h:114
const Aws::String & GetMetricName() const
Definition Rule.h:99
Rule & WithRuleId(RuleIdT &&value)
Definition Rule.h:75
Rule & AddPredicates(PredicatesT &&value)
Definition Rule.h:121
void SetMetricName(MetricNameT &&value)
Definition Rule.h:102
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue