/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #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.

See Also:

AWS * API Reference

*/ class SecurityGroup { public: AWS_EC2_API SecurityGroup(); AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API SecurityGroup& 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; /** *

A description of the security group.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the security group.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the security group.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the security group.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the security group.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the security group.

*/ inline SecurityGroup& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the security group.

*/ inline SecurityGroup& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the security group.

*/ inline SecurityGroup& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The name of the security group.

*/ inline const Aws::String& GetGroupName() const{ return m_groupName; } /** *

The name of the security group.

*/ inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } /** *

The name of the security group.

*/ inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } /** *

The name of the security group.

*/ inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } /** *

The name of the security group.

*/ inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } /** *

The name of the security group.

*/ inline SecurityGroup& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} /** *

The name of the security group.

*/ inline SecurityGroup& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} /** *

The name of the security group.

*/ inline SecurityGroup& WithGroupName(const char* value) { SetGroupName(value); return *this;} /** *

The inbound rules associated with the security group.

*/ inline const Aws::Vector& GetIpPermissions() const{ return m_ipPermissions; } /** *

The inbound rules associated with the security group.

*/ inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; } /** *

The inbound rules associated with the security group.

*/ inline void SetIpPermissions(const Aws::Vector& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = value; } /** *

The inbound rules associated with the security group.

*/ inline void SetIpPermissions(Aws::Vector&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::move(value); } /** *

The inbound rules associated with the security group.

*/ inline SecurityGroup& WithIpPermissions(const Aws::Vector& value) { SetIpPermissions(value); return *this;} /** *

The inbound rules associated with the security group.

*/ inline SecurityGroup& WithIpPermissions(Aws::Vector&& value) { SetIpPermissions(std::move(value)); return *this;} /** *

The inbound rules associated with the security group.

*/ inline SecurityGroup& AddIpPermissions(const IpPermission& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(value); return *this; } /** *

The inbound rules associated with the security group.

*/ inline SecurityGroup& AddIpPermissions(IpPermission&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(std::move(value)); return *this; } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline const Aws::String& GetOwnerId() const{ return m_ownerId; } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); } /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline SecurityGroup& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;} /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline SecurityGroup& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID of the owner of the security group.

*/ inline SecurityGroup& WithOwnerId(const char* value) { SetOwnerId(value); return *this;} /** *

The ID of the security group.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The ID of the security group.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The ID of the security group.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The ID of the security group.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The ID of the security group.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The ID of the security group.

*/ inline SecurityGroup& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The ID of the security group.

*/ inline SecurityGroup& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The ID of the security group.

*/ inline SecurityGroup& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

The outbound rules associated with the security group.

*/ inline const Aws::Vector& GetIpPermissionsEgress() const{ return m_ipPermissionsEgress; } /** *

The outbound rules associated with the security group.

*/ inline bool IpPermissionsEgressHasBeenSet() const { return m_ipPermissionsEgressHasBeenSet; } /** *

The outbound rules associated with the security group.

*/ inline void SetIpPermissionsEgress(const Aws::Vector& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = value; } /** *

The outbound rules associated with the security group.

*/ inline void SetIpPermissionsEgress(Aws::Vector&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = std::move(value); } /** *

The outbound rules associated with the security group.

*/ inline SecurityGroup& WithIpPermissionsEgress(const Aws::Vector& value) { SetIpPermissionsEgress(value); return *this;} /** *

The outbound rules associated with the security group.

*/ inline SecurityGroup& WithIpPermissionsEgress(Aws::Vector&& value) { SetIpPermissionsEgress(std::move(value)); return *this;} /** *

The outbound rules associated with the security group.

*/ inline SecurityGroup& AddIpPermissionsEgress(const IpPermission& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(value); return *this; } /** *

The outbound rules associated with the security group.

*/ inline SecurityGroup& AddIpPermissionsEgress(IpPermission&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(std::move(value)); return *this; } /** *

Any tags assigned to the security group.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags assigned to the security group.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Any tags assigned to the security group.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Any tags assigned to the security group.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Any tags assigned to the security group.

*/ inline SecurityGroup& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags assigned to the security group.

*/ inline SecurityGroup& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags assigned to the security group.

*/ inline SecurityGroup& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Any tags assigned to the security group.

*/ inline SecurityGroup& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The ID of the VPC for the security group.

*/ inline const Aws::String& GetVpcId() const{ return m_vpcId; } /** *

The ID of the VPC for the security group.

*/ inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } /** *

The ID of the VPC for the security group.

*/ inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } /** *

The ID of the VPC for the security group.

*/ inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } /** *

The ID of the VPC for the security group.

*/ inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } /** *

The ID of the VPC for the security group.

*/ inline SecurityGroup& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} /** *

The ID of the VPC for the security group.

*/ inline SecurityGroup& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} /** *

The ID of the VPC for the security group.

*/ inline SecurityGroup& WithVpcId(const char* value) { SetVpcId(value); return *this;} private: Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_groupName; bool m_groupNameHasBeenSet = false; Aws::Vector m_ipPermissions; bool m_ipPermissionsHasBeenSet = false; Aws::String m_ownerId; bool m_ownerIdHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; Aws::Vector m_ipPermissionsEgress; bool m_ipPermissionsEgressHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_vpcId; bool m_vpcIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws