1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/elasticmapreduce/EMR_EXPORTS.h> 8 #include <aws/elasticmapreduce/model/InstanceState.h> 9 #include <aws/elasticmapreduce/model/InstanceStateChangeReason.h> 10 #include <aws/elasticmapreduce/model/InstanceTimeline.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace EMR 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>The instance status details.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/InstanceStatus">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_EMR_API InstanceStatus 34 { 35 public: 36 InstanceStatus(); 37 InstanceStatus(Aws::Utils::Json::JsonView jsonValue); 38 InstanceStatus& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The current state of the instance.</p> 44 */ GetState()45 inline const InstanceState& GetState() const{ return m_state; } 46 47 /** 48 * <p>The current state of the instance.</p> 49 */ StateHasBeenSet()50 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } 51 52 /** 53 * <p>The current state of the instance.</p> 54 */ SetState(const InstanceState & value)55 inline void SetState(const InstanceState& value) { m_stateHasBeenSet = true; m_state = value; } 56 57 /** 58 * <p>The current state of the instance.</p> 59 */ SetState(InstanceState && value)60 inline void SetState(InstanceState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } 61 62 /** 63 * <p>The current state of the instance.</p> 64 */ WithState(const InstanceState & value)65 inline InstanceStatus& WithState(const InstanceState& value) { SetState(value); return *this;} 66 67 /** 68 * <p>The current state of the instance.</p> 69 */ WithState(InstanceState && value)70 inline InstanceStatus& WithState(InstanceState&& value) { SetState(std::move(value)); return *this;} 71 72 73 /** 74 * <p>The details of the status change reason for the instance.</p> 75 */ GetStateChangeReason()76 inline const InstanceStateChangeReason& GetStateChangeReason() const{ return m_stateChangeReason; } 77 78 /** 79 * <p>The details of the status change reason for the instance.</p> 80 */ StateChangeReasonHasBeenSet()81 inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; } 82 83 /** 84 * <p>The details of the status change reason for the instance.</p> 85 */ SetStateChangeReason(const InstanceStateChangeReason & value)86 inline void SetStateChangeReason(const InstanceStateChangeReason& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = value; } 87 88 /** 89 * <p>The details of the status change reason for the instance.</p> 90 */ SetStateChangeReason(InstanceStateChangeReason && value)91 inline void SetStateChangeReason(InstanceStateChangeReason&& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = std::move(value); } 92 93 /** 94 * <p>The details of the status change reason for the instance.</p> 95 */ WithStateChangeReason(const InstanceStateChangeReason & value)96 inline InstanceStatus& WithStateChangeReason(const InstanceStateChangeReason& value) { SetStateChangeReason(value); return *this;} 97 98 /** 99 * <p>The details of the status change reason for the instance.</p> 100 */ WithStateChangeReason(InstanceStateChangeReason && value)101 inline InstanceStatus& WithStateChangeReason(InstanceStateChangeReason&& value) { SetStateChangeReason(std::move(value)); return *this;} 102 103 104 /** 105 * <p>The timeline of the instance status over time.</p> 106 */ GetTimeline()107 inline const InstanceTimeline& GetTimeline() const{ return m_timeline; } 108 109 /** 110 * <p>The timeline of the instance status over time.</p> 111 */ TimelineHasBeenSet()112 inline bool TimelineHasBeenSet() const { return m_timelineHasBeenSet; } 113 114 /** 115 * <p>The timeline of the instance status over time.</p> 116 */ SetTimeline(const InstanceTimeline & value)117 inline void SetTimeline(const InstanceTimeline& value) { m_timelineHasBeenSet = true; m_timeline = value; } 118 119 /** 120 * <p>The timeline of the instance status over time.</p> 121 */ SetTimeline(InstanceTimeline && value)122 inline void SetTimeline(InstanceTimeline&& value) { m_timelineHasBeenSet = true; m_timeline = std::move(value); } 123 124 /** 125 * <p>The timeline of the instance status over time.</p> 126 */ WithTimeline(const InstanceTimeline & value)127 inline InstanceStatus& WithTimeline(const InstanceTimeline& value) { SetTimeline(value); return *this;} 128 129 /** 130 * <p>The timeline of the instance status over time.</p> 131 */ WithTimeline(InstanceTimeline && value)132 inline InstanceStatus& WithTimeline(InstanceTimeline&& value) { SetTimeline(std::move(value)); return *this;} 133 134 private: 135 136 InstanceState m_state; 137 bool m_stateHasBeenSet; 138 139 InstanceStateChangeReason m_stateChangeReason; 140 bool m_stateChangeReasonHasBeenSet; 141 142 InstanceTimeline m_timeline; 143 bool m_timelineHasBeenSet; 144 }; 145 146 } // namespace Model 147 } // namespace EMR 148 } // namespace Aws 149