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

Describes a set of permissions for a security group rule.

See * Also:

AWS * API Reference

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

The IPv4 ranges for the security group rule.

*/ inline const Aws::String& GetIPV4Range() const{ return m_iPV4Range; } /** *

The IPv4 ranges for the security group rule.

*/ inline bool IPV4RangeHasBeenSet() const { return m_iPV4RangeHasBeenSet; } /** *

The IPv4 ranges for the security group rule.

*/ inline void SetIPV4Range(const Aws::String& value) { m_iPV4RangeHasBeenSet = true; m_iPV4Range = value; } /** *

The IPv4 ranges for the security group rule.

*/ inline void SetIPV4Range(Aws::String&& value) { m_iPV4RangeHasBeenSet = true; m_iPV4Range = std::move(value); } /** *

The IPv4 ranges for the security group rule.

*/ inline void SetIPV4Range(const char* value) { m_iPV4RangeHasBeenSet = true; m_iPV4Range.assign(value); } /** *

The IPv4 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV4Range(const Aws::String& value) { SetIPV4Range(value); return *this;} /** *

The IPv4 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV4Range(Aws::String&& value) { SetIPV4Range(std::move(value)); return *this;} /** *

The IPv4 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV4Range(const char* value) { SetIPV4Range(value); return *this;} /** *

The IPv6 ranges for the security group rule.

*/ inline const Aws::String& GetIPV6Range() const{ return m_iPV6Range; } /** *

The IPv6 ranges for the security group rule.

*/ inline bool IPV6RangeHasBeenSet() const { return m_iPV6RangeHasBeenSet; } /** *

The IPv6 ranges for the security group rule.

*/ inline void SetIPV6Range(const Aws::String& value) { m_iPV6RangeHasBeenSet = true; m_iPV6Range = value; } /** *

The IPv6 ranges for the security group rule.

*/ inline void SetIPV6Range(Aws::String&& value) { m_iPV6RangeHasBeenSet = true; m_iPV6Range = std::move(value); } /** *

The IPv6 ranges for the security group rule.

*/ inline void SetIPV6Range(const char* value) { m_iPV6RangeHasBeenSet = true; m_iPV6Range.assign(value); } /** *

The IPv6 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV6Range(const Aws::String& value) { SetIPV6Range(value); return *this;} /** *

The IPv6 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV6Range(Aws::String&& value) { SetIPV6Range(std::move(value)); return *this;} /** *

The IPv6 ranges for the security group rule.

*/ inline SecurityGroupRuleDescription& WithIPV6Range(const char* value) { SetIPV6Range(value); return *this;} /** *

The ID of the prefix list for the security group rule.

*/ inline const Aws::String& GetPrefixListId() const{ return m_prefixListId; } /** *

The ID of the prefix list for the security group rule.

*/ inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; } /** *

The ID of the prefix list for the security group rule.

*/ inline void SetPrefixListId(const Aws::String& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; } /** *

The ID of the prefix list for the security group rule.

*/ inline void SetPrefixListId(Aws::String&& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = std::move(value); } /** *

The ID of the prefix list for the security group rule.

*/ inline void SetPrefixListId(const char* value) { m_prefixListIdHasBeenSet = true; m_prefixListId.assign(value); } /** *

The ID of the prefix list for the security group rule.

*/ inline SecurityGroupRuleDescription& WithPrefixListId(const Aws::String& value) { SetPrefixListId(value); return *this;} /** *

The ID of the prefix list for the security group rule.

*/ inline SecurityGroupRuleDescription& WithPrefixListId(Aws::String&& value) { SetPrefixListId(std::move(value)); return *this;} /** *

The ID of the prefix list for the security group rule.

*/ inline SecurityGroupRuleDescription& WithPrefixListId(const char* value) { SetPrefixListId(value); return *this;} /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline const Aws::String& GetProtocol() const{ return m_protocol; } /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); } /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline SecurityGroupRuleDescription& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;} /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline SecurityGroupRuleDescription& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;} /** *

The IP protocol name (tcp, udp, icmp, * icmpv6) or number.

*/ inline SecurityGroupRuleDescription& WithProtocol(const char* value) { SetProtocol(value); return *this;} /** *

The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * type number. A value of -1 indicates all ICMP/ICMPv6 types.

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

The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * type number. A value of -1 indicates all ICMP/ICMPv6 types.

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

The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * type number. A value of -1 indicates all ICMP/ICMPv6 types.

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

The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * type number. A value of -1 indicates all ICMP/ICMPv6 types.

*/ inline SecurityGroupRuleDescription& WithFromPort(long long value) { SetFromPort(value); return *this;} /** *

The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * code. A value of -1 indicates all ICMP/ICMPv6 codes.

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

The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * code. A value of -1 indicates all ICMP/ICMPv6 codes.

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

The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * code. A value of -1 indicates all ICMP/ICMPv6 codes.

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

The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 * code. A value of -1 indicates all ICMP/ICMPv6 codes.

*/ inline SecurityGroupRuleDescription& WithToPort(long long value) { SetToPort(value); return *this;} private: Aws::String m_iPV4Range; bool m_iPV4RangeHasBeenSet = false; Aws::String m_iPV6Range; bool m_iPV6RangeHasBeenSet = false; Aws::String m_prefixListId; bool m_prefixListIdHasBeenSet = false; Aws::String m_protocol; bool m_protocolHasBeenSet = false; long long m_fromPort; bool m_fromPortHasBeenSet = false; long long m_toPort; bool m_toPortHasBeenSet = false; }; } // namespace Model } // namespace FMS } // namespace Aws