AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
RuleVariables.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
11#include <aws/network-firewall/model/ContextSet.h>
12#include <aws/network-firewall/model/IPSet.h>
13#include <aws/network-firewall/model/PortSet.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
34 public:
35 AWS_NETWORKFIREWALL_API RuleVariables() = default;
36 AWS_NETWORKFIREWALL_API RuleVariables(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_NETWORKFIREWALL_API RuleVariables& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
39
41
44 inline const Aws::Map<Aws::String, IPSet>& GetIPSets() const { return m_iPSets; }
45 inline bool IPSetsHasBeenSet() const { return m_iPSetsHasBeenSet; }
46 template <typename IPSetsT = Aws::Map<Aws::String, IPSet>>
47 void SetIPSets(IPSetsT&& value) {
48 m_iPSetsHasBeenSet = true;
49 m_iPSets = std::forward<IPSetsT>(value);
50 }
51 template <typename IPSetsT = Aws::Map<Aws::String, IPSet>>
52 RuleVariables& WithIPSets(IPSetsT&& value) {
53 SetIPSets(std::forward<IPSetsT>(value));
54 return *this;
55 }
56 template <typename IPSetsKeyT = Aws::String, typename IPSetsValueT = IPSet>
57 RuleVariables& AddIPSets(IPSetsKeyT&& key, IPSetsValueT&& value) {
58 m_iPSetsHasBeenSet = true;
59 m_iPSets.emplace(std::forward<IPSetsKeyT>(key), std::forward<IPSetsValueT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::Map<Aws::String, PortSet>& GetPortSets() const { return m_portSets; }
69 inline bool PortSetsHasBeenSet() const { return m_portSetsHasBeenSet; }
70 template <typename PortSetsT = Aws::Map<Aws::String, PortSet>>
71 void SetPortSets(PortSetsT&& value) {
72 m_portSetsHasBeenSet = true;
73 m_portSets = std::forward<PortSetsT>(value);
74 }
75 template <typename PortSetsT = Aws::Map<Aws::String, PortSet>>
76 RuleVariables& WithPortSets(PortSetsT&& value) {
77 SetPortSets(std::forward<PortSetsT>(value));
78 return *this;
79 }
80 template <typename PortSetsKeyT = Aws::String, typename PortSetsValueT = PortSet>
81 RuleVariables& AddPortSets(PortSetsKeyT&& key, PortSetsValueT&& value) {
82 m_portSetsHasBeenSet = true;
83 m_portSets.emplace(std::forward<PortSetsKeyT>(key), std::forward<PortSetsValueT>(value));
84 return *this;
85 }
87
89
93 inline const Aws::Map<Aws::String, ContextSet>& GetContextSets() const { return m_contextSets; }
94 inline bool ContextSetsHasBeenSet() const { return m_contextSetsHasBeenSet; }
95 template <typename ContextSetsT = Aws::Map<Aws::String, ContextSet>>
96 void SetContextSets(ContextSetsT&& value) {
97 m_contextSetsHasBeenSet = true;
98 m_contextSets = std::forward<ContextSetsT>(value);
99 }
100 template <typename ContextSetsT = Aws::Map<Aws::String, ContextSet>>
101 RuleVariables& WithContextSets(ContextSetsT&& value) {
102 SetContextSets(std::forward<ContextSetsT>(value));
103 return *this;
104 }
105 template <typename ContextSetsKeyT = Aws::String, typename ContextSetsValueT = ContextSet>
106 RuleVariables& AddContextSets(ContextSetsKeyT&& key, ContextSetsValueT&& value) {
107 m_contextSetsHasBeenSet = true;
108 m_contextSets.emplace(std::forward<ContextSetsKeyT>(key), std::forward<ContextSetsValueT>(value));
109 return *this;
110 }
112 private:
114
116
118 bool m_iPSetsHasBeenSet = false;
119 bool m_portSetsHasBeenSet = false;
120 bool m_contextSetsHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace NetworkFirewall
125} // namespace Aws
RuleVariables & AddPortSets(PortSetsKeyT &&key, PortSetsValueT &&value)
void SetContextSets(ContextSetsT &&value)
AWS_NETWORKFIREWALL_API RuleVariables & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_NETWORKFIREWALL_API RuleVariables(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
RuleVariables & AddContextSets(ContextSetsKeyT &&key, ContextSetsValueT &&value)
const Aws::Map< Aws::String, PortSet > & GetPortSets() const
const Aws::Map< Aws::String, ContextSet > & GetContextSets() const
RuleVariables & WithIPSets(IPSetsT &&value)
RuleVariables & WithContextSets(ContextSetsT &&value)
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_NETWORKFIREWALL_API RuleVariables()=default
RuleVariables & WithPortSets(PortSetsT &&value)
const Aws::Map< Aws::String, IPSet > & GetIPSets() const
RuleVariables & AddIPSets(IPSetsKeyT &&key, IPSetsValueT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map