AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
ClusterStatus.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/elasticmapreduce/EMR_EXPORTS.h>
9#include <aws/elasticmapreduce/model/ClusterState.h>
10#include <aws/elasticmapreduce/model/ClusterStateChangeReason.h>
11#include <aws/elasticmapreduce/model/ClusterTimeline.h>
12#include <aws/elasticmapreduce/model/ErrorDetail.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace EMR {
24namespace Model {
25
32 public:
33 AWS_EMR_API ClusterStatus() = default;
37
39
42 inline ClusterState GetState() const { return m_state; }
43 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
44 inline void SetState(ClusterState value) {
45 m_stateHasBeenSet = true;
46 m_state = value;
47 }
49 SetState(value);
50 return *this;
51 }
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) {
62 m_stateChangeReasonHasBeenSet = true;
63 m_stateChangeReason = std::forward<StateChangeReasonT>(value);
64 }
65 template <typename StateChangeReasonT = ClusterStateChangeReason>
66 ClusterStatus& WithStateChangeReason(StateChangeReasonT&& value) {
67 SetStateChangeReason(std::forward<StateChangeReasonT>(value));
68 return *this;
69 }
71
73
77 inline const ClusterTimeline& GetTimeline() const { return m_timeline; }
78 inline bool TimelineHasBeenSet() const { return m_timelineHasBeenSet; }
79 template <typename TimelineT = ClusterTimeline>
80 void SetTimeline(TimelineT&& value) {
81 m_timelineHasBeenSet = true;
82 m_timeline = std::forward<TimelineT>(value);
83 }
84 template <typename TimelineT = ClusterTimeline>
85 ClusterStatus& WithTimeline(TimelineT&& value) {
86 SetTimeline(std::forward<TimelineT>(value));
87 return *this;
88 }
90
92
97 inline const Aws::Vector<ErrorDetail>& GetErrorDetails() const { return m_errorDetails; }
98 inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; }
99 template <typename ErrorDetailsT = Aws::Vector<ErrorDetail>>
100 void SetErrorDetails(ErrorDetailsT&& value) {
101 m_errorDetailsHasBeenSet = true;
102 m_errorDetails = std::forward<ErrorDetailsT>(value);
103 }
104 template <typename ErrorDetailsT = Aws::Vector<ErrorDetail>>
105 ClusterStatus& WithErrorDetails(ErrorDetailsT&& value) {
106 SetErrorDetails(std::forward<ErrorDetailsT>(value));
107 return *this;
108 }
109 template <typename ErrorDetailsT = ErrorDetail>
110 ClusterStatus& AddErrorDetails(ErrorDetailsT&& value) {
111 m_errorDetailsHasBeenSet = true;
112 m_errorDetails.emplace_back(std::forward<ErrorDetailsT>(value));
113 return *this;
114 }
116 private:
118
119 ClusterStateChangeReason m_stateChangeReason;
120
121 ClusterTimeline m_timeline;
122
123 Aws::Vector<ErrorDetail> m_errorDetails;
124 bool m_stateHasBeenSet = false;
125 bool m_stateChangeReasonHasBeenSet = false;
126 bool m_timelineHasBeenSet = false;
127 bool m_errorDetailsHasBeenSet = false;
128};
129
130} // namespace Model
131} // namespace EMR
132} // 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