AWS SDK for C++  0.14.3
AWS SDK for C++
ActivatedRule.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>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace WAF
30 {
31 namespace Model
32 {
33 
44  {
45  public:
46  ActivatedRule();
48  ActivatedRule& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
49  Aws::Utils::Json::JsonValue Jsonize() const;
50 
58  inline int GetPriority() const{ return m_priority; }
59 
67  inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
68 
76  inline ActivatedRule& WithPriority(int value) { SetPriority(value); return *this;}
77 
87  inline const Aws::String& GetRuleId() const{ return m_ruleId; }
88 
98  inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
99 
109  inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
110 
120  inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
121 
131  inline ActivatedRule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
132 
142  inline ActivatedRule& WithRuleId(Aws::String&& value) { SetRuleId(value); return *this;}
143 
153  inline ActivatedRule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
154 
165  inline const WafAction& GetAction() const{ return m_action; }
166 
177  inline void SetAction(const WafAction& value) { m_actionHasBeenSet = true; m_action = value; }
178 
189  inline void SetAction(WafAction&& value) { m_actionHasBeenSet = true; m_action = value; }
190 
201  inline ActivatedRule& WithAction(const WafAction& value) { SetAction(value); return *this;}
202 
213  inline ActivatedRule& WithAction(WafAction&& value) { SetAction(value); return *this;}
214 
215  private:
216  int m_priority;
217  bool m_priorityHasBeenSet;
218  Aws::String m_ruleId;
219  bool m_ruleIdHasBeenSet;
220  WafAction m_action;
221  bool m_actionHasBeenSet;
222  };
223 
224 } // namespace Model
225 } // namespace WAF
226 } // namespace Aws
ActivatedRule & WithRuleId(Aws::String &&value)
void SetRuleId(Aws::String &&value)
ActivatedRule & WithPriority(int value)
Definition: ActivatedRule.h:76
const WafAction & GetAction() const
void SetAction(WafAction &&value)
ActivatedRule & WithAction(const WafAction &value)
void SetAction(const WafAction &value)
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:37
ActivatedRule & WithRuleId(const Aws::String &value)
void SetRuleId(const char *value)
ActivatedRule & WithAction(WafAction &&value)
ActivatedRule & WithRuleId(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetRuleId() const
Definition: ActivatedRule.h:87
void SetRuleId(const Aws::String &value)
Definition: ActivatedRule.h:98
JSON (JavaScript Object Notation).