AWS SDK for C++

AWS SDK for C++ Version 1.11.929

Loading...
Searching...
No Matches
WafConfig.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/lightsail/Lightsail_EXPORTS.h>
9#include <aws/lightsail/model/WafRule.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Lightsail {
21namespace Model {
22
29class WafConfig {
30 public:
31 AWS_LIGHTSAIL_API WafConfig() = default;
32 AWS_LIGHTSAIL_API WafConfig(Aws::Utils::Json::JsonView jsonValue);
33 AWS_LIGHTSAIL_API WafConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline bool GetIsWafEnabled() const { return m_isWafEnabled; }
41 inline bool IsWafEnabledHasBeenSet() const { return m_isWafEnabledHasBeenSet; }
42 inline void SetIsWafEnabled(bool value) {
43 m_isWafEnabledHasBeenSet = true;
44 m_isWafEnabled = value;
45 }
46 inline WafConfig& WithIsWafEnabled(bool value) {
47 SetIsWafEnabled(value);
48 return *this;
49 }
51
53
57 inline const Aws::Vector<WafRule>& GetWafRules() const { return m_wafRules; }
58 inline bool WafRulesHasBeenSet() const { return m_wafRulesHasBeenSet; }
59 template <typename WafRulesT = Aws::Vector<WafRule>>
60 void SetWafRules(WafRulesT&& value) {
61 m_wafRulesHasBeenSet = true;
62 m_wafRules = std::forward<WafRulesT>(value);
63 }
64 template <typename WafRulesT = Aws::Vector<WafRule>>
65 WafConfig& WithWafRules(WafRulesT&& value) {
66 SetWafRules(std::forward<WafRulesT>(value));
67 return *this;
68 }
69 template <typename WafRulesT = WafRule>
70 WafConfig& AddWafRules(WafRulesT&& value) {
71 m_wafRulesHasBeenSet = true;
72 m_wafRules.emplace_back(std::forward<WafRulesT>(value));
73 return *this;
74 }
76 private:
77 bool m_isWafEnabled{false};
78
79 Aws::Vector<WafRule> m_wafRules;
80 bool m_isWafEnabledHasBeenSet = false;
81 bool m_wafRulesHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace Lightsail
86} // namespace Aws
AWS_LIGHTSAIL_API WafConfig()=default
void SetIsWafEnabled(bool value)
Definition WafConfig.h:42
WafConfig & WithIsWafEnabled(bool value)
Definition WafConfig.h:46
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< WafRule > & GetWafRules() const
Definition WafConfig.h:57
AWS_LIGHTSAIL_API WafConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetWafRules(WafRulesT &&value)
Definition WafConfig.h:60
WafConfig & AddWafRules(WafRulesT &&value)
Definition WafConfig.h:70
AWS_LIGHTSAIL_API WafConfig(Aws::Utils::Json::JsonView jsonValue)
WafConfig & WithWafRules(WafRulesT &&value)
Definition WafConfig.h:65
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue