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

A range of ports.

See Also:

AWS * API Reference

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

The first port in the port range.

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

The first port in the port range.

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

The first port in the port range.

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

The first port in the port range.

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

The last port in the port range.

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

The last port in the port range.

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

The last port in the port range.

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

The last port in the port range.

*/ inline PortRangeFromTo& 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 SecurityHub } // namespace Aws