/**
 * 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/core/utils/memory/stl/AWSVector.h>
#include <aws/rds/RDS_EXPORTS.h>
#include <aws/rds/model/ResponseMetadata.h>
#include <aws/rds/model/Tag.h>

#include <utility>

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

/**
 * <p>Contains the details for an Amazon RDS DB shard group.</p><p><h3>See
 * Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DBShardGroup">AWS
 * API Reference</a></p>
 */
class DBShardGroup {
 public:
  AWS_RDS_API DBShardGroup() = default;
  AWS_RDS_API DBShardGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
  AWS_RDS_API DBShardGroup& 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>The Amazon Web Services Region-unique, immutable identifier for the DB shard
   * group.</p>
   */
  inline const Aws::String& GetDBShardGroupResourceId() const { return m_dBShardGroupResourceId; }
  inline bool DBShardGroupResourceIdHasBeenSet() const { return m_dBShardGroupResourceIdHasBeenSet; }
  template <typename DBShardGroupResourceIdT = Aws::String>
  void SetDBShardGroupResourceId(DBShardGroupResourceIdT&& value) {
    m_dBShardGroupResourceIdHasBeenSet = true;
    m_dBShardGroupResourceId = std::forward<DBShardGroupResourceIdT>(value);
  }
  template <typename DBShardGroupResourceIdT = Aws::String>
  DBShardGroup& WithDBShardGroupResourceId(DBShardGroupResourceIdT&& value) {
    SetDBShardGroupResourceId(std::forward<DBShardGroupResourceIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the DB shard group.</p>
   */
  inline const Aws::String& GetDBShardGroupIdentifier() const { return m_dBShardGroupIdentifier; }
  inline bool DBShardGroupIdentifierHasBeenSet() const { return m_dBShardGroupIdentifierHasBeenSet; }
  template <typename DBShardGroupIdentifierT = Aws::String>
  void SetDBShardGroupIdentifier(DBShardGroupIdentifierT&& value) {
    m_dBShardGroupIdentifierHasBeenSet = true;
    m_dBShardGroupIdentifier = std::forward<DBShardGroupIdentifierT>(value);
  }
  template <typename DBShardGroupIdentifierT = Aws::String>
  DBShardGroup& WithDBShardGroupIdentifier(DBShardGroupIdentifierT&& value) {
    SetDBShardGroupIdentifier(std::forward<DBShardGroupIdentifierT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the primary DB cluster for the DB shard group.</p>
   */
  inline const Aws::String& GetDBClusterIdentifier() const { return m_dBClusterIdentifier; }
  inline bool DBClusterIdentifierHasBeenSet() const { return m_dBClusterIdentifierHasBeenSet; }
  template <typename DBClusterIdentifierT = Aws::String>
  void SetDBClusterIdentifier(DBClusterIdentifierT&& value) {
    m_dBClusterIdentifierHasBeenSet = true;
    m_dBClusterIdentifier = std::forward<DBClusterIdentifierT>(value);
  }
  template <typename DBClusterIdentifierT = Aws::String>
  DBShardGroup& WithDBClusterIdentifier(DBClusterIdentifierT&& value) {
    SetDBClusterIdentifier(std::forward<DBClusterIdentifierT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The maximum capacity of the DB shard group in Aurora capacity units
   * (ACUs).</p>
   */
  inline double GetMaxACU() const { return m_maxACU; }
  inline bool MaxACUHasBeenSet() const { return m_maxACUHasBeenSet; }
  inline void SetMaxACU(double value) {
    m_maxACUHasBeenSet = true;
    m_maxACU = value;
  }
  inline DBShardGroup& WithMaxACU(double value) {
    SetMaxACU(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The minimum capacity of the DB shard group in Aurora capacity units
   * (ACUs).</p>
   */
  inline double GetMinACU() const { return m_minACU; }
  inline bool MinACUHasBeenSet() const { return m_minACUHasBeenSet; }
  inline void SetMinACU(double value) {
    m_minACUHasBeenSet = true;
    m_minACU = value;
  }
  inline DBShardGroup& WithMinACU(double value) {
    SetMinACU(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies whether to create standby DB shard groups for the DB shard group.
   * Valid values are the following:</p> <ul> <li> <p>0 - Creates a DB shard group
   * without a standby DB shard group. This is the default value.</p> </li> <li> <p>1
   * - Creates a DB shard group with a standby DB shard group in a different
   * Availability Zone (AZ).</p> </li> <li> <p>2 - Creates a DB shard group with two
   * standby DB shard groups in two different AZs.</p> </li> </ul>
   */
  inline int GetComputeRedundancy() const { return m_computeRedundancy; }
  inline bool ComputeRedundancyHasBeenSet() const { return m_computeRedundancyHasBeenSet; }
  inline void SetComputeRedundancy(int value) {
    m_computeRedundancyHasBeenSet = true;
    m_computeRedundancy = value;
  }
  inline DBShardGroup& WithComputeRedundancy(int value) {
    SetComputeRedundancy(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The status of the DB shard group.</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>
  DBShardGroup& WithStatus(StatusT&& value) {
    SetStatus(std::forward<StatusT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates whether the DB shard group is publicly accessible.</p> <p>When the
   * DB shard group is publicly accessible, its Domain Name System (DNS) endpoint
   * resolves to the private IP address from within the DB shard group's virtual
   * private cloud (VPC). It resolves to the public IP address from outside of the DB
   * shard group's VPC. Access to the DB shard group is ultimately controlled by the
   * security group it uses. That public access isn't permitted if the security group
   * assigned to the DB shard group doesn't permit it.</p> <p>When the DB shard group
   * isn't publicly accessible, it is an internal DB shard group with a DNS name that
   * resolves to a private IP address.</p> <p>For more information, see
   * <a>CreateDBShardGroup</a>.</p> <p>This setting is only for Aurora Limitless
   * Database.</p>
   */
  inline bool GetPubliclyAccessible() const { return m_publiclyAccessible; }
  inline bool PubliclyAccessibleHasBeenSet() const { return m_publiclyAccessibleHasBeenSet; }
  inline void SetPubliclyAccessible(bool value) {
    m_publiclyAccessibleHasBeenSet = true;
    m_publiclyAccessible = value;
  }
  inline DBShardGroup& WithPubliclyAccessible(bool value) {
    SetPubliclyAccessible(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The connection endpoint for the DB shard group.</p>
   */
  inline const Aws::String& GetEndpoint() const { return m_endpoint; }
  inline bool EndpointHasBeenSet() const { return m_endpointHasBeenSet; }
  template <typename EndpointT = Aws::String>
  void SetEndpoint(EndpointT&& value) {
    m_endpointHasBeenSet = true;
    m_endpoint = std::forward<EndpointT>(value);
  }
  template <typename EndpointT = Aws::String>
  DBShardGroup& WithEndpoint(EndpointT&& value) {
    SetEndpoint(std::forward<EndpointT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Amazon Resource Name (ARN) for the DB shard group.</p>
   */
  inline const Aws::String& GetDBShardGroupArn() const { return m_dBShardGroupArn; }
  inline bool DBShardGroupArnHasBeenSet() const { return m_dBShardGroupArnHasBeenSet; }
  template <typename DBShardGroupArnT = Aws::String>
  void SetDBShardGroupArn(DBShardGroupArnT&& value) {
    m_dBShardGroupArnHasBeenSet = true;
    m_dBShardGroupArn = std::forward<DBShardGroupArnT>(value);
  }
  template <typename DBShardGroupArnT = Aws::String>
  DBShardGroup& WithDBShardGroupArn(DBShardGroupArnT&& value) {
    SetDBShardGroupArn(std::forward<DBShardGroupArnT>(value));
    return *this;
  }
  ///@}

  ///@{

  inline const Aws::Vector<Tag>& GetTagList() const { return m_tagList; }
  inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; }
  template <typename TagListT = Aws::Vector<Tag>>
  void SetTagList(TagListT&& value) {
    m_tagListHasBeenSet = true;
    m_tagList = std::forward<TagListT>(value);
  }
  template <typename TagListT = Aws::Vector<Tag>>
  DBShardGroup& WithTagList(TagListT&& value) {
    SetTagList(std::forward<TagListT>(value));
    return *this;
  }
  template <typename TagListT = Tag>
  DBShardGroup& AddTagList(TagListT&& value) {
    m_tagListHasBeenSet = true;
    m_tagList.emplace_back(std::forward<TagListT>(value));
    return *this;
  }
  ///@}

  ///@{

  inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
  template <typename ResponseMetadataT = ResponseMetadata>
  void SetResponseMetadata(ResponseMetadataT&& value) {
    m_responseMetadataHasBeenSet = true;
    m_responseMetadata = std::forward<ResponseMetadataT>(value);
  }
  template <typename ResponseMetadataT = ResponseMetadata>
  DBShardGroup& WithResponseMetadata(ResponseMetadataT&& value) {
    SetResponseMetadata(std::forward<ResponseMetadataT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_dBShardGroupResourceId;

  Aws::String m_dBShardGroupIdentifier;

  Aws::String m_dBClusterIdentifier;

  double m_maxACU{0.0};

  double m_minACU{0.0};

  int m_computeRedundancy{0};

  Aws::String m_status;

  bool m_publiclyAccessible{false};

  Aws::String m_endpoint;

  Aws::String m_dBShardGroupArn;

  Aws::Vector<Tag> m_tagList;

  ResponseMetadata m_responseMetadata;
  bool m_dBShardGroupResourceIdHasBeenSet = false;
  bool m_dBShardGroupIdentifierHasBeenSet = false;
  bool m_dBClusterIdentifierHasBeenSet = false;
  bool m_maxACUHasBeenSet = false;
  bool m_minACUHasBeenSet = false;
  bool m_computeRedundancyHasBeenSet = false;
  bool m_statusHasBeenSet = false;
  bool m_publiclyAccessibleHasBeenSet = false;
  bool m_endpointHasBeenSet = false;
  bool m_dBShardGroupArnHasBeenSet = false;
  bool m_tagListHasBeenSet = false;
  bool m_responseMetadataHasBeenSet = true;
};

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