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/devops-guru/DevOpsGuru_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/devops-guru/model/AnomalySeverity.h> 10 #include <aws/devops-guru/model/AnomalyStatus.h> 11 #include <aws/devops-guru/model/AnomalyTimeRange.h> 12 #include <aws/devops-guru/model/AnomalyReportedTimeRange.h> 13 #include <aws/devops-guru/model/AnomalySourceDetails.h> 14 #include <aws/devops-guru/model/ResourceCollection.h> 15 #include <utility> 16 17 namespace Aws 18 { 19 namespace Utils 20 { 21 namespace Json 22 { 23 class JsonValue; 24 class JsonView; 25 } // namespace Json 26 } // namespace Utils 27 namespace DevOpsGuru 28 { 29 namespace Model 30 { 31 32 /** 33 * <p>Details about a reactive anomaly. This object is returned by 34 * <code>ListAnomalies</code>.</p><p><h3>See Also:</h3> <a 35 * href="http://docs.aws.amazon.com/goto/WebAPI/devops-guru-2020-12-01/ReactiveAnomaly">AWS 36 * API Reference</a></p> 37 */ 38 class AWS_DEVOPSGURU_API ReactiveAnomaly 39 { 40 public: 41 ReactiveAnomaly(); 42 ReactiveAnomaly(Aws::Utils::Json::JsonView jsonValue); 43 ReactiveAnomaly& operator=(Aws::Utils::Json::JsonView jsonValue); 44 Aws::Utils::Json::JsonValue Jsonize() const; 45 46 47 /** 48 * <p>The ID of the reactive anomaly. </p> 49 */ GetId()50 inline const Aws::String& GetId() const{ return m_id; } 51 52 /** 53 * <p>The ID of the reactive anomaly. </p> 54 */ IdHasBeenSet()55 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 56 57 /** 58 * <p>The ID of the reactive anomaly. </p> 59 */ SetId(const Aws::String & value)60 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 61 62 /** 63 * <p>The ID of the reactive anomaly. </p> 64 */ SetId(Aws::String && value)65 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 66 67 /** 68 * <p>The ID of the reactive anomaly. </p> 69 */ SetId(const char * value)70 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 71 72 /** 73 * <p>The ID of the reactive anomaly. </p> 74 */ WithId(const Aws::String & value)75 inline ReactiveAnomaly& WithId(const Aws::String& value) { SetId(value); return *this;} 76 77 /** 78 * <p>The ID of the reactive anomaly. </p> 79 */ WithId(Aws::String && value)80 inline ReactiveAnomaly& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 81 82 /** 83 * <p>The ID of the reactive anomaly. </p> 84 */ WithId(const char * value)85 inline ReactiveAnomaly& WithId(const char* value) { SetId(value); return *this;} 86 87 88 /** 89 * <p>The severity of the anomaly. </p> 90 */ GetSeverity()91 inline const AnomalySeverity& GetSeverity() const{ return m_severity; } 92 93 /** 94 * <p>The severity of the anomaly. </p> 95 */ SeverityHasBeenSet()96 inline bool SeverityHasBeenSet() const { return m_severityHasBeenSet; } 97 98 /** 99 * <p>The severity of the anomaly. </p> 100 */ SetSeverity(const AnomalySeverity & value)101 inline void SetSeverity(const AnomalySeverity& value) { m_severityHasBeenSet = true; m_severity = value; } 102 103 /** 104 * <p>The severity of the anomaly. </p> 105 */ SetSeverity(AnomalySeverity && value)106 inline void SetSeverity(AnomalySeverity&& value) { m_severityHasBeenSet = true; m_severity = std::move(value); } 107 108 /** 109 * <p>The severity of the anomaly. </p> 110 */ WithSeverity(const AnomalySeverity & value)111 inline ReactiveAnomaly& WithSeverity(const AnomalySeverity& value) { SetSeverity(value); return *this;} 112 113 /** 114 * <p>The severity of the anomaly. </p> 115 */ WithSeverity(AnomalySeverity && value)116 inline ReactiveAnomaly& WithSeverity(AnomalySeverity&& value) { SetSeverity(std::move(value)); return *this;} 117 118 119 /** 120 * <p> The status of the anomaly. </p> 121 */ GetStatus()122 inline const AnomalyStatus& GetStatus() const{ return m_status; } 123 124 /** 125 * <p> The status of the anomaly. </p> 126 */ StatusHasBeenSet()127 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 128 129 /** 130 * <p> The status of the anomaly. </p> 131 */ SetStatus(const AnomalyStatus & value)132 inline void SetStatus(const AnomalyStatus& value) { m_statusHasBeenSet = true; m_status = value; } 133 134 /** 135 * <p> The status of the anomaly. </p> 136 */ SetStatus(AnomalyStatus && value)137 inline void SetStatus(AnomalyStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 138 139 /** 140 * <p> The status of the anomaly. </p> 141 */ WithStatus(const AnomalyStatus & value)142 inline ReactiveAnomaly& WithStatus(const AnomalyStatus& value) { SetStatus(value); return *this;} 143 144 /** 145 * <p> The status of the anomaly. </p> 146 */ WithStatus(AnomalyStatus && value)147 inline ReactiveAnomaly& WithStatus(AnomalyStatus&& value) { SetStatus(std::move(value)); return *this;} 148 149 150 GetAnomalyTimeRange()151 inline const AnomalyTimeRange& GetAnomalyTimeRange() const{ return m_anomalyTimeRange; } 152 153 AnomalyTimeRangeHasBeenSet()154 inline bool AnomalyTimeRangeHasBeenSet() const { return m_anomalyTimeRangeHasBeenSet; } 155 156 SetAnomalyTimeRange(const AnomalyTimeRange & value)157 inline void SetAnomalyTimeRange(const AnomalyTimeRange& value) { m_anomalyTimeRangeHasBeenSet = true; m_anomalyTimeRange = value; } 158 159 SetAnomalyTimeRange(AnomalyTimeRange && value)160 inline void SetAnomalyTimeRange(AnomalyTimeRange&& value) { m_anomalyTimeRangeHasBeenSet = true; m_anomalyTimeRange = std::move(value); } 161 162 WithAnomalyTimeRange(const AnomalyTimeRange & value)163 inline ReactiveAnomaly& WithAnomalyTimeRange(const AnomalyTimeRange& value) { SetAnomalyTimeRange(value); return *this;} 164 165 WithAnomalyTimeRange(AnomalyTimeRange && value)166 inline ReactiveAnomaly& WithAnomalyTimeRange(AnomalyTimeRange&& value) { SetAnomalyTimeRange(std::move(value)); return *this;} 167 168 169 /** 170 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 171 * between when the anomaly is opened and the time when it is closed. </p> 172 */ GetAnomalyReportedTimeRange()173 inline const AnomalyReportedTimeRange& GetAnomalyReportedTimeRange() const{ return m_anomalyReportedTimeRange; } 174 175 /** 176 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 177 * between when the anomaly is opened and the time when it is closed. </p> 178 */ AnomalyReportedTimeRangeHasBeenSet()179 inline bool AnomalyReportedTimeRangeHasBeenSet() const { return m_anomalyReportedTimeRangeHasBeenSet; } 180 181 /** 182 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 183 * between when the anomaly is opened and the time when it is closed. </p> 184 */ SetAnomalyReportedTimeRange(const AnomalyReportedTimeRange & value)185 inline void SetAnomalyReportedTimeRange(const AnomalyReportedTimeRange& value) { m_anomalyReportedTimeRangeHasBeenSet = true; m_anomalyReportedTimeRange = value; } 186 187 /** 188 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 189 * between when the anomaly is opened and the time when it is closed. </p> 190 */ SetAnomalyReportedTimeRange(AnomalyReportedTimeRange && value)191 inline void SetAnomalyReportedTimeRange(AnomalyReportedTimeRange&& value) { m_anomalyReportedTimeRangeHasBeenSet = true; m_anomalyReportedTimeRange = std::move(value); } 192 193 /** 194 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 195 * between when the anomaly is opened and the time when it is closed. </p> 196 */ WithAnomalyReportedTimeRange(const AnomalyReportedTimeRange & value)197 inline ReactiveAnomaly& WithAnomalyReportedTimeRange(const AnomalyReportedTimeRange& value) { SetAnomalyReportedTimeRange(value); return *this;} 198 199 /** 200 * <p> A <code>AnomalyReportedTimeRange</code> object that specifies the time range 201 * between when the anomaly is opened and the time when it is closed. </p> 202 */ WithAnomalyReportedTimeRange(AnomalyReportedTimeRange && value)203 inline ReactiveAnomaly& WithAnomalyReportedTimeRange(AnomalyReportedTimeRange&& value) { SetAnomalyReportedTimeRange(std::move(value)); return *this;} 204 205 206 /** 207 * <p> Details about the source of the analyzed operational data that triggered the 208 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 209 */ GetSourceDetails()210 inline const AnomalySourceDetails& GetSourceDetails() const{ return m_sourceDetails; } 211 212 /** 213 * <p> Details about the source of the analyzed operational data that triggered the 214 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 215 */ SourceDetailsHasBeenSet()216 inline bool SourceDetailsHasBeenSet() const { return m_sourceDetailsHasBeenSet; } 217 218 /** 219 * <p> Details about the source of the analyzed operational data that triggered the 220 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 221 */ SetSourceDetails(const AnomalySourceDetails & value)222 inline void SetSourceDetails(const AnomalySourceDetails& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails = value; } 223 224 /** 225 * <p> Details about the source of the analyzed operational data that triggered the 226 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 227 */ SetSourceDetails(AnomalySourceDetails && value)228 inline void SetSourceDetails(AnomalySourceDetails&& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails = std::move(value); } 229 230 /** 231 * <p> Details about the source of the analyzed operational data that triggered the 232 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 233 */ WithSourceDetails(const AnomalySourceDetails & value)234 inline ReactiveAnomaly& WithSourceDetails(const AnomalySourceDetails& value) { SetSourceDetails(value); return *this;} 235 236 /** 237 * <p> Details about the source of the analyzed operational data that triggered the 238 * anomaly. The one supported source is Amazon CloudWatch metrics. </p> 239 */ WithSourceDetails(AnomalySourceDetails && value)240 inline ReactiveAnomaly& WithSourceDetails(AnomalySourceDetails&& value) { SetSourceDetails(std::move(value)); return *this;} 241 242 243 /** 244 * <p> The ID of the insight that contains this anomaly. An insight is composed of 245 * related anomalies. </p> 246 */ GetAssociatedInsightId()247 inline const Aws::String& GetAssociatedInsightId() const{ return m_associatedInsightId; } 248 249 /** 250 * <p> The ID of the insight that contains this anomaly. An insight is composed of 251 * related anomalies. </p> 252 */ AssociatedInsightIdHasBeenSet()253 inline bool AssociatedInsightIdHasBeenSet() const { return m_associatedInsightIdHasBeenSet; } 254 255 /** 256 * <p> The ID of the insight that contains this anomaly. An insight is composed of 257 * related anomalies. </p> 258 */ SetAssociatedInsightId(const Aws::String & value)259 inline void SetAssociatedInsightId(const Aws::String& value) { m_associatedInsightIdHasBeenSet = true; m_associatedInsightId = value; } 260 261 /** 262 * <p> The ID of the insight that contains this anomaly. An insight is composed of 263 * related anomalies. </p> 264 */ SetAssociatedInsightId(Aws::String && value)265 inline void SetAssociatedInsightId(Aws::String&& value) { m_associatedInsightIdHasBeenSet = true; m_associatedInsightId = std::move(value); } 266 267 /** 268 * <p> The ID of the insight that contains this anomaly. An insight is composed of 269 * related anomalies. </p> 270 */ SetAssociatedInsightId(const char * value)271 inline void SetAssociatedInsightId(const char* value) { m_associatedInsightIdHasBeenSet = true; m_associatedInsightId.assign(value); } 272 273 /** 274 * <p> The ID of the insight that contains this anomaly. An insight is composed of 275 * related anomalies. </p> 276 */ WithAssociatedInsightId(const Aws::String & value)277 inline ReactiveAnomaly& WithAssociatedInsightId(const Aws::String& value) { SetAssociatedInsightId(value); return *this;} 278 279 /** 280 * <p> The ID of the insight that contains this anomaly. An insight is composed of 281 * related anomalies. </p> 282 */ WithAssociatedInsightId(Aws::String && value)283 inline ReactiveAnomaly& WithAssociatedInsightId(Aws::String&& value) { SetAssociatedInsightId(std::move(value)); return *this;} 284 285 /** 286 * <p> The ID of the insight that contains this anomaly. An insight is composed of 287 * related anomalies. </p> 288 */ WithAssociatedInsightId(const char * value)289 inline ReactiveAnomaly& WithAssociatedInsightId(const char* value) { SetAssociatedInsightId(value); return *this;} 290 291 292 GetResourceCollection()293 inline const ResourceCollection& GetResourceCollection() const{ return m_resourceCollection; } 294 295 ResourceCollectionHasBeenSet()296 inline bool ResourceCollectionHasBeenSet() const { return m_resourceCollectionHasBeenSet; } 297 298 SetResourceCollection(const ResourceCollection & value)299 inline void SetResourceCollection(const ResourceCollection& value) { m_resourceCollectionHasBeenSet = true; m_resourceCollection = value; } 300 301 SetResourceCollection(ResourceCollection && value)302 inline void SetResourceCollection(ResourceCollection&& value) { m_resourceCollectionHasBeenSet = true; m_resourceCollection = std::move(value); } 303 304 WithResourceCollection(const ResourceCollection & value)305 inline ReactiveAnomaly& WithResourceCollection(const ResourceCollection& value) { SetResourceCollection(value); return *this;} 306 307 WithResourceCollection(ResourceCollection && value)308 inline ReactiveAnomaly& WithResourceCollection(ResourceCollection&& value) { SetResourceCollection(std::move(value)); return *this;} 309 310 private: 311 312 Aws::String m_id; 313 bool m_idHasBeenSet; 314 315 AnomalySeverity m_severity; 316 bool m_severityHasBeenSet; 317 318 AnomalyStatus m_status; 319 bool m_statusHasBeenSet; 320 321 AnomalyTimeRange m_anomalyTimeRange; 322 bool m_anomalyTimeRangeHasBeenSet; 323 324 AnomalyReportedTimeRange m_anomalyReportedTimeRange; 325 bool m_anomalyReportedTimeRangeHasBeenSet; 326 327 AnomalySourceDetails m_sourceDetails; 328 bool m_sourceDetailsHasBeenSet; 329 330 Aws::String m_associatedInsightId; 331 bool m_associatedInsightIdHasBeenSet; 332 333 ResourceCollection m_resourceCollection; 334 bool m_resourceCollectionHasBeenSet; 335 }; 336 337 } // namespace Model 338 } // namespace DevOpsGuru 339 } // namespace Aws 340