AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
MatchAttributes.h
1
6#pragma once
7#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/network-firewall/model/Address.h>
10#include <aws/network-firewall/model/PortRange.h>
11#include <aws/network-firewall/model/TCPFlagField.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace NetworkFirewall
25{
26namespace Model
27{
28
38 {
39 public:
40 AWS_NETWORKFIREWALL_API MatchAttributes() = default;
41 AWS_NETWORKFIREWALL_API MatchAttributes(Aws::Utils::Json::JsonView jsonValue);
42 AWS_NETWORKFIREWALL_API MatchAttributes& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_NETWORKFIREWALL_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
51 inline const Aws::Vector<Address>& GetSources() const { return m_sources; }
52 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
53 template<typename SourcesT = Aws::Vector<Address>>
54 void SetSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
55 template<typename SourcesT = Aws::Vector<Address>>
56 MatchAttributes& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
57 template<typename SourcesT = Address>
58 MatchAttributes& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
60
62
66 inline const Aws::Vector<Address>& GetDestinations() const { return m_destinations; }
67 inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
68 template<typename DestinationsT = Aws::Vector<Address>>
69 void SetDestinations(DestinationsT&& value) { m_destinationsHasBeenSet = true; m_destinations = std::forward<DestinationsT>(value); }
70 template<typename DestinationsT = Aws::Vector<Address>>
71 MatchAttributes& WithDestinations(DestinationsT&& value) { SetDestinations(std::forward<DestinationsT>(value)); return *this;}
72 template<typename DestinationsT = Address>
73 MatchAttributes& AddDestinations(DestinationsT&& value) { m_destinationsHasBeenSet = true; m_destinations.emplace_back(std::forward<DestinationsT>(value)); return *this; }
75
77
84 inline const Aws::Vector<PortRange>& GetSourcePorts() const { return m_sourcePorts; }
85 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
86 template<typename SourcePortsT = Aws::Vector<PortRange>>
87 void SetSourcePorts(SourcePortsT&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = std::forward<SourcePortsT>(value); }
88 template<typename SourcePortsT = Aws::Vector<PortRange>>
89 MatchAttributes& WithSourcePorts(SourcePortsT&& value) { SetSourcePorts(std::forward<SourcePortsT>(value)); return *this;}
90 template<typename SourcePortsT = PortRange>
91 MatchAttributes& AddSourcePorts(SourcePortsT&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.emplace_back(std::forward<SourcePortsT>(value)); return *this; }
93
95
101 inline const Aws::Vector<PortRange>& GetDestinationPorts() const { return m_destinationPorts; }
102 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
103 template<typename DestinationPortsT = Aws::Vector<PortRange>>
104 void SetDestinationPorts(DestinationPortsT&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = std::forward<DestinationPortsT>(value); }
105 template<typename DestinationPortsT = Aws::Vector<PortRange>>
106 MatchAttributes& WithDestinationPorts(DestinationPortsT&& value) { SetDestinationPorts(std::forward<DestinationPortsT>(value)); return *this;}
107 template<typename DestinationPortsT = PortRange>
108 MatchAttributes& AddDestinationPorts(DestinationPortsT&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.emplace_back(std::forward<DestinationPortsT>(value)); return *this; }
110
112
117 inline const Aws::Vector<int>& GetProtocols() const { return m_protocols; }
118 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
119 template<typename ProtocolsT = Aws::Vector<int>>
120 void SetProtocols(ProtocolsT&& value) { m_protocolsHasBeenSet = true; m_protocols = std::forward<ProtocolsT>(value); }
121 template<typename ProtocolsT = Aws::Vector<int>>
122 MatchAttributes& WithProtocols(ProtocolsT&& value) { SetProtocols(std::forward<ProtocolsT>(value)); return *this;}
123 inline MatchAttributes& AddProtocols(int value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; }
125
127
131 inline const Aws::Vector<TCPFlagField>& GetTCPFlags() const { return m_tCPFlags; }
132 inline bool TCPFlagsHasBeenSet() const { return m_tCPFlagsHasBeenSet; }
133 template<typename TCPFlagsT = Aws::Vector<TCPFlagField>>
134 void SetTCPFlags(TCPFlagsT&& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags = std::forward<TCPFlagsT>(value); }
135 template<typename TCPFlagsT = Aws::Vector<TCPFlagField>>
136 MatchAttributes& WithTCPFlags(TCPFlagsT&& value) { SetTCPFlags(std::forward<TCPFlagsT>(value)); return *this;}
137 template<typename TCPFlagsT = TCPFlagField>
138 MatchAttributes& AddTCPFlags(TCPFlagsT&& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags.emplace_back(std::forward<TCPFlagsT>(value)); return *this; }
140 private:
141
142 Aws::Vector<Address> m_sources;
143 bool m_sourcesHasBeenSet = false;
144
145 Aws::Vector<Address> m_destinations;
146 bool m_destinationsHasBeenSet = false;
147
148 Aws::Vector<PortRange> m_sourcePorts;
149 bool m_sourcePortsHasBeenSet = false;
150
151 Aws::Vector<PortRange> m_destinationPorts;
152 bool m_destinationPortsHasBeenSet = false;
153
154 Aws::Vector<int> m_protocols;
155 bool m_protocolsHasBeenSet = false;
156
157 Aws::Vector<TCPFlagField> m_tCPFlags;
158 bool m_tCPFlagsHasBeenSet = false;
159 };
160
161} // namespace Model
162} // namespace NetworkFirewall
163} // namespace Aws
AWS_NETWORKFIREWALL_API MatchAttributes & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDestinations(DestinationsT &&value)
MatchAttributes & AddDestinations(DestinationsT &&value)
const Aws::Vector< int > & GetProtocols() const
MatchAttributes & WithProtocols(ProtocolsT &&value)
const Aws::Vector< PortRange > & GetSourcePorts() const
MatchAttributes & WithSourcePorts(SourcePortsT &&value)
AWS_NETWORKFIREWALL_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< PortRange > & GetDestinationPorts() const
void SetDestinationPorts(DestinationPortsT &&value)
MatchAttributes & AddDestinationPorts(DestinationPortsT &&value)
MatchAttributes & AddSourcePorts(SourcePortsT &&value)
MatchAttributes & AddTCPFlags(TCPFlagsT &&value)
AWS_NETWORKFIREWALL_API MatchAttributes(Aws::Utils::Json::JsonView jsonValue)
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)
const Aws::Vector< Address > & GetDestinations() const
const Aws::Vector< Address > & GetSources() const
MatchAttributes & AddSources(SourcesT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue