AWS SDK for C++  0.14.3
AWS SDK for C++
WebACL.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/waf/WAF_EXPORTS.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Json
27 {
28  class JsonValue;
29 } // namespace Json
30 } // namespace Utils
31 namespace WAF
32 {
33 namespace Model
34 {
35 
49  {
50  public:
51  WebACL();
52  WebACL(const Aws::Utils::Json::JsonValue& jsonValue);
53  WebACL& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
54  Aws::Utils::Json::JsonValue Jsonize() const;
55 
63  inline const Aws::String& GetWebACLId() const{ return m_webACLId; }
64 
72  inline void SetWebACLId(const Aws::String& value) { m_webACLIdHasBeenSet = true; m_webACLId = value; }
73 
81  inline void SetWebACLId(Aws::String&& value) { m_webACLIdHasBeenSet = true; m_webACLId = value; }
82 
90  inline void SetWebACLId(const char* value) { m_webACLIdHasBeenSet = true; m_webACLId.assign(value); }
91 
99  inline WebACL& WithWebACLId(const Aws::String& value) { SetWebACLId(value); return *this;}
100 
108  inline WebACL& WithWebACLId(Aws::String&& value) { SetWebACLId(value); return *this;}
109 
117  inline WebACL& WithWebACLId(const char* value) { SetWebACLId(value); return *this;}
118 
123  inline const Aws::String& GetName() const{ return m_name; }
124 
129  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
130 
135  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
136 
141  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
142 
147  inline WebACL& WithName(const Aws::String& value) { SetName(value); return *this;}
148 
153  inline WebACL& WithName(Aws::String&& value) { SetName(value); return *this;}
154 
159  inline WebACL& WithName(const char* value) { SetName(value); return *this;}
160 
161 
162  inline const Aws::String& GetMetricName() const{ return m_metricName; }
163 
164 
165  inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
166 
167 
168  inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
169 
170 
171  inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
172 
173 
174  inline WebACL& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
175 
176 
177  inline WebACL& WithMetricName(Aws::String&& value) { SetMetricName(value); return *this;}
178 
179 
180  inline WebACL& WithMetricName(const char* value) { SetMetricName(value); return *this;}
181 
187  inline const WafAction& GetDefaultAction() const{ return m_defaultAction; }
188 
194  inline void SetDefaultAction(const WafAction& value) { m_defaultActionHasBeenSet = true; m_defaultAction = value; }
195 
201  inline void SetDefaultAction(WafAction&& value) { m_defaultActionHasBeenSet = true; m_defaultAction = value; }
202 
208  inline WebACL& WithDefaultAction(const WafAction& value) { SetDefaultAction(value); return *this;}
209 
215  inline WebACL& WithDefaultAction(WafAction&& value) { SetDefaultAction(value); return *this;}
216 
222  inline const Aws::Vector<ActivatedRule>& GetRules() const{ return m_rules; }
223 
229  inline void SetRules(const Aws::Vector<ActivatedRule>& value) { m_rulesHasBeenSet = true; m_rules = value; }
230 
236  inline void SetRules(Aws::Vector<ActivatedRule>&& value) { m_rulesHasBeenSet = true; m_rules = value; }
237 
243  inline WebACL& WithRules(const Aws::Vector<ActivatedRule>& value) { SetRules(value); return *this;}
244 
250  inline WebACL& WithRules(Aws::Vector<ActivatedRule>&& value) { SetRules(value); return *this;}
251 
257  inline WebACL& AddRules(const ActivatedRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
258 
264  inline WebACL& AddRules(ActivatedRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
265 
266  private:
267  Aws::String m_webACLId;
268  bool m_webACLIdHasBeenSet;
269  Aws::String m_name;
270  bool m_nameHasBeenSet;
271  Aws::String m_metricName;
272  bool m_metricNameHasBeenSet;
273  WafAction m_defaultAction;
274  bool m_defaultActionHasBeenSet;
276  bool m_rulesHasBeenSet;
277  };
278 
279 } // namespace Model
280 } // namespace WAF
281 } // namespace Aws
const Aws::String & GetWebACLId() const
Definition: WebACL.h:63
WebACL & WithMetricName(const char *value)
Definition: WebACL.h:180
WebACL & WithName(const Aws::String &value)
Definition: WebACL.h:147
WebACL & WithWebACLId(const Aws::String &value)
Definition: WebACL.h:99
WebACL & WithName(Aws::String &&value)
Definition: WebACL.h:153
void SetMetricName(Aws::String &&value)
Definition: WebACL.h:168
void SetRules(Aws::Vector< ActivatedRule > &&value)
Definition: WebACL.h:236
void SetName(Aws::String &&value)
Definition: WebACL.h:135
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
WebACL & WithRules(const Aws::Vector< ActivatedRule > &value)
Definition: WebACL.h:243
WebACL & WithRules(Aws::Vector< ActivatedRule > &&value)
Definition: WebACL.h:250
void SetMetricName(const char *value)
Definition: WebACL.h:171
const WafAction & GetDefaultAction() const
Definition: WebACL.h:187
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:37
WebACL & WithDefaultAction(WafAction &&value)
Definition: WebACL.h:215
const Aws::String & GetMetricName() const
Definition: WebACL.h:162
void SetMetricName(const Aws::String &value)
Definition: WebACL.h:165
void SetDefaultAction(WafAction &&value)
Definition: WebACL.h:201
WebACL & WithWebACLId(Aws::String &&value)
Definition: WebACL.h:108
WebACL & WithWebACLId(const char *value)
Definition: WebACL.h:117
const Aws::String & GetName() const
Definition: WebACL.h:123
void SetWebACLId(Aws::String &&value)
Definition: WebACL.h:81
void SetDefaultAction(const WafAction &value)
Definition: WebACL.h:194
void SetRules(const Aws::Vector< ActivatedRule > &value)
Definition: WebACL.h:229
WebACL & WithDefaultAction(const WafAction &value)
Definition: WebACL.h:208
WebACL & WithName(const char *value)
Definition: WebACL.h:159
const Aws::Vector< ActivatedRule > & GetRules() const
Definition: WebACL.h:222
WebACL & AddRules(ActivatedRule &&value)
Definition: WebACL.h:264
void SetName(const Aws::String &value)
Definition: WebACL.h:129
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetWebACLId(const char *value)
Definition: WebACL.h:90
WebACL & WithMetricName(const Aws::String &value)
Definition: WebACL.h:174
void SetName(const char *value)
Definition: WebACL.h:141
WebACL & WithMetricName(Aws::String &&value)
Definition: WebACL.h:177
WebACL & AddRules(const ActivatedRule &value)
Definition: WebACL.h:257
void SetWebACLId(const Aws::String &value)
Definition: WebACL.h:72
JSON (JavaScript Object Notation).