/** * 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 stateless rule.

See Also:

AWS * API Reference

*/ class FirewallStatelessRule { public: AWS_EC2_API FirewallStatelessRule(); AWS_EC2_API FirewallStatelessRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API FirewallStatelessRule& 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 ARN of the stateless rule group.

*/ inline const Aws::String& GetRuleGroupArn() const{ return m_ruleGroupArn; } /** *

The ARN of the stateless rule group.

*/ inline bool RuleGroupArnHasBeenSet() const { return m_ruleGroupArnHasBeenSet; } /** *

The ARN of the stateless rule group.

*/ inline void SetRuleGroupArn(const Aws::String& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = value; } /** *

The ARN of the stateless rule group.

*/ inline void SetRuleGroupArn(Aws::String&& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = std::move(value); } /** *

The ARN of the stateless rule group.

*/ inline void SetRuleGroupArn(const char* value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn.assign(value); } /** *

The ARN of the stateless rule group.

*/ inline FirewallStatelessRule& WithRuleGroupArn(const Aws::String& value) { SetRuleGroupArn(value); return *this;} /** *

The ARN of the stateless rule group.

*/ inline FirewallStatelessRule& WithRuleGroupArn(Aws::String&& value) { SetRuleGroupArn(std::move(value)); return *this;} /** *

The ARN of the stateless rule group.

*/ inline FirewallStatelessRule& WithRuleGroupArn(const char* value) { SetRuleGroupArn(value); return *this;} /** *

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

*/ inline FirewallStatelessRule& AddSources(const Aws::String& value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; } /** *

The source IP addresses, in CIDR notation.

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

The source IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

*/ inline FirewallStatelessRule& AddDestinations(const Aws::String& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; } /** *

The destination IP addresses, in CIDR notation.

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

The destination IP addresses, in CIDR notation.

*/ inline FirewallStatelessRule& AddDestinations(const char* value) { m_destinationsHasBeenSet = true; m_destinations.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 FirewallStatelessRule& WithSourcePorts(const Aws::Vector& value) { SetSourcePorts(value); return *this;} /** *

The source ports.

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

The source ports.

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

The source ports.

*/ inline FirewallStatelessRule& AddSourcePorts(PortRange&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(std::move(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 FirewallStatelessRule& WithDestinationPorts(const Aws::Vector& value) { SetDestinationPorts(value); return *this;} /** *

The destination ports.

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

The destination ports.

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

The destination ports.

*/ inline FirewallStatelessRule& AddDestinationPorts(PortRange&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(std::move(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 FirewallStatelessRule& WithProtocols(const Aws::Vector& value) { SetProtocols(value); return *this;} /** *

The protocols.

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

The protocols.

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

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline const Aws::String& GetRuleAction() const{ return m_ruleAction; } /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; } /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline void SetRuleAction(const Aws::String& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; } /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline void SetRuleAction(Aws::String&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = std::move(value); } /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline void SetRuleAction(const char* value) { m_ruleActionHasBeenSet = true; m_ruleAction.assign(value); } /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline FirewallStatelessRule& WithRuleAction(const Aws::String& value) { SetRuleAction(value); return *this;} /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline FirewallStatelessRule& WithRuleAction(Aws::String&& value) { SetRuleAction(std::move(value)); return *this;} /** *

The rule action. The possible values are pass, * drop, and forward_to_site.

*/ inline FirewallStatelessRule& WithRuleAction(const char* value) { SetRuleAction(value); return *this;} /** *

The rule priority.

*/ inline int GetPriority() const{ return m_priority; } /** *

The rule priority.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The rule priority.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The rule priority.

*/ inline FirewallStatelessRule& WithPriority(int value) { SetPriority(value); return *this;} private: Aws::String m_ruleGroupArn; bool m_ruleGroupArnHasBeenSet = false; 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::String m_ruleAction; bool m_ruleActionHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws