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

#pragma once
#include <aws/codepipeline/CodePipeline_EXPORTS.h>
#include <aws/codepipeline/model/ConditionExecutionStatus.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSString.h>

#include <utility>

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

/**
 * <p>The run of a condition.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ConditionExecution">AWS
 * API Reference</a></p>
 */
class ConditionExecution {
 public:
  AWS_CODEPIPELINE_API ConditionExecution() = default;
  AWS_CODEPIPELINE_API ConditionExecution(Aws::Utils::Json::JsonView jsonValue);
  AWS_CODEPIPELINE_API ConditionExecution& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_CODEPIPELINE_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The status of the run for a condition.</p>
   */
  inline ConditionExecutionStatus GetStatus() const { return m_status; }
  inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
  inline void SetStatus(ConditionExecutionStatus value) {
    m_statusHasBeenSet = true;
    m_status = value;
  }
  inline ConditionExecution& WithStatus(ConditionExecutionStatus value) {
    SetStatus(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The summary of information about a run for a condition.</p>
   */
  inline const Aws::String& GetSummary() const { return m_summary; }
  inline bool SummaryHasBeenSet() const { return m_summaryHasBeenSet; }
  template <typename SummaryT = Aws::String>
  void SetSummary(SummaryT&& value) {
    m_summaryHasBeenSet = true;
    m_summary = std::forward<SummaryT>(value);
  }
  template <typename SummaryT = Aws::String>
  ConditionExecution& WithSummary(SummaryT&& value) {
    SetSummary(std::forward<SummaryT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The last status change of the condition.</p>
   */
  inline const Aws::Utils::DateTime& GetLastStatusChange() const { return m_lastStatusChange; }
  inline bool LastStatusChangeHasBeenSet() const { return m_lastStatusChangeHasBeenSet; }
  template <typename LastStatusChangeT = Aws::Utils::DateTime>
  void SetLastStatusChange(LastStatusChangeT&& value) {
    m_lastStatusChangeHasBeenSet = true;
    m_lastStatusChange = std::forward<LastStatusChangeT>(value);
  }
  template <typename LastStatusChangeT = Aws::Utils::DateTime>
  ConditionExecution& WithLastStatusChange(LastStatusChangeT&& value) {
    SetLastStatusChange(std::forward<LastStatusChangeT>(value));
    return *this;
  }
  ///@}
 private:
  ConditionExecutionStatus m_status{ConditionExecutionStatus::NOT_SET};
  bool m_statusHasBeenSet = false;

  Aws::String m_summary;
  bool m_summaryHasBeenSet = false;

  Aws::Utils::DateTime m_lastStatusChange{};
  bool m_lastStatusChangeHasBeenSet = false;
};

}  // namespace Model
}  // namespace CodePipeline
}  // namespace Aws
