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/iotevents-data/IoTEventsData_EXPORTS.h> 8 #include <aws/iotevents-data/model/AlarmStateName.h> 9 #include <aws/iotevents-data/model/RuleEvaluation.h> 10 #include <aws/iotevents-data/model/CustomerAction.h> 11 #include <aws/iotevents-data/model/SystemEvent.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace IoTEventsData 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>Contains information about the current state of the alarm.</p><p><h3>See 31 * Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/iotevents-data-2018-10-23/AlarmState">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_IOTEVENTSDATA_API AlarmState 36 { 37 public: 38 AlarmState(); 39 AlarmState(Aws::Utils::Json::JsonView jsonValue); 40 AlarmState& operator=(Aws::Utils::Json::JsonView jsonValue); 41 Aws::Utils::Json::JsonValue Jsonize() const; 42 43 44 /** 45 * <p>The name of the alarm state. The state name can be one of the following 46 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 47 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 48 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 49 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 50 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 51 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 52 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 53 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 54 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 55 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 56 * period of time. After the snooze time, the alarm automatically changes to the 57 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 58 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 59 * data that the alarm is currently evaluating is within the specified range. To 60 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 61 * alarm.</p> </li> </ul> 62 */ GetStateName()63 inline const AlarmStateName& GetStateName() const{ return m_stateName; } 64 65 /** 66 * <p>The name of the alarm state. The state name can be one of the following 67 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 68 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 69 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 70 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 71 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 72 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 73 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 74 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 75 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 76 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 77 * period of time. After the snooze time, the alarm automatically changes to the 78 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 79 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 80 * data that the alarm is currently evaluating is within the specified range. To 81 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 82 * alarm.</p> </li> </ul> 83 */ StateNameHasBeenSet()84 inline bool StateNameHasBeenSet() const { return m_stateNameHasBeenSet; } 85 86 /** 87 * <p>The name of the alarm state. The state name can be one of the following 88 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 89 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 90 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 91 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 92 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 93 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 94 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 95 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 96 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 97 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 98 * period of time. After the snooze time, the alarm automatically changes to the 99 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 100 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 101 * data that the alarm is currently evaluating is within the specified range. To 102 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 103 * alarm.</p> </li> </ul> 104 */ SetStateName(const AlarmStateName & value)105 inline void SetStateName(const AlarmStateName& value) { m_stateNameHasBeenSet = true; m_stateName = value; } 106 107 /** 108 * <p>The name of the alarm state. The state name can be one of the following 109 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 110 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 111 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 112 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 113 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 114 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 115 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 116 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 117 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 118 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 119 * period of time. After the snooze time, the alarm automatically changes to the 120 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 121 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 122 * data that the alarm is currently evaluating is within the specified range. To 123 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 124 * alarm.</p> </li> </ul> 125 */ SetStateName(AlarmStateName && value)126 inline void SetStateName(AlarmStateName&& value) { m_stateNameHasBeenSet = true; m_stateName = std::move(value); } 127 128 /** 129 * <p>The name of the alarm state. The state name can be one of the following 130 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 131 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 132 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 133 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 134 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 135 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 136 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 137 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 138 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 139 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 140 * period of time. After the snooze time, the alarm automatically changes to the 141 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 142 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 143 * data that the alarm is currently evaluating is within the specified range. To 144 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 145 * alarm.</p> </li> </ul> 146 */ WithStateName(const AlarmStateName & value)147 inline AlarmState& WithStateName(const AlarmStateName& value) { SetStateName(value); return *this;} 148 149 /** 150 * <p>The name of the alarm state. The state name can be one of the following 151 * values:</p> <ul> <li> <p> <code>DISABLED</code> - When the alarm is in the 152 * <code>DISABLED</code> state, it isn't ready to evaluate data. To enable the 153 * alarm, you must change the alarm to the <code>NORMAL</code> state.</p> </li> 154 * <li> <p> <code>NORMAL</code> - When the alarm is in the <code>NORMAL</code> 155 * state, it's ready to evaluate data.</p> </li> <li> <p> <code>ACTIVE</code> - If 156 * the alarm is in the <code>ACTIVE</code> state, the alarm is invoked.</p> </li> 157 * <li> <p> <code>ACKNOWLEDGED</code> - When the alarm is in the 158 * <code>ACKNOWLEDGED</code> state, the alarm was invoked and you acknowledged the 159 * alarm.</p> </li> <li> <p> <code>SNOOZE_DISABLED</code> - When the alarm is in 160 * the <code>SNOOZE_DISABLED</code> state, the alarm is disabled for a specified 161 * period of time. After the snooze time, the alarm automatically changes to the 162 * <code>NORMAL</code> state. </p> </li> <li> <p> <code>LATCHED</code> - When the 163 * alarm is in the <code>LATCHED</code> state, the alarm was invoked. However, the 164 * data that the alarm is currently evaluating is within the specified range. To 165 * change the alarm to the <code>NORMAL</code> state, you must acknowledge the 166 * alarm.</p> </li> </ul> 167 */ WithStateName(AlarmStateName && value)168 inline AlarmState& WithStateName(AlarmStateName&& value) { SetStateName(std::move(value)); return *this;} 169 170 171 /** 172 * <p>Information needed to evaluate data.</p> 173 */ GetRuleEvaluation()174 inline const RuleEvaluation& GetRuleEvaluation() const{ return m_ruleEvaluation; } 175 176 /** 177 * <p>Information needed to evaluate data.</p> 178 */ RuleEvaluationHasBeenSet()179 inline bool RuleEvaluationHasBeenSet() const { return m_ruleEvaluationHasBeenSet; } 180 181 /** 182 * <p>Information needed to evaluate data.</p> 183 */ SetRuleEvaluation(const RuleEvaluation & value)184 inline void SetRuleEvaluation(const RuleEvaluation& value) { m_ruleEvaluationHasBeenSet = true; m_ruleEvaluation = value; } 185 186 /** 187 * <p>Information needed to evaluate data.</p> 188 */ SetRuleEvaluation(RuleEvaluation && value)189 inline void SetRuleEvaluation(RuleEvaluation&& value) { m_ruleEvaluationHasBeenSet = true; m_ruleEvaluation = std::move(value); } 190 191 /** 192 * <p>Information needed to evaluate data.</p> 193 */ WithRuleEvaluation(const RuleEvaluation & value)194 inline AlarmState& WithRuleEvaluation(const RuleEvaluation& value) { SetRuleEvaluation(value); return *this;} 195 196 /** 197 * <p>Information needed to evaluate data.</p> 198 */ WithRuleEvaluation(RuleEvaluation && value)199 inline AlarmState& WithRuleEvaluation(RuleEvaluation&& value) { SetRuleEvaluation(std::move(value)); return *this;} 200 201 202 /** 203 * <p>Contains information about the action that you can take to respond to the 204 * alarm.</p> 205 */ GetCustomerAction()206 inline const CustomerAction& GetCustomerAction() const{ return m_customerAction; } 207 208 /** 209 * <p>Contains information about the action that you can take to respond to the 210 * alarm.</p> 211 */ CustomerActionHasBeenSet()212 inline bool CustomerActionHasBeenSet() const { return m_customerActionHasBeenSet; } 213 214 /** 215 * <p>Contains information about the action that you can take to respond to the 216 * alarm.</p> 217 */ SetCustomerAction(const CustomerAction & value)218 inline void SetCustomerAction(const CustomerAction& value) { m_customerActionHasBeenSet = true; m_customerAction = value; } 219 220 /** 221 * <p>Contains information about the action that you can take to respond to the 222 * alarm.</p> 223 */ SetCustomerAction(CustomerAction && value)224 inline void SetCustomerAction(CustomerAction&& value) { m_customerActionHasBeenSet = true; m_customerAction = std::move(value); } 225 226 /** 227 * <p>Contains information about the action that you can take to respond to the 228 * alarm.</p> 229 */ WithCustomerAction(const CustomerAction & value)230 inline AlarmState& WithCustomerAction(const CustomerAction& value) { SetCustomerAction(value); return *this;} 231 232 /** 233 * <p>Contains information about the action that you can take to respond to the 234 * alarm.</p> 235 */ WithCustomerAction(CustomerAction && value)236 inline AlarmState& WithCustomerAction(CustomerAction&& value) { SetCustomerAction(std::move(value)); return *this;} 237 238 239 /** 240 * <p>Contains information about alarm state changes.</p> 241 */ GetSystemEvent()242 inline const SystemEvent& GetSystemEvent() const{ return m_systemEvent; } 243 244 /** 245 * <p>Contains information about alarm state changes.</p> 246 */ SystemEventHasBeenSet()247 inline bool SystemEventHasBeenSet() const { return m_systemEventHasBeenSet; } 248 249 /** 250 * <p>Contains information about alarm state changes.</p> 251 */ SetSystemEvent(const SystemEvent & value)252 inline void SetSystemEvent(const SystemEvent& value) { m_systemEventHasBeenSet = true; m_systemEvent = value; } 253 254 /** 255 * <p>Contains information about alarm state changes.</p> 256 */ SetSystemEvent(SystemEvent && value)257 inline void SetSystemEvent(SystemEvent&& value) { m_systemEventHasBeenSet = true; m_systemEvent = std::move(value); } 258 259 /** 260 * <p>Contains information about alarm state changes.</p> 261 */ WithSystemEvent(const SystemEvent & value)262 inline AlarmState& WithSystemEvent(const SystemEvent& value) { SetSystemEvent(value); return *this;} 263 264 /** 265 * <p>Contains information about alarm state changes.</p> 266 */ WithSystemEvent(SystemEvent && value)267 inline AlarmState& WithSystemEvent(SystemEvent&& value) { SetSystemEvent(std::move(value)); return *this;} 268 269 private: 270 271 AlarmStateName m_stateName; 272 bool m_stateNameHasBeenSet; 273 274 RuleEvaluation m_ruleEvaluation; 275 bool m_ruleEvaluationHasBeenSet; 276 277 CustomerAction m_customerAction; 278 bool m_customerActionHasBeenSet; 279 280 SystemEvent m_systemEvent; 281 bool m_systemEventHasBeenSet; 282 }; 283 284 } // namespace Model 285 } // namespace IoTEventsData 286 } // namespace Aws 287