/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/rds/RDS_EXPORTS.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Xml {
class XmlNode;
}  // namespace Xml
}  // namespace Utils
namespace RDS {
namespace Model {

/**
 * <p>This data type is used as a response element in the following actions:</p>
 * <ul> <li> <p> <code>AuthorizeDBSecurityGroupIngress</code> </p> </li> <li> <p>
 * <code>DescribeDBSecurityGroups</code> </p> </li> <li> <p>
 * <code>RevokeDBSecurityGroupIngress</code> </p> </li> </ul><p><h3>See Also:</h3>
 * <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/EC2SecurityGroup">AWS
 * API Reference</a></p>
 */
class EC2SecurityGroup {
 public:
  AWS_RDS_API EC2SecurityGroup() = default;
  AWS_RDS_API EC2SecurityGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
  AWS_RDS_API EC2SecurityGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

  AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
  AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const;

  ///@{
  /**
   * <p>Provides the status of the EC2 security group. Status can be "authorizing",
   * "authorized", "revoking", and "revoked".</p>
   */
  inline const Aws::String& GetStatus() const { return m_status; }
  inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
  template <typename StatusT = Aws::String>
  void SetStatus(StatusT&& value) {
    m_statusHasBeenSet = true;
    m_status = std::forward<StatusT>(value);
  }
  template <typename StatusT = Aws::String>
  EC2SecurityGroup& WithStatus(StatusT&& value) {
    SetStatus(std::forward<StatusT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the name of the EC2 security group.</p>
   */
  inline const Aws::String& GetEC2SecurityGroupName() const { return m_eC2SecurityGroupName; }
  inline bool EC2SecurityGroupNameHasBeenSet() const { return m_eC2SecurityGroupNameHasBeenSet; }
  template <typename EC2SecurityGroupNameT = Aws::String>
  void SetEC2SecurityGroupName(EC2SecurityGroupNameT&& value) {
    m_eC2SecurityGroupNameHasBeenSet = true;
    m_eC2SecurityGroupName = std::forward<EC2SecurityGroupNameT>(value);
  }
  template <typename EC2SecurityGroupNameT = Aws::String>
  EC2SecurityGroup& WithEC2SecurityGroupName(EC2SecurityGroupNameT&& value) {
    SetEC2SecurityGroupName(std::forward<EC2SecurityGroupNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the id of the EC2 security group.</p>
   */
  inline const Aws::String& GetEC2SecurityGroupId() const { return m_eC2SecurityGroupId; }
  inline bool EC2SecurityGroupIdHasBeenSet() const { return m_eC2SecurityGroupIdHasBeenSet; }
  template <typename EC2SecurityGroupIdT = Aws::String>
  void SetEC2SecurityGroupId(EC2SecurityGroupIdT&& value) {
    m_eC2SecurityGroupIdHasBeenSet = true;
    m_eC2SecurityGroupId = std::forward<EC2SecurityGroupIdT>(value);
  }
  template <typename EC2SecurityGroupIdT = Aws::String>
  EC2SecurityGroup& WithEC2SecurityGroupId(EC2SecurityGroupIdT&& value) {
    SetEC2SecurityGroupId(std::forward<EC2SecurityGroupIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the Amazon Web Services ID of the owner of the EC2 security group
   * specified in the <code>EC2SecurityGroupName</code> field.</p>
   */
  inline const Aws::String& GetEC2SecurityGroupOwnerId() const { return m_eC2SecurityGroupOwnerId; }
  inline bool EC2SecurityGroupOwnerIdHasBeenSet() const { return m_eC2SecurityGroupOwnerIdHasBeenSet; }
  template <typename EC2SecurityGroupOwnerIdT = Aws::String>
  void SetEC2SecurityGroupOwnerId(EC2SecurityGroupOwnerIdT&& value) {
    m_eC2SecurityGroupOwnerIdHasBeenSet = true;
    m_eC2SecurityGroupOwnerId = std::forward<EC2SecurityGroupOwnerIdT>(value);
  }
  template <typename EC2SecurityGroupOwnerIdT = Aws::String>
  EC2SecurityGroup& WithEC2SecurityGroupOwnerId(EC2SecurityGroupOwnerIdT&& value) {
    SetEC2SecurityGroupOwnerId(std::forward<EC2SecurityGroupOwnerIdT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_status;

  Aws::String m_eC2SecurityGroupName;

  Aws::String m_eC2SecurityGroupId;

  Aws::String m_eC2SecurityGroupOwnerId;
  bool m_statusHasBeenSet = false;
  bool m_eC2SecurityGroupNameHasBeenSet = false;
  bool m_eC2SecurityGroupIdHasBeenSet = false;
  bool m_eC2SecurityGroupOwnerIdHasBeenSet = false;
};

}  // namespace Model
}  // namespace RDS
}  // namespace Aws
