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

Describes a range of ports.

See Also:

AWS API * Reference

*/ class PortRange { public: AWS_EC2_API PortRange(); AWS_EC2_API PortRange(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API PortRange& 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 first port in the range.

*/ inline int GetFrom() const{ return m_from; } /** *

The first port in the range.

*/ inline bool FromHasBeenSet() const { return m_fromHasBeenSet; } /** *

The first port in the range.

*/ inline void SetFrom(int value) { m_fromHasBeenSet = true; m_from = value; } /** *

The first port in the range.

*/ inline PortRange& WithFrom(int value) { SetFrom(value); return *this;} /** *

The last port in the range.

*/ inline int GetTo() const{ return m_to; } /** *

The last port in the range.

*/ inline bool ToHasBeenSet() const { return m_toHasBeenSet; } /** *

The last port in the range.

*/ inline void SetTo(int value) { m_toHasBeenSet = true; m_to = value; } /** *

The last port in the range.

*/ inline PortRange& WithTo(int value) { SetTo(value); return *this;} private: int m_from; bool m_fromHasBeenSet = false; int m_to; bool m_toHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws