AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
MatchAttributes.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/Address.h>
11#include <aws/network-firewall/model/PortRange.h>
12#include <aws/network-firewall/model/TCPFlagField.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
34 public:
35 AWS_NETWORKFIREWALL_API MatchAttributes() = default;
36 AWS_NETWORKFIREWALL_API MatchAttributes(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_NETWORKFIREWALL_API MatchAttributes& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
39
41
45 inline const Aws::Vector<Address>& GetSources() const { return m_sources; }
46 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
47 template <typename SourcesT = Aws::Vector<Address>>
48 void SetSources(SourcesT&& value) {
49 m_sourcesHasBeenSet = true;
50 m_sources = std::forward<SourcesT>(value);
51 }
52 template <typename SourcesT = Aws::Vector<Address>>
53 MatchAttributes& WithSources(SourcesT&& value) {
54 SetSources(std::forward<SourcesT>(value));
55 return *this;
56 }
57 template <typename SourcesT = Address>
58 MatchAttributes& AddSources(SourcesT&& value) {
59 m_sourcesHasBeenSet = true;
60 m_sources.emplace_back(std::forward<SourcesT>(value));
61 return *this;
62 }
64
66
70 inline const Aws::Vector<Address>& GetDestinations() const { return m_destinations; }
71 inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
72 template <typename DestinationsT = Aws::Vector<Address>>
73 void SetDestinations(DestinationsT&& value) {
74 m_destinationsHasBeenSet = true;
75 m_destinations = std::forward<DestinationsT>(value);
76 }
77 template <typename DestinationsT = Aws::Vector<Address>>
78 MatchAttributes& WithDestinations(DestinationsT&& value) {
79 SetDestinations(std::forward<DestinationsT>(value));
80 return *this;
81 }
82 template <typename DestinationsT = Address>
83 MatchAttributes& AddDestinations(DestinationsT&& value) {
84 m_destinationsHasBeenSet = true;
85 m_destinations.emplace_back(std::forward<DestinationsT>(value));
86 return *this;
87 }
89
91
98 inline const Aws::Vector<PortRange>& GetSourcePorts() const { return m_sourcePorts; }
99 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
100 template <typename SourcePortsT = Aws::Vector<PortRange>>
101 void SetSourcePorts(SourcePortsT&& value) {
102 m_sourcePortsHasBeenSet = true;
103 m_sourcePorts = std::forward<SourcePortsT>(value);
104 }
105 template <typename SourcePortsT = Aws::Vector<PortRange>>
106 MatchAttributes& WithSourcePorts(SourcePortsT&& value) {
107 SetSourcePorts(std::forward<SourcePortsT>(value));
108 return *this;
109 }
110 template <typename SourcePortsT = PortRange>
111 MatchAttributes& AddSourcePorts(SourcePortsT&& value) {
112 m_sourcePortsHasBeenSet = true;
113 m_sourcePorts.emplace_back(std::forward<SourcePortsT>(value));
114 return *this;
115 }
117
119
125 inline const Aws::Vector<PortRange>& GetDestinationPorts() const { return m_destinationPorts; }
126 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
127 template <typename DestinationPortsT = Aws::Vector<PortRange>>
128 void SetDestinationPorts(DestinationPortsT&& value) {
129 m_destinationPortsHasBeenSet = true;
130 m_destinationPorts = std::forward<DestinationPortsT>(value);
131 }
132 template <typename DestinationPortsT = Aws::Vector<PortRange>>
133 MatchAttributes& WithDestinationPorts(DestinationPortsT&& value) {
134 SetDestinationPorts(std::forward<DestinationPortsT>(value));
135 return *this;
136 }
137 template <typename DestinationPortsT = PortRange>
138 MatchAttributes& AddDestinationPorts(DestinationPortsT&& value) {
139 m_destinationPortsHasBeenSet = true;
140 m_destinationPorts.emplace_back(std::forward<DestinationPortsT>(value));
141 return *this;
142 }
144
146
151 inline const Aws::Vector<int64_t>& GetProtocols() const { return m_protocols; }
152 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
153 template <typename ProtocolsT = Aws::Vector<int64_t>>
154 void SetProtocols(ProtocolsT&& value) {
155 m_protocolsHasBeenSet = true;
156 m_protocols = std::forward<ProtocolsT>(value);
157 }
158 template <typename ProtocolsT = Aws::Vector<int64_t>>
159 MatchAttributes& WithProtocols(ProtocolsT&& value) {
160 SetProtocols(std::forward<ProtocolsT>(value));
161 return *this;
162 }
163 inline MatchAttributes& AddProtocols(int64_t value) {
164 m_protocolsHasBeenSet = true;
165 m_protocols.push_back(value);
166 return *this;
167 }
169
171
175 inline const Aws::Vector<TCPFlagField>& GetTCPFlags() const { return m_tCPFlags; }
176 inline bool TCPFlagsHasBeenSet() const { return m_tCPFlagsHasBeenSet; }
177 template <typename TCPFlagsT = Aws::Vector<TCPFlagField>>
178 void SetTCPFlags(TCPFlagsT&& value) {
179 m_tCPFlagsHasBeenSet = true;
180 m_tCPFlags = std::forward<TCPFlagsT>(value);
181 }
182 template <typename TCPFlagsT = Aws::Vector<TCPFlagField>>
183 MatchAttributes& WithTCPFlags(TCPFlagsT&& value) {
184 SetTCPFlags(std::forward<TCPFlagsT>(value));
185 return *this;
186 }
187 template <typename TCPFlagsT = TCPFlagField>
188 MatchAttributes& AddTCPFlags(TCPFlagsT&& value) {
189 m_tCPFlagsHasBeenSet = true;
190 m_tCPFlags.emplace_back(std::forward<TCPFlagsT>(value));
191 return *this;
192 }
194 private:
195 Aws::Vector<Address> m_sources;
196
197 Aws::Vector<Address> m_destinations;
198
199 Aws::Vector<PortRange> m_sourcePorts;
200
201 Aws::Vector<PortRange> m_destinationPorts;
202
203 Aws::Vector<int64_t> m_protocols;
204
205 Aws::Vector<TCPFlagField> m_tCPFlags;
206 bool m_sourcesHasBeenSet = false;
207 bool m_destinationsHasBeenSet = false;
208 bool m_sourcePortsHasBeenSet = false;
209 bool m_destinationPortsHasBeenSet = false;
210 bool m_protocolsHasBeenSet = false;
211 bool m_tCPFlagsHasBeenSet = false;
212};
213
214} // namespace Model
215} // namespace NetworkFirewall
216} // namespace Aws
void SetDestinations(DestinationsT &&value)
MatchAttributes & AddDestinations(DestinationsT &&value)
MatchAttributes & WithProtocols(ProtocolsT &&value)
const Aws::Vector< PortRange > & GetSourcePorts() const
MatchAttributes & WithSourcePorts(SourcePortsT &&value)
MatchAttributes & AddProtocols(int64_t value)
const Aws::Vector< PortRange > & GetDestinationPorts() const
void SetDestinationPorts(DestinationPortsT &&value)
const Aws::Vector< int64_t > & GetProtocols() const
MatchAttributes & AddDestinationPorts(DestinationPortsT &&value)
MatchAttributes & AddSourcePorts(SourcePortsT &&value)
MatchAttributes & AddTCPFlags(TCPFlagsT &&value)
AWS_NETWORKFIREWALL_API MatchAttributes & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
MatchAttributes & WithSources(SourcesT &&value)
const Aws::Vector< TCPFlagField > & GetTCPFlags() const
AWS_NETWORKFIREWALL_API MatchAttributes()=default
MatchAttributes & WithDestinationPorts(DestinationPortsT &&value)
MatchAttributes & WithTCPFlags(TCPFlagsT &&value)
MatchAttributes & WithDestinations(DestinationsT &&value)
AWS_NETWORKFIREWALL_API MatchAttributes(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::Vector< Address > & GetDestinations() const
const Aws::Vector< Address > & GetSources() const
MatchAttributes & AddSources(SourcesT &&value)
std::vector< T, Aws::Allocator< T > > Vector