/** * 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 port range to specify the source ports to inspect for.

See * Also:

AWS * API Reference

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

The starting port value for the port range.

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

The starting port value for the port range.

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

The starting port value for the port range.

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

The starting port value for the port range.

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

The ending port value for the port range.

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

The ending port value for the port range.

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

The ending port value for the port range.

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

The ending port value for the port range.

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