AWS SDK for C++

AWS SDK for C++ Version 1.11.932

Loading...
Searching...
No Matches
RuleAction.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/model/AllowAction.h>
9#include <aws/wafv2/model/BlockAction.h>
10#include <aws/wafv2/model/CaptchaAction.h>
11#include <aws/wafv2/model/ChallengeAction.h>
12#include <aws/wafv2/model/CountAction.h>
13#include <aws/wafv2/model/MonetizeAction.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace WAFV2 {
25namespace Model {
26
35 public:
36 AWS_WAFV2_API RuleAction() = default;
37 AWS_WAFV2_API RuleAction(Aws::Utils::Json::JsonView jsonValue);
39 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const BlockAction& GetBlock() const { return m_block; }
46 inline bool BlockHasBeenSet() const { return m_blockHasBeenSet; }
47 template <typename BlockT = BlockAction>
48 void SetBlock(BlockT&& value) {
49 m_blockHasBeenSet = true;
50 m_block = std::forward<BlockT>(value);
51 }
52 template <typename BlockT = BlockAction>
53 RuleAction& WithBlock(BlockT&& value) {
54 SetBlock(std::forward<BlockT>(value));
55 return *this;
56 }
58
60
63 inline const AllowAction& GetAllow() const { return m_allow; }
64 inline bool AllowHasBeenSet() const { return m_allowHasBeenSet; }
65 template <typename AllowT = AllowAction>
66 void SetAllow(AllowT&& value) {
67 m_allowHasBeenSet = true;
68 m_allow = std::forward<AllowT>(value);
69 }
70 template <typename AllowT = AllowAction>
71 RuleAction& WithAllow(AllowT&& value) {
72 SetAllow(std::forward<AllowT>(value));
73 return *this;
74 }
76
78
82 inline const CountAction& GetCount() const { return m_count; }
83 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
84 template <typename CountT = CountAction>
85 void SetCount(CountT&& value) {
86 m_countHasBeenSet = true;
87 m_count = std::forward<CountT>(value);
88 }
89 template <typename CountT = CountAction>
90 RuleAction& WithCount(CountT&& value) {
91 SetCount(std::forward<CountT>(value));
92 return *this;
93 }
95
97
101 inline const CaptchaAction& GetCaptcha() const { return m_captcha; }
102 inline bool CaptchaHasBeenSet() const { return m_captchaHasBeenSet; }
103 template <typename CaptchaT = CaptchaAction>
104 void SetCaptcha(CaptchaT&& value) {
105 m_captchaHasBeenSet = true;
106 m_captcha = std::forward<CaptchaT>(value);
107 }
108 template <typename CaptchaT = CaptchaAction>
109 RuleAction& WithCaptcha(CaptchaT&& value) {
110 SetCaptcha(std::forward<CaptchaT>(value));
111 return *this;
112 }
114
116
120 inline const ChallengeAction& GetChallenge() const { return m_challenge; }
121 inline bool ChallengeHasBeenSet() const { return m_challengeHasBeenSet; }
122 template <typename ChallengeT = ChallengeAction>
123 void SetChallenge(ChallengeT&& value) {
124 m_challengeHasBeenSet = true;
125 m_challenge = std::forward<ChallengeT>(value);
126 }
127 template <typename ChallengeT = ChallengeAction>
128 RuleAction& WithChallenge(ChallengeT&& value) {
129 SetChallenge(std::forward<ChallengeT>(value));
130 return *this;
131 }
133
135
143 inline const MonetizeAction& GetMonetize() const { return m_monetize; }
144 inline bool MonetizeHasBeenSet() const { return m_monetizeHasBeenSet; }
145 template <typename MonetizeT = MonetizeAction>
146 void SetMonetize(MonetizeT&& value) {
147 m_monetizeHasBeenSet = true;
148 m_monetize = std::forward<MonetizeT>(value);
149 }
150 template <typename MonetizeT = MonetizeAction>
151 RuleAction& WithMonetize(MonetizeT&& value) {
152 SetMonetize(std::forward<MonetizeT>(value));
153 return *this;
154 }
156 private:
157 BlockAction m_block;
158
159 AllowAction m_allow;
160
161 CountAction m_count;
162
163 CaptchaAction m_captcha;
164
165 ChallengeAction m_challenge;
166
167 MonetizeAction m_monetize;
168 bool m_blockHasBeenSet = false;
169 bool m_allowHasBeenSet = false;
170 bool m_countHasBeenSet = false;
171 bool m_captchaHasBeenSet = false;
172 bool m_challengeHasBeenSet = false;
173 bool m_monetizeHasBeenSet = false;
174};
175
176} // namespace Model
177} // namespace WAFV2
178} // namespace Aws
AWS_WAFV2_API RuleAction & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetBlock(BlockT &&value)
Definition RuleAction.h:48
RuleAction & WithBlock(BlockT &&value)
Definition RuleAction.h:53
const CaptchaAction & GetCaptcha() const
Definition RuleAction.h:101
RuleAction & WithCaptcha(CaptchaT &&value)
Definition RuleAction.h:109
const AllowAction & GetAllow() const
Definition RuleAction.h:63
void SetChallenge(ChallengeT &&value)
Definition RuleAction.h:123
AWS_WAFV2_API RuleAction()=default
void SetCaptcha(CaptchaT &&value)
Definition RuleAction.h:104
const CountAction & GetCount() const
Definition RuleAction.h:82
RuleAction & WithCount(CountT &&value)
Definition RuleAction.h:90
RuleAction & WithChallenge(ChallengeT &&value)
Definition RuleAction.h:128
void SetMonetize(MonetizeT &&value)
Definition RuleAction.h:146
void SetCount(CountT &&value)
Definition RuleAction.h:85
const ChallengeAction & GetChallenge() const
Definition RuleAction.h:120
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
const MonetizeAction & GetMonetize() const
Definition RuleAction.h:143
RuleAction & WithAllow(AllowT &&value)
Definition RuleAction.h:71
const BlockAction & GetBlock() const
Definition RuleAction.h:45
AWS_WAFV2_API RuleAction(Aws::Utils::Json::JsonView jsonValue)
void SetAllow(AllowT &&value)
Definition RuleAction.h:66
RuleAction & WithMonetize(MonetizeT &&value)
Definition RuleAction.h:151
Aws::Utils::Json::JsonValue JsonValue