/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace NetworkFirewall { namespace Model { /** *

Criteria for Network Firewall to use to inspect an individual packet in * stateless rule inspection. Each match attributes set can include one or more * items such as IP address, CIDR range, port number, protocol, and TCP flags. *

See Also:

AWS * API Reference

*/ class MatchAttributes { public: AWS_NETWORKFIREWALL_API MatchAttributes(); AWS_NETWORKFIREWALL_API MatchAttributes(Aws::Utils::Json::JsonView jsonValue); AWS_NETWORKFIREWALL_API MatchAttributes& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_NETWORKFIREWALL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline const Aws::Vector
& GetSources() const{ return m_sources; } /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; } /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline void SetSources(const Aws::Vector
& value) { m_sourcesHasBeenSet = true; m_sources = value; } /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline void SetSources(Aws::Vector
&& value) { m_sourcesHasBeenSet = true; m_sources = std::move(value); } /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline MatchAttributes& WithSources(const Aws::Vector
& value) { SetSources(value); return *this;} /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline MatchAttributes& WithSources(Aws::Vector
&& value) { SetSources(std::move(value)); return *this;} /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline MatchAttributes& AddSources(const Address& value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; } /** *

The source IP addresses and address ranges to inspect for, in CIDR notation. * If not specified, this matches with any source address.

*/ inline MatchAttributes& AddSources(Address&& value) { m_sourcesHasBeenSet = true; m_sources.push_back(std::move(value)); return *this; } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline const Aws::Vector
& GetDestinations() const{ return m_destinations; } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline void SetDestinations(const Aws::Vector
& value) { m_destinationsHasBeenSet = true; m_destinations = value; } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline void SetDestinations(Aws::Vector
&& value) { m_destinationsHasBeenSet = true; m_destinations = std::move(value); } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline MatchAttributes& WithDestinations(const Aws::Vector
& value) { SetDestinations(value); return *this;} /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline MatchAttributes& WithDestinations(Aws::Vector
&& value) { SetDestinations(std::move(value)); return *this;} /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline MatchAttributes& AddDestinations(const Address& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; } /** *

The destination IP addresses and address ranges to inspect for, in CIDR * notation. If not specified, this matches with any destination address.

*/ inline MatchAttributes& AddDestinations(Address&& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(std::move(value)); return *this; } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline const Aws::Vector& GetSourcePorts() const{ return m_sourcePorts; } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline void SetSourcePorts(const Aws::Vector& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = value; } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline void SetSourcePorts(Aws::Vector&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = std::move(value); } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& WithSourcePorts(const Aws::Vector& value) { SetSourcePorts(value); return *this;} /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& WithSourcePorts(Aws::Vector&& value) { SetSourcePorts(std::move(value)); return *this;} /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& AddSourcePorts(const PortRange& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(value); return *this; } /** *

The source ports to inspect for. If not specified, this matches with any * source port. This setting is only used for protocols 6 (TCP) and 17 (UDP).

*

You can specify individual ports, for example 1994 and you can * specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& AddSourcePorts(PortRange&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(std::move(value)); return *this; } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline const Aws::Vector& GetDestinationPorts() const{ return m_destinationPorts; } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline void SetDestinationPorts(const Aws::Vector& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = value; } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline void SetDestinationPorts(Aws::Vector&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = std::move(value); } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& WithDestinationPorts(const Aws::Vector& value) { SetDestinationPorts(value); return *this;} /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& WithDestinationPorts(Aws::Vector&& value) { SetDestinationPorts(std::move(value)); return *this;} /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& AddDestinationPorts(const PortRange& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(value); return *this; } /** *

The destination ports to inspect for. If not specified, this matches with any * destination port. This setting is only used for protocols 6 (TCP) and 17 (UDP). *

You can specify individual ports, for example 1994 and you * can specify port ranges, for example 1990:1994.

*/ inline MatchAttributes& AddDestinationPorts(PortRange&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(std::move(value)); return *this; } /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline const Aws::Vector& GetProtocols() const{ return m_protocols; } /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; } /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline void SetProtocols(const Aws::Vector& value) { m_protocolsHasBeenSet = true; m_protocols = value; } /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline void SetProtocols(Aws::Vector&& value) { m_protocolsHasBeenSet = true; m_protocols = std::move(value); } /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline MatchAttributes& WithProtocols(const Aws::Vector& value) { SetProtocols(value); return *this;} /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline MatchAttributes& WithProtocols(Aws::Vector&& value) { SetProtocols(std::move(value)); return *this;} /** *

The protocols to inspect for, specified using each protocol's assigned * internet protocol number (IANA). If not specified, this matches with any * protocol.

*/ inline MatchAttributes& AddProtocols(int value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline const Aws::Vector& GetTCPFlags() const{ return m_tCPFlags; } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline bool TCPFlagsHasBeenSet() const { return m_tCPFlagsHasBeenSet; } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline void SetTCPFlags(const Aws::Vector& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags = value; } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline void SetTCPFlags(Aws::Vector&& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags = std::move(value); } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline MatchAttributes& WithTCPFlags(const Aws::Vector& value) { SetTCPFlags(value); return *this;} /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline MatchAttributes& WithTCPFlags(Aws::Vector&& value) { SetTCPFlags(std::move(value)); return *this;} /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline MatchAttributes& AddTCPFlags(const TCPFlagField& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags.push_back(value); return *this; } /** *

The TCP flags and masks to inspect for. If not specified, this matches with * any settings. This setting is only used for protocol 6 (TCP).

*/ inline MatchAttributes& AddTCPFlags(TCPFlagField&& value) { m_tCPFlagsHasBeenSet = true; m_tCPFlags.push_back(std::move(value)); return *this; } private: Aws::Vector
m_sources; bool m_sourcesHasBeenSet = false; Aws::Vector
m_destinations; bool m_destinationsHasBeenSet = false; Aws::Vector m_sourcePorts; bool m_sourcePortsHasBeenSet = false; Aws::Vector m_destinationPorts; bool m_destinationPortsHasBeenSet = false; Aws::Vector m_protocols; bool m_protocolsHasBeenSet = false; Aws::Vector m_tCPFlags; bool m_tCPFlagsHasBeenSet = false; }; } // namespace Model } // namespace NetworkFirewall } // namespace Aws