AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
ClusterStatus.h
1
6#pragma once
7#include <aws/elasticmapreduce/EMR_EXPORTS.h>
8#include <aws/elasticmapreduce/model/ClusterState.h>
9#include <aws/elasticmapreduce/model/ClusterStateChangeReason.h>
10#include <aws/elasticmapreduce/model/ClusterTimeline.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/elasticmapreduce/model/ErrorDetail.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace EMR
26{
27namespace Model
28{
29
36 {
37 public:
38 AWS_EMR_API ClusterStatus() = default;
42
43
45
48 inline ClusterState GetState() const { return m_state; }
49 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
50 inline void SetState(ClusterState value) { m_stateHasBeenSet = true; m_state = value; }
51 inline ClusterStatus& WithState(ClusterState value) { SetState(value); return *this;}
53
55
58 inline const ClusterStateChangeReason& GetStateChangeReason() const { return m_stateChangeReason; }
59 inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; }
60 template<typename StateChangeReasonT = ClusterStateChangeReason>
61 void SetStateChangeReason(StateChangeReasonT&& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = std::forward<StateChangeReasonT>(value); }
62 template<typename StateChangeReasonT = ClusterStateChangeReason>
63 ClusterStatus& WithStateChangeReason(StateChangeReasonT&& value) { SetStateChangeReason(std::forward<StateChangeReasonT>(value)); return *this;}
65
67
71 inline const ClusterTimeline& GetTimeline() const { return m_timeline; }
72 inline bool TimelineHasBeenSet() const { return m_timelineHasBeenSet; }
73 template<typename TimelineT = ClusterTimeline>
74 void SetTimeline(TimelineT&& value) { m_timelineHasBeenSet = true; m_timeline = std::forward<TimelineT>(value); }
75 template<typename TimelineT = ClusterTimeline>
76 ClusterStatus& WithTimeline(TimelineT&& value) { SetTimeline(std::forward<TimelineT>(value)); return *this;}
78
80
85 inline const Aws::Vector<ErrorDetail>& GetErrorDetails() const { return m_errorDetails; }
86 inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; }
87 template<typename ErrorDetailsT = Aws::Vector<ErrorDetail>>
88 void SetErrorDetails(ErrorDetailsT&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = std::forward<ErrorDetailsT>(value); }
89 template<typename ErrorDetailsT = Aws::Vector<ErrorDetail>>
90 ClusterStatus& WithErrorDetails(ErrorDetailsT&& value) { SetErrorDetails(std::forward<ErrorDetailsT>(value)); return *this;}
91 template<typename ErrorDetailsT = ErrorDetail>
92 ClusterStatus& AddErrorDetails(ErrorDetailsT&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails.emplace_back(std::forward<ErrorDetailsT>(value)); return *this; }
94 private:
95
97 bool m_stateHasBeenSet = false;
98
99 ClusterStateChangeReason m_stateChangeReason;
100 bool m_stateChangeReasonHasBeenSet = false;
101
102 ClusterTimeline m_timeline;
103 bool m_timelineHasBeenSet = false;
104
105 Aws::Vector<ErrorDetail> m_errorDetails;
106 bool m_errorDetailsHasBeenSet = false;
107 };
108
109} // namespace Model
110} // namespace EMR
111} // namespace Aws
const ClusterTimeline & GetTimeline() const
AWS_EMR_API ClusterStatus(Aws::Utils::Json::JsonView jsonValue)
void SetStateChangeReason(StateChangeReasonT &&value)
const ClusterStateChangeReason & GetStateChangeReason() const
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTimeline(TimelineT &&value)
ClusterStatus & WithErrorDetails(ErrorDetailsT &&value)
AWS_EMR_API ClusterStatus()=default
const Aws::Vector< ErrorDetail > & GetErrorDetails() const
void SetState(ClusterState value)
ClusterStatus & WithStateChangeReason(StateChangeReasonT &&value)
ClusterStatus & WithState(ClusterState value)
AWS_EMR_API ClusterStatus & operator=(Aws::Utils::Json::JsonView jsonValue)
ClusterState GetState() const
ClusterStatus & WithTimeline(TimelineT &&value)
void SetErrorDetails(ErrorDetailsT &&value)
ClusterStatus & AddErrorDetails(ErrorDetailsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue