/** * 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 GlobalAccelerator { namespace Model { /** *

A complex type for a range of ports for a listener.

See Also:

* AWS * API Reference

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

The first port in the range of ports, inclusive.

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

The first port in the range of ports, inclusive.

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

The first port in the range of ports, inclusive.

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

The first port in the range of ports, inclusive.

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

The last port in the range of ports, inclusive.

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

The last port in the range of ports, inclusive.

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

The last port in the range of ports, inclusive.

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

The last port in the range of ports, inclusive.

*/ 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 GlobalAccelerator } // namespace Aws