AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
StatefulRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
10#include <aws/network-firewall/model/Header.h>
11#include <aws/network-firewall/model/RuleOption.h>
12#include <aws/network-firewall/model/StatefulAction.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Cbor {
19class CborValue;
20} // namespace Cbor
21} // namespace Utils
22namespace NetworkFirewall {
23namespace Model {
24
36 public:
37 AWS_NETWORKFIREWALL_API StatefulRule() = default;
38 AWS_NETWORKFIREWALL_API StatefulRule(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
39 AWS_NETWORKFIREWALL_API StatefulRule& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
40 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
41
43
63 inline StatefulAction GetAction() const { return m_action; }
64 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
65 inline void SetAction(StatefulAction value) {
66 m_actionHasBeenSet = true;
67 m_action = value;
68 }
70 SetAction(value);
71 return *this;
72 }
74
76
80 inline const Header& GetHeader() const { return m_header; }
81 inline bool HeaderHasBeenSet() const { return m_headerHasBeenSet; }
82 template <typename HeaderT = Header>
83 void SetHeader(HeaderT&& value) {
84 m_headerHasBeenSet = true;
85 m_header = std::forward<HeaderT>(value);
86 }
87 template <typename HeaderT = Header>
88 StatefulRule& WithHeader(HeaderT&& value) {
89 SetHeader(std::forward<HeaderT>(value));
90 return *this;
91 }
93
95
99 inline const Aws::Vector<RuleOption>& GetRuleOptions() const { return m_ruleOptions; }
100 inline bool RuleOptionsHasBeenSet() const { return m_ruleOptionsHasBeenSet; }
101 template <typename RuleOptionsT = Aws::Vector<RuleOption>>
102 void SetRuleOptions(RuleOptionsT&& value) {
103 m_ruleOptionsHasBeenSet = true;
104 m_ruleOptions = std::forward<RuleOptionsT>(value);
105 }
106 template <typename RuleOptionsT = Aws::Vector<RuleOption>>
107 StatefulRule& WithRuleOptions(RuleOptionsT&& value) {
108 SetRuleOptions(std::forward<RuleOptionsT>(value));
109 return *this;
110 }
111 template <typename RuleOptionsT = RuleOption>
112 StatefulRule& AddRuleOptions(RuleOptionsT&& value) {
113 m_ruleOptionsHasBeenSet = true;
114 m_ruleOptions.emplace_back(std::forward<RuleOptionsT>(value));
115 return *this;
116 }
118 private:
120
121 Header m_header;
122
123 Aws::Vector<RuleOption> m_ruleOptions;
124 bool m_actionHasBeenSet = false;
125 bool m_headerHasBeenSet = false;
126 bool m_ruleOptionsHasBeenSet = false;
127};
128
129} // namespace Model
130} // namespace NetworkFirewall
131} // namespace Aws
AWS_NETWORKFIREWALL_API StatefulRule()=default
const Aws::Vector< RuleOption > & GetRuleOptions() const
void SetRuleOptions(RuleOptionsT &&value)
AWS_NETWORKFIREWALL_API StatefulRule(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetAction(StatefulAction value)
StatefulRule & WithHeader(HeaderT &&value)
StatefulRule & WithRuleOptions(RuleOptionsT &&value)
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
StatefulRule & WithAction(StatefulAction value)
StatefulRule & AddRuleOptions(RuleOptionsT &&value)
AWS_NETWORKFIREWALL_API StatefulRule & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::vector< T, Aws::Allocator< T > > Vector