AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
RulesSource.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
11#include <aws/network-firewall/model/RulesSourceList.h>
12#include <aws/network-firewall/model/StatefulRule.h>
13#include <aws/network-firewall/model/StatelessRulesAndCustomActions.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Cbor {
20class CborValue;
21} // namespace Cbor
22} // namespace Utils
23namespace NetworkFirewall {
24namespace Model {
25
35 public:
36 AWS_NETWORKFIREWALL_API RulesSource() = default;
37 AWS_NETWORKFIREWALL_API RulesSource(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_NETWORKFIREWALL_API RulesSource& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
39 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
40
42
52 inline const Aws::String& GetRulesString() const { return m_rulesString; }
53 inline bool RulesStringHasBeenSet() const { return m_rulesStringHasBeenSet; }
54 template <typename RulesStringT = Aws::String>
55 void SetRulesString(RulesStringT&& value) {
56 m_rulesStringHasBeenSet = true;
57 m_rulesString = std::forward<RulesStringT>(value);
58 }
59 template <typename RulesStringT = Aws::String>
60 RulesSource& WithRulesString(RulesStringT&& value) {
61 SetRulesString(std::forward<RulesStringT>(value));
62 return *this;
63 }
65
67
70 inline const RulesSourceList& GetRulesSourceList() const { return m_rulesSourceList; }
71 inline bool RulesSourceListHasBeenSet() const { return m_rulesSourceListHasBeenSet; }
72 template <typename RulesSourceListT = RulesSourceList>
73 void SetRulesSourceList(RulesSourceListT&& value) {
74 m_rulesSourceListHasBeenSet = true;
75 m_rulesSourceList = std::forward<RulesSourceListT>(value);
76 }
77 template <typename RulesSourceListT = RulesSourceList>
78 RulesSource& WithRulesSourceList(RulesSourceListT&& value) {
79 SetRulesSourceList(std::forward<RulesSourceListT>(value));
80 return *this;
81 }
83
85
93 inline const Aws::Vector<StatefulRule>& GetStatefulRules() const { return m_statefulRules; }
94 inline bool StatefulRulesHasBeenSet() const { return m_statefulRulesHasBeenSet; }
95 template <typename StatefulRulesT = Aws::Vector<StatefulRule>>
96 void SetStatefulRules(StatefulRulesT&& value) {
97 m_statefulRulesHasBeenSet = true;
98 m_statefulRules = std::forward<StatefulRulesT>(value);
99 }
100 template <typename StatefulRulesT = Aws::Vector<StatefulRule>>
101 RulesSource& WithStatefulRules(StatefulRulesT&& value) {
102 SetStatefulRules(std::forward<StatefulRulesT>(value));
103 return *this;
104 }
105 template <typename StatefulRulesT = StatefulRule>
106 RulesSource& AddStatefulRules(StatefulRulesT&& value) {
107 m_statefulRulesHasBeenSet = true;
108 m_statefulRules.emplace_back(std::forward<StatefulRulesT>(value));
109 return *this;
110 }
112
114
117 inline const StatelessRulesAndCustomActions& GetStatelessRulesAndCustomActions() const { return m_statelessRulesAndCustomActions; }
118 inline bool StatelessRulesAndCustomActionsHasBeenSet() const { return m_statelessRulesAndCustomActionsHasBeenSet; }
119 template <typename StatelessRulesAndCustomActionsT = StatelessRulesAndCustomActions>
120 void SetStatelessRulesAndCustomActions(StatelessRulesAndCustomActionsT&& value) {
121 m_statelessRulesAndCustomActionsHasBeenSet = true;
122 m_statelessRulesAndCustomActions = std::forward<StatelessRulesAndCustomActionsT>(value);
123 }
124 template <typename StatelessRulesAndCustomActionsT = StatelessRulesAndCustomActions>
125 RulesSource& WithStatelessRulesAndCustomActions(StatelessRulesAndCustomActionsT&& value) {
126 SetStatelessRulesAndCustomActions(std::forward<StatelessRulesAndCustomActionsT>(value));
127 return *this;
128 }
130 private:
131 Aws::String m_rulesString;
132
133 RulesSourceList m_rulesSourceList;
134
135 Aws::Vector<StatefulRule> m_statefulRules;
136
137 StatelessRulesAndCustomActions m_statelessRulesAndCustomActions;
138 bool m_rulesStringHasBeenSet = false;
139 bool m_rulesSourceListHasBeenSet = false;
140 bool m_statefulRulesHasBeenSet = false;
141 bool m_statelessRulesAndCustomActionsHasBeenSet = false;
142};
143
144} // namespace Model
145} // namespace NetworkFirewall
146} // namespace Aws
void SetRulesSourceList(RulesSourceListT &&value)
Definition RulesSource.h:73
AWS_NETWORKFIREWALL_API RulesSource(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
RulesSource & WithRulesSourceList(RulesSourceListT &&value)
Definition RulesSource.h:78
const StatelessRulesAndCustomActions & GetStatelessRulesAndCustomActions() const
AWS_NETWORKFIREWALL_API RulesSource & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetRulesString(RulesStringT &&value)
Definition RulesSource.h:55
RulesSource & WithRulesString(RulesStringT &&value)
Definition RulesSource.h:60
void SetStatelessRulesAndCustomActions(StatelessRulesAndCustomActionsT &&value)
const Aws::Vector< StatefulRule > & GetStatefulRules() const
Definition RulesSource.h:93
RulesSource & WithStatefulRules(StatefulRulesT &&value)
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_NETWORKFIREWALL_API RulesSource()=default
RulesSource & WithStatelessRulesAndCustomActions(StatelessRulesAndCustomActionsT &&value)
RulesSource & AddStatefulRules(StatefulRulesT &&value)
const Aws::String & GetRulesString() const
Definition RulesSource.h:52
const RulesSourceList & GetRulesSourceList() const
Definition RulesSource.h:70
void SetStatefulRules(StatefulRulesT &&value)
Definition RulesSource.h:96
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector