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

A single port range specification. This is used for source and destination * port ranges in the stateless rule MatchAttributes, * SourcePorts, and DestinationPorts settings. *

See Also:

AWS * API Reference

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

The lower limit of the port range. This must be less than or equal to the * ToPort specification.

*/ inline int GetFromPort() const{ return m_fromPort; } /** *

The lower limit of the port range. This must be less than or equal to the * ToPort specification.

*/ inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; } /** *

The lower limit of the port range. This must be less than or equal to the * ToPort specification.

*/ inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; } /** *

The lower limit of the port range. This must be less than or equal to the * ToPort specification.

*/ inline PortRange& WithFromPort(int value) { SetFromPort(value); return *this;} /** *

The upper limit of the port range. This must be greater than or equal to the * FromPort specification.

*/ inline int GetToPort() const{ return m_toPort; } /** *

The upper limit of the port range. This must be greater than or equal to the * FromPort specification.

*/ inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; } /** *

The upper limit of the port range. This must be greater than or equal to the * FromPort specification.

*/ inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; } /** *

The upper limit of the port range. This must be greater than or equal to the * FromPort specification.

*/ inline PortRange& WithToPort(int value) { SetToPort(value); return *this;} private: int m_fromPort; bool m_fromPortHasBeenSet = false; int m_toPort; bool m_toPortHasBeenSet = false; }; } // namespace Model } // namespace NetworkFirewall } // namespace Aws