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

#pragma once
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/model/StatusType.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace SecretsManager {
namespace Model {

/**
 * <p>A replication object consisting of a <code>RegionReplicationStatus</code>
 * object and includes a Region, KMSKeyId, status, and status
 * message.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicationStatusType">AWS
 * API Reference</a></p>
 */
class ReplicationStatusType {
 public:
  AWS_SECRETSMANAGER_API ReplicationStatusType() = default;
  AWS_SECRETSMANAGER_API ReplicationStatusType(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECRETSMANAGER_API ReplicationStatusType& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The Region where replication occurs.</p>
   */
  inline const Aws::String& GetRegion() const { return m_region; }
  inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
  template <typename RegionT = Aws::String>
  void SetRegion(RegionT&& value) {
    m_regionHasBeenSet = true;
    m_region = std::forward<RegionT>(value);
  }
  template <typename RegionT = Aws::String>
  ReplicationStatusType& WithRegion(RegionT&& value) {
    SetRegion(std::forward<RegionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>. </p>
   */
  inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
  inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
  template <typename KmsKeyIdT = Aws::String>
  void SetKmsKeyId(KmsKeyIdT&& value) {
    m_kmsKeyIdHasBeenSet = true;
    m_kmsKeyId = std::forward<KmsKeyIdT>(value);
  }
  template <typename KmsKeyIdT = Aws::String>
  ReplicationStatusType& WithKmsKeyId(KmsKeyIdT&& value) {
    SetKmsKeyId(std::forward<KmsKeyIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The status can be <code>InProgress</code>, <code>Failed</code>, or
   * <code>InSync</code>.</p>
   */
  inline StatusType GetStatus() const { return m_status; }
  inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
  inline void SetStatus(StatusType value) {
    m_statusHasBeenSet = true;
    m_status = value;
  }
  inline ReplicationStatusType& WithStatus(StatusType value) {
    SetStatus(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Status message such as "<i>Secret with this name already exists in this
   * region</i>".</p>
   */
  inline const Aws::String& GetStatusMessage() const { return m_statusMessage; }
  inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
  template <typename StatusMessageT = Aws::String>
  void SetStatusMessage(StatusMessageT&& value) {
    m_statusMessageHasBeenSet = true;
    m_statusMessage = std::forward<StatusMessageT>(value);
  }
  template <typename StatusMessageT = Aws::String>
  ReplicationStatusType& WithStatusMessage(StatusMessageT&& value) {
    SetStatusMessage(std::forward<StatusMessageT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The date that the secret was last accessed in the Region. This field is
   * omitted if the secret has never been retrieved in the Region.</p>
   */
  inline const Aws::Utils::DateTime& GetLastAccessedDate() const { return m_lastAccessedDate; }
  inline bool LastAccessedDateHasBeenSet() const { return m_lastAccessedDateHasBeenSet; }
  template <typename LastAccessedDateT = Aws::Utils::DateTime>
  void SetLastAccessedDate(LastAccessedDateT&& value) {
    m_lastAccessedDateHasBeenSet = true;
    m_lastAccessedDate = std::forward<LastAccessedDateT>(value);
  }
  template <typename LastAccessedDateT = Aws::Utils::DateTime>
  ReplicationStatusType& WithLastAccessedDate(LastAccessedDateT&& value) {
    SetLastAccessedDate(std::forward<LastAccessedDateT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_region;

  Aws::String m_kmsKeyId;

  StatusType m_status{StatusType::NOT_SET};

  Aws::String m_statusMessage;

  Aws::Utils::DateTime m_lastAccessedDate{};
  bool m_regionHasBeenSet = false;
  bool m_kmsKeyIdHasBeenSet = false;
  bool m_statusHasBeenSet = false;
  bool m_statusMessageHasBeenSet = false;
  bool m_lastAccessedDateHasBeenSet = false;
};

}  // namespace Model
}  // namespace SecretsManager
}  // namespace Aws
