AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
RuleAction.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/model/BlockAction.h>
9#include <aws/wafv2/model/AllowAction.h>
10#include <aws/wafv2/model/CountAction.h>
11#include <aws/wafv2/model/CaptchaAction.h>
12#include <aws/wafv2/model/ChallengeAction.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace WAFV2
26{
27namespace Model
28{
29
38 {
39 public:
40 AWS_WAFV2_API RuleAction() = default;
43 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
50 inline const BlockAction& GetBlock() const { return m_block; }
51 inline bool BlockHasBeenSet() const { return m_blockHasBeenSet; }
52 template<typename BlockT = BlockAction>
53 void SetBlock(BlockT&& value) { m_blockHasBeenSet = true; m_block = std::forward<BlockT>(value); }
54 template<typename BlockT = BlockAction>
55 RuleAction& WithBlock(BlockT&& value) { SetBlock(std::forward<BlockT>(value)); return *this;}
57
59
62 inline const AllowAction& GetAllow() const { return m_allow; }
63 inline bool AllowHasBeenSet() const { return m_allowHasBeenSet; }
64 template<typename AllowT = AllowAction>
65 void SetAllow(AllowT&& value) { m_allowHasBeenSet = true; m_allow = std::forward<AllowT>(value); }
66 template<typename AllowT = AllowAction>
67 RuleAction& WithAllow(AllowT&& value) { SetAllow(std::forward<AllowT>(value)); return *this;}
69
71
75 inline const CountAction& GetCount() const { return m_count; }
76 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
77 template<typename CountT = CountAction>
78 void SetCount(CountT&& value) { m_countHasBeenSet = true; m_count = std::forward<CountT>(value); }
79 template<typename CountT = CountAction>
80 RuleAction& WithCount(CountT&& value) { SetCount(std::forward<CountT>(value)); return *this;}
82
84
88 inline const CaptchaAction& GetCaptcha() const { return m_captcha; }
89 inline bool CaptchaHasBeenSet() const { return m_captchaHasBeenSet; }
90 template<typename CaptchaT = CaptchaAction>
91 void SetCaptcha(CaptchaT&& value) { m_captchaHasBeenSet = true; m_captcha = std::forward<CaptchaT>(value); }
92 template<typename CaptchaT = CaptchaAction>
93 RuleAction& WithCaptcha(CaptchaT&& value) { SetCaptcha(std::forward<CaptchaT>(value)); return *this;}
95
97
101 inline const ChallengeAction& GetChallenge() const { return m_challenge; }
102 inline bool ChallengeHasBeenSet() const { return m_challengeHasBeenSet; }
103 template<typename ChallengeT = ChallengeAction>
104 void SetChallenge(ChallengeT&& value) { m_challengeHasBeenSet = true; m_challenge = std::forward<ChallengeT>(value); }
105 template<typename ChallengeT = ChallengeAction>
106 RuleAction& WithChallenge(ChallengeT&& value) { SetChallenge(std::forward<ChallengeT>(value)); return *this;}
108 private:
109
110 BlockAction m_block;
111 bool m_blockHasBeenSet = false;
112
113 AllowAction m_allow;
114 bool m_allowHasBeenSet = false;
115
116 CountAction m_count;
117 bool m_countHasBeenSet = false;
118
119 CaptchaAction m_captcha;
120 bool m_captchaHasBeenSet = false;
121
122 ChallengeAction m_challenge;
123 bool m_challengeHasBeenSet = false;
124 };
125
126} // namespace Model
127} // namespace WAFV2
128} // namespace Aws
AWS_WAFV2_API RuleAction & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetBlock(BlockT &&value)
Definition RuleAction.h:53
RuleAction & WithBlock(BlockT &&value)
Definition RuleAction.h:55
const CaptchaAction & GetCaptcha() const
Definition RuleAction.h:88
RuleAction & WithCaptcha(CaptchaT &&value)
Definition RuleAction.h:93
const AllowAction & GetAllow() const
Definition RuleAction.h:62
void SetChallenge(ChallengeT &&value)
Definition RuleAction.h:104
AWS_WAFV2_API RuleAction()=default
void SetCaptcha(CaptchaT &&value)
Definition RuleAction.h:91
const CountAction & GetCount() const
Definition RuleAction.h:75
RuleAction & WithCount(CountT &&value)
Definition RuleAction.h:80
RuleAction & WithChallenge(ChallengeT &&value)
Definition RuleAction.h:106
void SetCount(CountT &&value)
Definition RuleAction.h:78
const ChallengeAction & GetChallenge() const
Definition RuleAction.h:101
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
RuleAction & WithAllow(AllowT &&value)
Definition RuleAction.h:67
const BlockAction & GetBlock() const
Definition RuleAction.h:50
AWS_WAFV2_API RuleAction(Aws::Utils::Json::JsonView jsonValue)
void SetAllow(AllowT &&value)
Definition RuleAction.h:65
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue