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

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/swf/SWF_EXPORTS.h>

#include <utility>

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

/**
 * <p>Provides the details of the <code>ActivityTaskFailed</code>
 * event.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/swf-2012-01-25/ActivityTaskFailedEventAttributes">AWS
 * API Reference</a></p>
 */
class ActivityTaskFailedEventAttributes {
 public:
  AWS_SWF_API ActivityTaskFailedEventAttributes() = default;
  AWS_SWF_API ActivityTaskFailedEventAttributes(Aws::Utils::Json::JsonView jsonValue);
  AWS_SWF_API ActivityTaskFailedEventAttributes& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_SWF_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The reason provided for the failure.</p>
   */
  inline const Aws::String& GetReason() const { return m_reason; }
  inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
  template <typename ReasonT = Aws::String>
  void SetReason(ReasonT&& value) {
    m_reasonHasBeenSet = true;
    m_reason = std::forward<ReasonT>(value);
  }
  template <typename ReasonT = Aws::String>
  ActivityTaskFailedEventAttributes& WithReason(ReasonT&& value) {
    SetReason(std::forward<ReasonT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The details of the failure.</p>
   */
  inline const Aws::String& GetDetails() const { return m_details; }
  inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
  template <typename DetailsT = Aws::String>
  void SetDetails(DetailsT&& value) {
    m_detailsHasBeenSet = true;
    m_details = std::forward<DetailsT>(value);
  }
  template <typename DetailsT = Aws::String>
  ActivityTaskFailedEventAttributes& WithDetails(DetailsT&& value) {
    SetDetails(std::forward<DetailsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ID of the <code>ActivityTaskScheduled</code> event that was recorded when
   * this activity task was scheduled. This information can be useful for diagnosing
   * problems by tracing back the chain of events leading up to this event.</p>
   */
  inline long long GetScheduledEventId() const { return m_scheduledEventId; }
  inline bool ScheduledEventIdHasBeenSet() const { return m_scheduledEventIdHasBeenSet; }
  inline void SetScheduledEventId(long long value) {
    m_scheduledEventIdHasBeenSet = true;
    m_scheduledEventId = value;
  }
  inline ActivityTaskFailedEventAttributes& WithScheduledEventId(long long value) {
    SetScheduledEventId(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ID of the <code>ActivityTaskStarted</code> event recorded when this
   * activity task was started. This information can be useful for diagnosing
   * problems by tracing back the chain of events leading up to this event.</p>
   */
  inline long long GetStartedEventId() const { return m_startedEventId; }
  inline bool StartedEventIdHasBeenSet() const { return m_startedEventIdHasBeenSet; }
  inline void SetStartedEventId(long long value) {
    m_startedEventIdHasBeenSet = true;
    m_startedEventId = value;
  }
  inline ActivityTaskFailedEventAttributes& WithStartedEventId(long long value) {
    SetStartedEventId(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_reason;

  Aws::String m_details;

  long long m_scheduledEventId{0};

  long long m_startedEventId{0};
  bool m_reasonHasBeenSet = false;
  bool m_detailsHasBeenSet = false;
  bool m_scheduledEventIdHasBeenSet = false;
  bool m_startedEventIdHasBeenSet = false;
};

}  // namespace Model
}  // namespace SWF
}  // namespace Aws
