AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
FirewallRule.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/ActionScope.h>
12#include <aws/network-firewall/model/FirewallRuleAction.h>
13#include <aws/network-firewall/model/FirewallRuleProtocol.h>
14#include <aws/network-firewall/model/HookKey.h>
15#include <aws/network-firewall/model/RuleMetadata.h>
16#include <aws/network-firewall/model/RuleOption.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Cbor {
23class CborValue;
24} // namespace Cbor
25} // namespace Utils
26namespace NetworkFirewall {
27namespace Model {
28
41 public:
42 AWS_NETWORKFIREWALL_API FirewallRule() = default;
43 AWS_NETWORKFIREWALL_API FirewallRule(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
44 AWS_NETWORKFIREWALL_API FirewallRule& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
45 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
46
48
65 inline FirewallRuleAction GetAction() const { return m_action; }
66 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
67 inline void SetAction(FirewallRuleAction value) {
68 m_actionHasBeenSet = true;
69 m_action = value;
70 }
72 SetAction(value);
73 return *this;
74 }
76
78
93 inline ActionScope GetActionScope() const { return m_actionScope; }
94 inline bool ActionScopeHasBeenSet() const { return m_actionScopeHasBeenSet; }
95 inline void SetActionScope(ActionScope value) {
96 m_actionScopeHasBeenSet = true;
97 m_actionScope = value;
98 }
100 SetActionScope(value);
101 return *this;
102 }
104
106
117 inline HookKey GetHook() const { return m_hook; }
118 inline bool HookHasBeenSet() const { return m_hookHasBeenSet; }
119 inline void SetHook(HookKey value) {
120 m_hookHasBeenSet = true;
121 m_hook = value;
122 }
124 SetHook(value);
125 return *this;
126 }
128
130
135 inline FirewallRuleProtocol GetProtocol() const { return m_protocol; }
136 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
138 m_protocolHasBeenSet = true;
139 m_protocol = value;
140 }
142 SetProtocol(value);
143 return *this;
144 }
146
148
154 inline const Aws::String& GetSourceIPs() const { return m_sourceIPs; }
155 inline bool SourceIPsHasBeenSet() const { return m_sourceIPsHasBeenSet; }
156 template <typename SourceIPsT = Aws::String>
157 void SetSourceIPs(SourceIPsT&& value) {
158 m_sourceIPsHasBeenSet = true;
159 m_sourceIPs = std::forward<SourceIPsT>(value);
160 }
161 template <typename SourceIPsT = Aws::String>
162 FirewallRule& WithSourceIPs(SourceIPsT&& value) {
163 SetSourceIPs(std::forward<SourceIPsT>(value));
164 return *this;
165 }
167
169
175 inline const Aws::String& GetDestIPs() const { return m_destIPs; }
176 inline bool DestIPsHasBeenSet() const { return m_destIPsHasBeenSet; }
177 template <typename DestIPsT = Aws::String>
178 void SetDestIPs(DestIPsT&& value) {
179 m_destIPsHasBeenSet = true;
180 m_destIPs = std::forward<DestIPsT>(value);
181 }
182 template <typename DestIPsT = Aws::String>
183 FirewallRule& WithDestIPs(DestIPsT&& value) {
184 SetDestIPs(std::forward<DestIPsT>(value));
185 return *this;
186 }
188
190
193 inline const Aws::String& GetSourcePorts() const { return m_sourcePorts; }
194 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
195 template <typename SourcePortsT = Aws::String>
196 void SetSourcePorts(SourcePortsT&& value) {
197 m_sourcePortsHasBeenSet = true;
198 m_sourcePorts = std::forward<SourcePortsT>(value);
199 }
200 template <typename SourcePortsT = Aws::String>
201 FirewallRule& WithSourcePorts(SourcePortsT&& value) {
202 SetSourcePorts(std::forward<SourcePortsT>(value));
203 return *this;
204 }
206
208
211 inline const Aws::String& GetDestPorts() const { return m_destPorts; }
212 inline bool DestPortsHasBeenSet() const { return m_destPortsHasBeenSet; }
213 template <typename DestPortsT = Aws::String>
214 void SetDestPorts(DestPortsT&& value) {
215 m_destPortsHasBeenSet = true;
216 m_destPorts = std::forward<DestPortsT>(value);
217 }
218 template <typename DestPortsT = Aws::String>
219 FirewallRule& WithDestPorts(DestPortsT&& value) {
220 SetDestPorts(std::forward<DestPortsT>(value));
221 return *this;
222 }
224
226
231 inline const Aws::Vector<RuleOption>& GetRuleOptions() const { return m_ruleOptions; }
232 inline bool RuleOptionsHasBeenSet() const { return m_ruleOptionsHasBeenSet; }
233 template <typename RuleOptionsT = Aws::Vector<RuleOption>>
234 void SetRuleOptions(RuleOptionsT&& value) {
235 m_ruleOptionsHasBeenSet = true;
236 m_ruleOptions = std::forward<RuleOptionsT>(value);
237 }
238 template <typename RuleOptionsT = Aws::Vector<RuleOption>>
239 FirewallRule& WithRuleOptions(RuleOptionsT&& value) {
240 SetRuleOptions(std::forward<RuleOptionsT>(value));
241 return *this;
242 }
243 template <typename RuleOptionsT = RuleOption>
244 FirewallRule& AddRuleOptions(RuleOptionsT&& value) {
245 m_ruleOptionsHasBeenSet = true;
246 m_ruleOptions.emplace_back(std::forward<RuleOptionsT>(value));
247 return *this;
248 }
250
252
263 inline bool GetAcceptPriorHooks() const { return m_acceptPriorHooks; }
264 inline bool AcceptPriorHooksHasBeenSet() const { return m_acceptPriorHooksHasBeenSet; }
265 inline void SetAcceptPriorHooks(bool value) {
266 m_acceptPriorHooksHasBeenSet = true;
267 m_acceptPriorHooks = value;
268 }
269 inline FirewallRule& WithAcceptPriorHooks(bool value) {
270 SetAcceptPriorHooks(value);
271 return *this;
272 }
274
276
282 inline bool GetAlertEnabled() const { return m_alertEnabled; }
283 inline bool AlertEnabledHasBeenSet() const { return m_alertEnabledHasBeenSet; }
284 inline void SetAlertEnabled(bool value) {
285 m_alertEnabledHasBeenSet = true;
286 m_alertEnabled = value;
287 }
288 inline FirewallRule& WithAlertEnabled(bool value) {
289 SetAlertEnabled(value);
290 return *this;
291 }
293
295
307 inline bool GetBypassIPSEnabled() const { return m_bypassIPSEnabled; }
308 inline bool BypassIPSEnabledHasBeenSet() const { return m_bypassIPSEnabledHasBeenSet; }
309 inline void SetBypassIPSEnabled(bool value) {
310 m_bypassIPSEnabledHasBeenSet = true;
311 m_bypassIPSEnabled = value;
312 }
313 inline FirewallRule& WithBypassIPSEnabled(bool value) {
314 SetBypassIPSEnabled(value);
315 return *this;
316 }
318
320
325 inline const RuleMetadata& GetRuleMetadata() const { return m_ruleMetadata; }
326 inline bool RuleMetadataHasBeenSet() const { return m_ruleMetadataHasBeenSet; }
327 template <typename RuleMetadataT = RuleMetadata>
328 void SetRuleMetadata(RuleMetadataT&& value) {
329 m_ruleMetadataHasBeenSet = true;
330 m_ruleMetadata = std::forward<RuleMetadataT>(value);
331 }
332 template <typename RuleMetadataT = RuleMetadata>
333 FirewallRule& WithRuleMetadata(RuleMetadataT&& value) {
334 SetRuleMetadata(std::forward<RuleMetadataT>(value));
335 return *this;
336 }
338 private:
340
341 ActionScope m_actionScope{ActionScope::NOT_SET};
342
344
346
347 Aws::String m_sourceIPs;
348
349 Aws::String m_destIPs;
350
351 Aws::String m_sourcePorts;
352
353 Aws::String m_destPorts;
354
355 Aws::Vector<RuleOption> m_ruleOptions;
356
357 bool m_acceptPriorHooks{false};
358
359 bool m_alertEnabled{false};
360
361 bool m_bypassIPSEnabled{false};
362
363 RuleMetadata m_ruleMetadata;
364 bool m_actionHasBeenSet = false;
365 bool m_actionScopeHasBeenSet = false;
366 bool m_hookHasBeenSet = false;
367 bool m_protocolHasBeenSet = false;
368 bool m_sourceIPsHasBeenSet = false;
369 bool m_destIPsHasBeenSet = false;
370 bool m_sourcePortsHasBeenSet = false;
371 bool m_destPortsHasBeenSet = false;
372 bool m_ruleOptionsHasBeenSet = false;
373 bool m_acceptPriorHooksHasBeenSet = false;
374 bool m_alertEnabledHasBeenSet = false;
375 bool m_bypassIPSEnabledHasBeenSet = false;
376 bool m_ruleMetadataHasBeenSet = false;
377};
378
379} // namespace Model
380} // namespace NetworkFirewall
381} // namespace Aws
const Aws::String & GetSourcePorts() const
FirewallRule & WithRuleOptions(RuleOptionsT &&value)
FirewallRule & WithHook(HookKey value)
FirewallRule & WithBypassIPSEnabled(bool value)
FirewallRule & WithDestIPs(DestIPsT &&value)
FirewallRule & AddRuleOptions(RuleOptionsT &&value)
void SetSourcePorts(SourcePortsT &&value)
FirewallRule & WithDestPorts(DestPortsT &&value)
FirewallRule & WithActionScope(ActionScope value)
FirewallRule & WithAcceptPriorHooks(bool value)
const RuleMetadata & GetRuleMetadata() const
void SetProtocol(FirewallRuleProtocol value)
void SetRuleOptions(RuleOptionsT &&value)
const Aws::String & GetDestPorts() const
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
FirewallRule & WithAction(FirewallRuleAction value)
void SetRuleMetadata(RuleMetadataT &&value)
AWS_NETWORKFIREWALL_API FirewallRule(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_NETWORKFIREWALL_API FirewallRule & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
FirewallRule & WithProtocol(FirewallRuleProtocol value)
AWS_NETWORKFIREWALL_API FirewallRule()=default
FirewallRule & WithSourceIPs(SourceIPsT &&value)
FirewallRuleAction GetAction() const
FirewallRuleProtocol GetProtocol() const
FirewallRule & WithSourcePorts(SourcePortsT &&value)
const Aws::String & GetDestIPs() const
const Aws::Vector< RuleOption > & GetRuleOptions() const
const Aws::String & GetSourceIPs() const
void SetAction(FirewallRuleAction value)
FirewallRule & WithRuleMetadata(RuleMetadataT &&value)
FirewallRule & WithAlertEnabled(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector