/**
 * 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/ec2/EC2_EXPORTS.h>
#include <aws/ec2/model/RegionGeography.h>

#include <utility>

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

/**
 * <p>Describes a Region.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Region">AWS API
 * Reference</a></p>
 */
class Region {
 public:
  AWS_EC2_API Region() = default;
  AWS_EC2_API Region(const Aws::Utils::Xml::XmlNode& xmlNode);
  AWS_EC2_API Region& 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;

  ///@{
  /**
   * <p>The Region opt-in status. The possible values are
   * <code>opt-in-not-required</code>, <code>opted-in</code>, and
   * <code>not-opted-in</code>.</p>
   */
  inline const Aws::String& GetOptInStatus() const { return m_optInStatus; }
  inline bool OptInStatusHasBeenSet() const { return m_optInStatusHasBeenSet; }
  template <typename OptInStatusT = Aws::String>
  void SetOptInStatus(OptInStatusT&& value) {
    m_optInStatusHasBeenSet = true;
    m_optInStatus = std::forward<OptInStatusT>(value);
  }
  template <typename OptInStatusT = Aws::String>
  Region& WithOptInStatus(OptInStatusT&& value) {
    SetOptInStatus(std::forward<OptInStatusT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The geography information for the Region. The geography is returned as a
   * list.</p>
   */
  inline const Aws::Vector<RegionGeography>& GetGeography() const { return m_geography; }
  inline bool GeographyHasBeenSet() const { return m_geographyHasBeenSet; }
  template <typename GeographyT = Aws::Vector<RegionGeography>>
  void SetGeography(GeographyT&& value) {
    m_geographyHasBeenSet = true;
    m_geography = std::forward<GeographyT>(value);
  }
  template <typename GeographyT = Aws::Vector<RegionGeography>>
  Region& WithGeography(GeographyT&& value) {
    SetGeography(std::forward<GeographyT>(value));
    return *this;
  }
  template <typename GeographyT = RegionGeography>
  Region& AddGeography(GeographyT&& value) {
    m_geographyHasBeenSet = true;
    m_geography.emplace_back(std::forward<GeographyT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the Region.</p>
   */
  inline const Aws::String& GetRegionName() const { return m_regionName; }
  inline bool RegionNameHasBeenSet() const { return m_regionNameHasBeenSet; }
  template <typename RegionNameT = Aws::String>
  void SetRegionName(RegionNameT&& value) {
    m_regionNameHasBeenSet = true;
    m_regionName = std::forward<RegionNameT>(value);
  }
  template <typename RegionNameT = Aws::String>
  Region& WithRegionName(RegionNameT&& value) {
    SetRegionName(std::forward<RegionNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Region service endpoint.</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>
  Region& WithEndpoint(EndpointT&& value) {
    SetEndpoint(std::forward<EndpointT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_optInStatus;

  Aws::Vector<RegionGeography> m_geography;

  Aws::String m_regionName;

  Aws::String m_endpoint;
  bool m_optInStatusHasBeenSet = false;
  bool m_geographyHasBeenSet = false;
  bool m_regionNameHasBeenSet = false;
  bool m_endpointHasBeenSet = false;
};

}  // namespace Model
}  // namespace EC2
}  // namespace Aws
