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

Describes a security group rule.

See Also:

AWS * API Reference

*/ class AnalysisSecurityGroupRule { public: AWS_EC2_API AnalysisSecurityGroupRule(); AWS_EC2_API AnalysisSecurityGroupRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API AnalysisSecurityGroupRule& 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 IPv4 address range, in CIDR notation.

*/ inline const Aws::String& GetCidr() const{ return m_cidr; } /** *

The IPv4 address range, in CIDR notation.

*/ inline bool CidrHasBeenSet() const { return m_cidrHasBeenSet; } /** *

The IPv4 address range, in CIDR notation.

*/ inline void SetCidr(const Aws::String& value) { m_cidrHasBeenSet = true; m_cidr = value; } /** *

The IPv4 address range, in CIDR notation.

*/ inline void SetCidr(Aws::String&& value) { m_cidrHasBeenSet = true; m_cidr = std::move(value); } /** *

The IPv4 address range, in CIDR notation.

*/ inline void SetCidr(const char* value) { m_cidrHasBeenSet = true; m_cidr.assign(value); } /** *

The IPv4 address range, in CIDR notation.

*/ inline AnalysisSecurityGroupRule& WithCidr(const Aws::String& value) { SetCidr(value); return *this;} /** *

The IPv4 address range, in CIDR notation.

*/ inline AnalysisSecurityGroupRule& WithCidr(Aws::String&& value) { SetCidr(std::move(value)); return *this;} /** *

The IPv4 address range, in CIDR notation.

*/ inline AnalysisSecurityGroupRule& WithCidr(const char* value) { SetCidr(value); return *this;} /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline const Aws::String& GetDirection() const{ return m_direction; } /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline bool DirectionHasBeenSet() const { return m_directionHasBeenSet; } /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline void SetDirection(const Aws::String& value) { m_directionHasBeenSet = true; m_direction = value; } /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline void SetDirection(Aws::String&& value) { m_directionHasBeenSet = true; m_direction = std::move(value); } /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline void SetDirection(const char* value) { m_directionHasBeenSet = true; m_direction.assign(value); } /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline AnalysisSecurityGroupRule& WithDirection(const Aws::String& value) { SetDirection(value); return *this;} /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline AnalysisSecurityGroupRule& WithDirection(Aws::String&& value) { SetDirection(std::move(value)); return *this;} /** *

The direction. The following are the possible values:

  • *

    egress

  • ingress

*/ inline AnalysisSecurityGroupRule& WithDirection(const char* value) { SetDirection(value); return *this;} /** *

The security group ID.

*/ inline const Aws::String& GetSecurityGroupId() const{ return m_securityGroupId; } /** *

The security group ID.

*/ inline bool SecurityGroupIdHasBeenSet() const { return m_securityGroupIdHasBeenSet; } /** *

The security group ID.

*/ inline void SetSecurityGroupId(const Aws::String& value) { m_securityGroupIdHasBeenSet = true; m_securityGroupId = value; } /** *

The security group ID.

*/ inline void SetSecurityGroupId(Aws::String&& value) { m_securityGroupIdHasBeenSet = true; m_securityGroupId = std::move(value); } /** *

The security group ID.

*/ inline void SetSecurityGroupId(const char* value) { m_securityGroupIdHasBeenSet = true; m_securityGroupId.assign(value); } /** *

The security group ID.

*/ inline AnalysisSecurityGroupRule& WithSecurityGroupId(const Aws::String& value) { SetSecurityGroupId(value); return *this;} /** *

The security group ID.

*/ inline AnalysisSecurityGroupRule& WithSecurityGroupId(Aws::String&& value) { SetSecurityGroupId(std::move(value)); return *this;} /** *

The security group ID.

*/ inline AnalysisSecurityGroupRule& WithSecurityGroupId(const char* value) { SetSecurityGroupId(value); return *this;} /** *

The port range.

*/ inline const PortRange& GetPortRange() const{ return m_portRange; } /** *

The port range.

*/ inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; } /** *

The port range.

*/ inline void SetPortRange(const PortRange& value) { m_portRangeHasBeenSet = true; m_portRange = value; } /** *

The port range.

*/ inline void SetPortRange(PortRange&& value) { m_portRangeHasBeenSet = true; m_portRange = std::move(value); } /** *

The port range.

*/ inline AnalysisSecurityGroupRule& WithPortRange(const PortRange& value) { SetPortRange(value); return *this;} /** *

The port range.

*/ inline AnalysisSecurityGroupRule& WithPortRange(PortRange&& value) { SetPortRange(std::move(value)); return *this;} /** *

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The prefix list ID.

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

The protocol name.

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

The protocol name.

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

The protocol name.

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

The protocol name.

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

The protocol name.

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

The protocol name.

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

The protocol name.

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

The protocol name.

*/ inline AnalysisSecurityGroupRule& WithProtocol(const char* value) { SetProtocol(value); return *this;} private: Aws::String m_cidr; bool m_cidrHasBeenSet = false; Aws::String m_direction; bool m_directionHasBeenSet = false; Aws::String m_securityGroupId; bool m_securityGroupIdHasBeenSet = false; PortRange m_portRange; bool m_portRangeHasBeenSet = false; Aws::String m_prefixListId; bool m_prefixListIdHasBeenSet = false; Aws::String m_protocol; bool m_protocolHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws