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/core/utils/memory/stl/AWSString.h> 9 #include <aws/iotevents-data/model/AlarmState.h> 10 #include <aws/core/utils/DateTime.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 IoTEventsData 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Contains information about an alarm.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/iotevents-data-2018-10-23/Alarm">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_IOTEVENTSDATA_API Alarm 34 { 35 public: 36 Alarm(); 37 Alarm(Aws::Utils::Json::JsonView jsonValue); 38 Alarm& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The name of the alarm model.</p> 44 */ GetAlarmModelName()45 inline const Aws::String& GetAlarmModelName() const{ return m_alarmModelName; } 46 47 /** 48 * <p>The name of the alarm model.</p> 49 */ AlarmModelNameHasBeenSet()50 inline bool AlarmModelNameHasBeenSet() const { return m_alarmModelNameHasBeenSet; } 51 52 /** 53 * <p>The name of the alarm model.</p> 54 */ SetAlarmModelName(const Aws::String & value)55 inline void SetAlarmModelName(const Aws::String& value) { m_alarmModelNameHasBeenSet = true; m_alarmModelName = value; } 56 57 /** 58 * <p>The name of the alarm model.</p> 59 */ SetAlarmModelName(Aws::String && value)60 inline void SetAlarmModelName(Aws::String&& value) { m_alarmModelNameHasBeenSet = true; m_alarmModelName = std::move(value); } 61 62 /** 63 * <p>The name of the alarm model.</p> 64 */ SetAlarmModelName(const char * value)65 inline void SetAlarmModelName(const char* value) { m_alarmModelNameHasBeenSet = true; m_alarmModelName.assign(value); } 66 67 /** 68 * <p>The name of the alarm model.</p> 69 */ WithAlarmModelName(const Aws::String & value)70 inline Alarm& WithAlarmModelName(const Aws::String& value) { SetAlarmModelName(value); return *this;} 71 72 /** 73 * <p>The name of the alarm model.</p> 74 */ WithAlarmModelName(Aws::String && value)75 inline Alarm& WithAlarmModelName(Aws::String&& value) { SetAlarmModelName(std::move(value)); return *this;} 76 77 /** 78 * <p>The name of the alarm model.</p> 79 */ WithAlarmModelName(const char * value)80 inline Alarm& WithAlarmModelName(const char* value) { SetAlarmModelName(value); return *this;} 81 82 83 /** 84 * <p>The version of the alarm model.</p> 85 */ GetAlarmModelVersion()86 inline const Aws::String& GetAlarmModelVersion() const{ return m_alarmModelVersion; } 87 88 /** 89 * <p>The version of the alarm model.</p> 90 */ AlarmModelVersionHasBeenSet()91 inline bool AlarmModelVersionHasBeenSet() const { return m_alarmModelVersionHasBeenSet; } 92 93 /** 94 * <p>The version of the alarm model.</p> 95 */ SetAlarmModelVersion(const Aws::String & value)96 inline void SetAlarmModelVersion(const Aws::String& value) { m_alarmModelVersionHasBeenSet = true; m_alarmModelVersion = value; } 97 98 /** 99 * <p>The version of the alarm model.</p> 100 */ SetAlarmModelVersion(Aws::String && value)101 inline void SetAlarmModelVersion(Aws::String&& value) { m_alarmModelVersionHasBeenSet = true; m_alarmModelVersion = std::move(value); } 102 103 /** 104 * <p>The version of the alarm model.</p> 105 */ SetAlarmModelVersion(const char * value)106 inline void SetAlarmModelVersion(const char* value) { m_alarmModelVersionHasBeenSet = true; m_alarmModelVersion.assign(value); } 107 108 /** 109 * <p>The version of the alarm model.</p> 110 */ WithAlarmModelVersion(const Aws::String & value)111 inline Alarm& WithAlarmModelVersion(const Aws::String& value) { SetAlarmModelVersion(value); return *this;} 112 113 /** 114 * <p>The version of the alarm model.</p> 115 */ WithAlarmModelVersion(Aws::String && value)116 inline Alarm& WithAlarmModelVersion(Aws::String&& value) { SetAlarmModelVersion(std::move(value)); return *this;} 117 118 /** 119 * <p>The version of the alarm model.</p> 120 */ WithAlarmModelVersion(const char * value)121 inline Alarm& WithAlarmModelVersion(const char* value) { SetAlarmModelVersion(value); return *this;} 122 123 124 /** 125 * <p>The value of the key used as a filter to select only the alarms associated 126 * with the <a 127 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 128 */ GetKeyValue()129 inline const Aws::String& GetKeyValue() const{ return m_keyValue; } 130 131 /** 132 * <p>The value of the key used as a filter to select only the alarms associated 133 * with the <a 134 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 135 */ KeyValueHasBeenSet()136 inline bool KeyValueHasBeenSet() const { return m_keyValueHasBeenSet; } 137 138 /** 139 * <p>The value of the key used as a filter to select only the alarms associated 140 * with the <a 141 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 142 */ SetKeyValue(const Aws::String & value)143 inline void SetKeyValue(const Aws::String& value) { m_keyValueHasBeenSet = true; m_keyValue = value; } 144 145 /** 146 * <p>The value of the key used as a filter to select only the alarms associated 147 * with the <a 148 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 149 */ SetKeyValue(Aws::String && value)150 inline void SetKeyValue(Aws::String&& value) { m_keyValueHasBeenSet = true; m_keyValue = std::move(value); } 151 152 /** 153 * <p>The value of the key used as a filter to select only the alarms associated 154 * with the <a 155 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 156 */ SetKeyValue(const char * value)157 inline void SetKeyValue(const char* value) { m_keyValueHasBeenSet = true; m_keyValue.assign(value); } 158 159 /** 160 * <p>The value of the key used as a filter to select only the alarms associated 161 * with the <a 162 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 163 */ WithKeyValue(const Aws::String & value)164 inline Alarm& WithKeyValue(const Aws::String& value) { SetKeyValue(value); return *this;} 165 166 /** 167 * <p>The value of the key used as a filter to select only the alarms associated 168 * with the <a 169 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 170 */ WithKeyValue(Aws::String && value)171 inline Alarm& WithKeyValue(Aws::String&& value) { SetKeyValue(std::move(value)); return *this;} 172 173 /** 174 * <p>The value of the key used as a filter to select only the alarms associated 175 * with the <a 176 * href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key">key</a>.</p> 177 */ WithKeyValue(const char * value)178 inline Alarm& WithKeyValue(const char* value) { SetKeyValue(value); return *this;} 179 180 181 /** 182 * <p>Contains information about the current state of the alarm.</p> 183 */ GetAlarmState()184 inline const AlarmState& GetAlarmState() const{ return m_alarmState; } 185 186 /** 187 * <p>Contains information about the current state of the alarm.</p> 188 */ AlarmStateHasBeenSet()189 inline bool AlarmStateHasBeenSet() const { return m_alarmStateHasBeenSet; } 190 191 /** 192 * <p>Contains information about the current state of the alarm.</p> 193 */ SetAlarmState(const AlarmState & value)194 inline void SetAlarmState(const AlarmState& value) { m_alarmStateHasBeenSet = true; m_alarmState = value; } 195 196 /** 197 * <p>Contains information about the current state of the alarm.</p> 198 */ SetAlarmState(AlarmState && value)199 inline void SetAlarmState(AlarmState&& value) { m_alarmStateHasBeenSet = true; m_alarmState = std::move(value); } 200 201 /** 202 * <p>Contains information about the current state of the alarm.</p> 203 */ WithAlarmState(const AlarmState & value)204 inline Alarm& WithAlarmState(const AlarmState& value) { SetAlarmState(value); return *this;} 205 206 /** 207 * <p>Contains information about the current state of the alarm.</p> 208 */ WithAlarmState(AlarmState && value)209 inline Alarm& WithAlarmState(AlarmState&& value) { SetAlarmState(std::move(value)); return *this;} 210 211 212 /** 213 * <p>A non-negative integer that reflects the severity level of the alarm.</p> 214 */ GetSeverity()215 inline int GetSeverity() const{ return m_severity; } 216 217 /** 218 * <p>A non-negative integer that reflects the severity level of the alarm.</p> 219 */ SeverityHasBeenSet()220 inline bool SeverityHasBeenSet() const { return m_severityHasBeenSet; } 221 222 /** 223 * <p>A non-negative integer that reflects the severity level of the alarm.</p> 224 */ SetSeverity(int value)225 inline void SetSeverity(int value) { m_severityHasBeenSet = true; m_severity = value; } 226 227 /** 228 * <p>A non-negative integer that reflects the severity level of the alarm.</p> 229 */ WithSeverity(int value)230 inline Alarm& WithSeverity(int value) { SetSeverity(value); return *this;} 231 232 233 /** 234 * <p>The time the alarm was created, in the Unix epoch format.</p> 235 */ GetCreationTime()236 inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } 237 238 /** 239 * <p>The time the alarm was created, in the Unix epoch format.</p> 240 */ CreationTimeHasBeenSet()241 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } 242 243 /** 244 * <p>The time the alarm was created, in the Unix epoch format.</p> 245 */ SetCreationTime(const Aws::Utils::DateTime & value)246 inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } 247 248 /** 249 * <p>The time the alarm was created, in the Unix epoch format.</p> 250 */ SetCreationTime(Aws::Utils::DateTime && value)251 inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } 252 253 /** 254 * <p>The time the alarm was created, in the Unix epoch format.</p> 255 */ WithCreationTime(const Aws::Utils::DateTime & value)256 inline Alarm& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} 257 258 /** 259 * <p>The time the alarm was created, in the Unix epoch format.</p> 260 */ WithCreationTime(Aws::Utils::DateTime && value)261 inline Alarm& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} 262 263 264 /** 265 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 266 */ GetLastUpdateTime()267 inline const Aws::Utils::DateTime& GetLastUpdateTime() const{ return m_lastUpdateTime; } 268 269 /** 270 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 271 */ LastUpdateTimeHasBeenSet()272 inline bool LastUpdateTimeHasBeenSet() const { return m_lastUpdateTimeHasBeenSet; } 273 274 /** 275 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 276 */ SetLastUpdateTime(const Aws::Utils::DateTime & value)277 inline void SetLastUpdateTime(const Aws::Utils::DateTime& value) { m_lastUpdateTimeHasBeenSet = true; m_lastUpdateTime = value; } 278 279 /** 280 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 281 */ SetLastUpdateTime(Aws::Utils::DateTime && value)282 inline void SetLastUpdateTime(Aws::Utils::DateTime&& value) { m_lastUpdateTimeHasBeenSet = true; m_lastUpdateTime = std::move(value); } 283 284 /** 285 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 286 */ WithLastUpdateTime(const Aws::Utils::DateTime & value)287 inline Alarm& WithLastUpdateTime(const Aws::Utils::DateTime& value) { SetLastUpdateTime(value); return *this;} 288 289 /** 290 * <p>The time the alarm was last updated, in the Unix epoch format.</p> 291 */ WithLastUpdateTime(Aws::Utils::DateTime && value)292 inline Alarm& WithLastUpdateTime(Aws::Utils::DateTime&& value) { SetLastUpdateTime(std::move(value)); return *this;} 293 294 private: 295 296 Aws::String m_alarmModelName; 297 bool m_alarmModelNameHasBeenSet; 298 299 Aws::String m_alarmModelVersion; 300 bool m_alarmModelVersionHasBeenSet; 301 302 Aws::String m_keyValue; 303 bool m_keyValueHasBeenSet; 304 305 AlarmState m_alarmState; 306 bool m_alarmStateHasBeenSet; 307 308 int m_severity; 309 bool m_severityHasBeenSet; 310 311 Aws::Utils::DateTime m_creationTime; 312 bool m_creationTimeHasBeenSet; 313 314 Aws::Utils::DateTime m_lastUpdateTime; 315 bool m_lastUpdateTimeHasBeenSet; 316 }; 317 318 } // namespace Model 319 } // namespace IoTEventsData 320 } // namespace Aws 321