/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a packet header statement.

See Also:

AWS * API Reference

*/ class PacketHeaderStatement { public: AWS_EC2_API PacketHeaderStatement(); AWS_EC2_API PacketHeaderStatement(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API PacketHeaderStatement& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The source addresses.

*/ inline const Aws::Vector& GetSourceAddresses() const{ return m_sourceAddresses; } /** *

The source addresses.

*/ inline bool SourceAddressesHasBeenSet() const { return m_sourceAddressesHasBeenSet; } /** *

The source addresses.

*/ inline void SetSourceAddresses(const Aws::Vector& value) { m_sourceAddressesHasBeenSet = true; m_sourceAddresses = value; } /** *

The source addresses.

*/ inline void SetSourceAddresses(Aws::Vector&& value) { m_sourceAddressesHasBeenSet = true; m_sourceAddresses = std::move(value); } /** *

The source addresses.

*/ inline PacketHeaderStatement& WithSourceAddresses(const Aws::Vector& value) { SetSourceAddresses(value); return *this;} /** *

The source addresses.

*/ inline PacketHeaderStatement& WithSourceAddresses(Aws::Vector&& value) { SetSourceAddresses(std::move(value)); return *this;} /** *

The source addresses.

*/ inline PacketHeaderStatement& AddSourceAddresses(const Aws::String& value) { m_sourceAddressesHasBeenSet = true; m_sourceAddresses.push_back(value); return *this; } /** *

The source addresses.

*/ inline PacketHeaderStatement& AddSourceAddresses(Aws::String&& value) { m_sourceAddressesHasBeenSet = true; m_sourceAddresses.push_back(std::move(value)); return *this; } /** *

The source addresses.

*/ inline PacketHeaderStatement& AddSourceAddresses(const char* value) { m_sourceAddressesHasBeenSet = true; m_sourceAddresses.push_back(value); return *this; } /** *

The destination addresses.

*/ inline const Aws::Vector& GetDestinationAddresses() const{ return m_destinationAddresses; } /** *

The destination addresses.

*/ inline bool DestinationAddressesHasBeenSet() const { return m_destinationAddressesHasBeenSet; } /** *

The destination addresses.

*/ inline void SetDestinationAddresses(const Aws::Vector& value) { m_destinationAddressesHasBeenSet = true; m_destinationAddresses = value; } /** *

The destination addresses.

*/ inline void SetDestinationAddresses(Aws::Vector&& value) { m_destinationAddressesHasBeenSet = true; m_destinationAddresses = std::move(value); } /** *

The destination addresses.

*/ inline PacketHeaderStatement& WithDestinationAddresses(const Aws::Vector& value) { SetDestinationAddresses(value); return *this;} /** *

The destination addresses.

*/ inline PacketHeaderStatement& WithDestinationAddresses(Aws::Vector&& value) { SetDestinationAddresses(std::move(value)); return *this;} /** *

The destination addresses.

*/ inline PacketHeaderStatement& AddDestinationAddresses(const Aws::String& value) { m_destinationAddressesHasBeenSet = true; m_destinationAddresses.push_back(value); return *this; } /** *

The destination addresses.

*/ inline PacketHeaderStatement& AddDestinationAddresses(Aws::String&& value) { m_destinationAddressesHasBeenSet = true; m_destinationAddresses.push_back(std::move(value)); return *this; } /** *

The destination addresses.

*/ inline PacketHeaderStatement& AddDestinationAddresses(const char* value) { m_destinationAddressesHasBeenSet = true; m_destinationAddresses.push_back(value); return *this; } /** *

The source ports.

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

The source ports.

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

The source ports.

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

The source ports.

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

The source ports.

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

The source ports.

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

The source ports.

*/ inline PacketHeaderStatement& AddSourcePorts(const Aws::String& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(value); return *this; } /** *

The source ports.

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

The source ports.

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

The destination ports.

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

The destination ports.

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

The destination ports.

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

The destination ports.

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

The destination ports.

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

The destination ports.

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

The destination ports.

*/ inline PacketHeaderStatement& AddDestinationPorts(const Aws::String& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(value); return *this; } /** *

The destination ports.

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

The destination ports.

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

The source prefix lists.

*/ inline const Aws::Vector& GetSourcePrefixLists() const{ return m_sourcePrefixLists; } /** *

The source prefix lists.

*/ inline bool SourcePrefixListsHasBeenSet() const { return m_sourcePrefixListsHasBeenSet; } /** *

The source prefix lists.

*/ inline void SetSourcePrefixLists(const Aws::Vector& value) { m_sourcePrefixListsHasBeenSet = true; m_sourcePrefixLists = value; } /** *

The source prefix lists.

*/ inline void SetSourcePrefixLists(Aws::Vector&& value) { m_sourcePrefixListsHasBeenSet = true; m_sourcePrefixLists = std::move(value); } /** *

The source prefix lists.

*/ inline PacketHeaderStatement& WithSourcePrefixLists(const Aws::Vector& value) { SetSourcePrefixLists(value); return *this;} /** *

The source prefix lists.

*/ inline PacketHeaderStatement& WithSourcePrefixLists(Aws::Vector&& value) { SetSourcePrefixLists(std::move(value)); return *this;} /** *

The source prefix lists.

*/ inline PacketHeaderStatement& AddSourcePrefixLists(const Aws::String& value) { m_sourcePrefixListsHasBeenSet = true; m_sourcePrefixLists.push_back(value); return *this; } /** *

The source prefix lists.

*/ inline PacketHeaderStatement& AddSourcePrefixLists(Aws::String&& value) { m_sourcePrefixListsHasBeenSet = true; m_sourcePrefixLists.push_back(std::move(value)); return *this; } /** *

The source prefix lists.

*/ inline PacketHeaderStatement& AddSourcePrefixLists(const char* value) { m_sourcePrefixListsHasBeenSet = true; m_sourcePrefixLists.push_back(value); return *this; } /** *

The destination prefix lists.

*/ inline const Aws::Vector& GetDestinationPrefixLists() const{ return m_destinationPrefixLists; } /** *

The destination prefix lists.

*/ inline bool DestinationPrefixListsHasBeenSet() const { return m_destinationPrefixListsHasBeenSet; } /** *

The destination prefix lists.

*/ inline void SetDestinationPrefixLists(const Aws::Vector& value) { m_destinationPrefixListsHasBeenSet = true; m_destinationPrefixLists = value; } /** *

The destination prefix lists.

*/ inline void SetDestinationPrefixLists(Aws::Vector&& value) { m_destinationPrefixListsHasBeenSet = true; m_destinationPrefixLists = std::move(value); } /** *

The destination prefix lists.

*/ inline PacketHeaderStatement& WithDestinationPrefixLists(const Aws::Vector& value) { SetDestinationPrefixLists(value); return *this;} /** *

The destination prefix lists.

*/ inline PacketHeaderStatement& WithDestinationPrefixLists(Aws::Vector&& value) { SetDestinationPrefixLists(std::move(value)); return *this;} /** *

The destination prefix lists.

*/ inline PacketHeaderStatement& AddDestinationPrefixLists(const Aws::String& value) { m_destinationPrefixListsHasBeenSet = true; m_destinationPrefixLists.push_back(value); return *this; } /** *

The destination prefix lists.

*/ inline PacketHeaderStatement& AddDestinationPrefixLists(Aws::String&& value) { m_destinationPrefixListsHasBeenSet = true; m_destinationPrefixLists.push_back(std::move(value)); return *this; } /** *

The destination prefix lists.

*/ inline PacketHeaderStatement& AddDestinationPrefixLists(const char* value) { m_destinationPrefixListsHasBeenSet = true; m_destinationPrefixLists.push_back(value); return *this; } /** *

The protocols.

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

The protocols.

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

The protocols.

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

The protocols.

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

The protocols.

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

The protocols.

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

The protocols.

*/ inline PacketHeaderStatement& AddProtocols(const Protocol& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; } /** *

The protocols.

*/ inline PacketHeaderStatement& AddProtocols(Protocol&& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(std::move(value)); return *this; } private: Aws::Vector m_sourceAddresses; bool m_sourceAddressesHasBeenSet = false; Aws::Vector m_destinationAddresses; bool m_destinationAddressesHasBeenSet = false; Aws::Vector m_sourcePorts; bool m_sourcePortsHasBeenSet = false; Aws::Vector m_destinationPorts; bool m_destinationPortsHasBeenSet = false; Aws::Vector m_sourcePrefixLists; bool m_sourcePrefixListsHasBeenSet = false; Aws::Vector m_destinationPrefixLists; bool m_destinationPrefixListsHasBeenSet = false; Aws::Vector m_protocols; bool m_protocolsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws