AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
WebACL.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/waf-regional/model/WafAction.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/waf-regional/model/ActivatedRule.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
51 class WebACL
52 {
53 public:
54 AWS_WAFREGIONAL_API WebACL() = default;
55 AWS_WAFREGIONAL_API WebACL(Aws::Utils::Json::JsonView jsonValue);
56 AWS_WAFREGIONAL_API WebACL& operator=(Aws::Utils::Json::JsonView jsonValue);
57 AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const;
58
59
61
68 inline const Aws::String& GetWebACLId() const { return m_webACLId; }
69 inline bool WebACLIdHasBeenSet() const { return m_webACLIdHasBeenSet; }
70 template<typename WebACLIdT = Aws::String>
71 void SetWebACLId(WebACLIdT&& value) { m_webACLIdHasBeenSet = true; m_webACLId = std::forward<WebACLIdT>(value); }
72 template<typename WebACLIdT = Aws::String>
73 WebACL& WithWebACLId(WebACLIdT&& value) { SetWebACLId(std::forward<WebACLIdT>(value)); return *this;}
75
77
81 inline const Aws::String& GetName() const { return m_name; }
82 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
83 template<typename NameT = Aws::String>
84 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
85 template<typename NameT = Aws::String>
86 WebACL& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
88
90
97 inline const Aws::String& GetMetricName() const { return m_metricName; }
98 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
99 template<typename MetricNameT = Aws::String>
100 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
101 template<typename MetricNameT = Aws::String>
102 WebACL& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
104
106
111 inline const WafAction& GetDefaultAction() const { return m_defaultAction; }
112 inline bool DefaultActionHasBeenSet() const { return m_defaultActionHasBeenSet; }
113 template<typename DefaultActionT = WafAction>
114 void SetDefaultAction(DefaultActionT&& value) { m_defaultActionHasBeenSet = true; m_defaultAction = std::forward<DefaultActionT>(value); }
115 template<typename DefaultActionT = WafAction>
116 WebACL& WithDefaultAction(DefaultActionT&& value) { SetDefaultAction(std::forward<DefaultActionT>(value)); return *this;}
118
120
125 inline const Aws::Vector<ActivatedRule>& GetRules() const { return m_rules; }
126 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
127 template<typename RulesT = Aws::Vector<ActivatedRule>>
128 void SetRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules = std::forward<RulesT>(value); }
129 template<typename RulesT = Aws::Vector<ActivatedRule>>
130 WebACL& WithRules(RulesT&& value) { SetRules(std::forward<RulesT>(value)); return *this;}
131 template<typename RulesT = ActivatedRule>
132 WebACL& AddRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules.emplace_back(std::forward<RulesT>(value)); return *this; }
134
136
139 inline const Aws::String& GetWebACLArn() const { return m_webACLArn; }
140 inline bool WebACLArnHasBeenSet() const { return m_webACLArnHasBeenSet; }
141 template<typename WebACLArnT = Aws::String>
142 void SetWebACLArn(WebACLArnT&& value) { m_webACLArnHasBeenSet = true; m_webACLArn = std::forward<WebACLArnT>(value); }
143 template<typename WebACLArnT = Aws::String>
144 WebACL& WithWebACLArn(WebACLArnT&& value) { SetWebACLArn(std::forward<WebACLArnT>(value)); return *this;}
146 private:
147
148 Aws::String m_webACLId;
149 bool m_webACLIdHasBeenSet = false;
150
151 Aws::String m_name;
152 bool m_nameHasBeenSet = false;
153
154 Aws::String m_metricName;
155 bool m_metricNameHasBeenSet = false;
156
157 WafAction m_defaultAction;
158 bool m_defaultActionHasBeenSet = false;
159
161 bool m_rulesHasBeenSet = false;
162
163 Aws::String m_webACLArn;
164 bool m_webACLArnHasBeenSet = false;
165 };
166
167} // namespace Model
168} // namespace WAFRegional
169} // namespace Aws
bool MetricNameHasBeenSet() const
Definition WebACL.h:98
void SetRules(RulesT &&value)
Definition WebACL.h:128
AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const
void SetWebACLArn(WebACLArnT &&value)
Definition WebACL.h:142
const Aws::String & GetWebACLId() const
Definition WebACL.h:68
WebACL & WithWebACLId(WebACLIdT &&value)
Definition WebACL.h:73
const Aws::String & GetMetricName() const
Definition WebACL.h:97
WebACL & WithRules(RulesT &&value)
Definition WebACL.h:130
const WafAction & GetDefaultAction() const
Definition WebACL.h:111
WebACL & AddRules(RulesT &&value)
Definition WebACL.h:132
AWS_WAFREGIONAL_API WebACL & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetWebACLArn() const
Definition WebACL.h:139
const Aws::Vector< ActivatedRule > & GetRules() const
Definition WebACL.h:125
void SetWebACLId(WebACLIdT &&value)
Definition WebACL.h:71
void SetDefaultAction(DefaultActionT &&value)
Definition WebACL.h:114
AWS_WAFREGIONAL_API WebACL(Aws::Utils::Json::JsonView jsonValue)
WebACL & WithMetricName(MetricNameT &&value)
Definition WebACL.h:102
WebACL & WithWebACLArn(WebACLArnT &&value)
Definition WebACL.h:144
bool DefaultActionHasBeenSet() const
Definition WebACL.h:112
bool WebACLIdHasBeenSet() const
Definition WebACL.h:69
bool WebACLArnHasBeenSet() const
Definition WebACL.h:140
const Aws::String & GetName() const
Definition WebACL.h:81
void SetMetricName(MetricNameT &&value)
Definition WebACL.h:100
void SetName(NameT &&value)
Definition WebACL.h:84
WebACL & WithName(NameT &&value)
Definition WebACL.h:86
WebACL & WithDefaultAction(DefaultActionT &&value)
Definition WebACL.h:116
AWS_WAFREGIONAL_API WebACL()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue