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

Describes a stale rule in a security group.

See Also:

AWS * API Reference

*/ class AWS_EC2_API StaleIpPermission { public: StaleIpPermission(); StaleIpPermission(const Aws::Utils::Xml::XmlNode& xmlNode); StaleIpPermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

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

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

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

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

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

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

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

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

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; } /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; } /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; } /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); } /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); } /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline StaleIpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;} /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline StaleIpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;} /** *

The IP protocol name (for tcp, udp, and * icmp) or number (see Protocol * Numbers).

*/ inline StaleIpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;} /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline const Aws::Vector& GetIpRanges() const{ return m_ipRanges; } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline void SetIpRanges(const Aws::Vector& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline void SetIpRanges(Aws::Vector&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline StaleIpPermission& WithIpRanges(const Aws::Vector& value) { SetIpRanges(value); return *this;} /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline StaleIpPermission& WithIpRanges(Aws::Vector&& value) { SetIpRanges(std::move(value)); return *this;} /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddIpRanges(const Aws::String& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddIpRanges(Aws::String&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; } /** *

The IP ranges. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddIpRanges(const char* value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline const Aws::Vector& GetPrefixListIds() const{ return m_prefixListIds; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline void SetPrefixListIds(const Aws::Vector& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline void SetPrefixListIds(Aws::Vector&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::move(value); } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline StaleIpPermission& WithPrefixListIds(const Aws::Vector& value) { SetPrefixListIds(value); return *this;} /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline StaleIpPermission& WithPrefixListIds(Aws::Vector&& value) { SetPrefixListIds(std::move(value)); return *this;} /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddPrefixListIds(const Aws::String& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddPrefixListIds(Aws::String&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; } /** *

The prefix list IDs. Not applicable for stale security group rules.

*/ inline StaleIpPermission& AddPrefixListIds(const char* value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; } /** *

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

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

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

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

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

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

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

*/ inline StaleIpPermission& WithToPort(int value) { SetToPort(value); return *this;} /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline const Aws::Vector& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; } /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; } /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline void SetUserIdGroupPairs(const Aws::Vector& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; } /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline void SetUserIdGroupPairs(Aws::Vector&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::move(value); } /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline StaleIpPermission& WithUserIdGroupPairs(const Aws::Vector& value) { SetUserIdGroupPairs(value); return *this;} /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline StaleIpPermission& WithUserIdGroupPairs(Aws::Vector&& value) { SetUserIdGroupPairs(std::move(value)); return *this;} /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline StaleIpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; } /** *

The security group pairs. Returns the ID of the referenced security group and * VPC, and the ID and status of the VPC peering connection.

*/ inline StaleIpPermission& AddUserIdGroupPairs(UserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; } private: int m_fromPort; bool m_fromPortHasBeenSet; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet; Aws::Vector m_ipRanges; bool m_ipRangesHasBeenSet; Aws::Vector m_prefixListIds; bool m_prefixListIdsHasBeenSet; int m_toPort; bool m_toPortHasBeenSet; Aws::Vector m_userIdGroupPairs; bool m_userIdGroupPairsHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws