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/xray/XRay_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/xray/model/ServiceId.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/xray/model/InsightState.h> 12 #include <aws/core/utils/DateTime.h> 13 #include <aws/xray/model/RequestImpactStatistics.h> 14 #include <aws/xray/model/InsightCategory.h> 15 #include <aws/xray/model/AnomalousService.h> 16 #include <utility> 17 18 namespace Aws 19 { 20 namespace Utils 21 { 22 namespace Json 23 { 24 class JsonValue; 25 class JsonView; 26 } // namespace Json 27 } // namespace Utils 28 namespace XRay 29 { 30 namespace Model 31 { 32 33 /** 34 * <p>When fault rates go outside of the expected range, X-Ray creates an insight. 35 * Insights tracks emergent issues within your applications.</p><p><h3>See 36 * Also:</h3> <a 37 * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Insight">AWS API 38 * Reference</a></p> 39 */ 40 class AWS_XRAY_API Insight 41 { 42 public: 43 Insight(); 44 Insight(Aws::Utils::Json::JsonView jsonValue); 45 Insight& operator=(Aws::Utils::Json::JsonView jsonValue); 46 Aws::Utils::Json::JsonValue Jsonize() const; 47 48 49 /** 50 * <p>The insights unique identifier. </p> 51 */ GetInsightId()52 inline const Aws::String& GetInsightId() const{ return m_insightId; } 53 54 /** 55 * <p>The insights unique identifier. </p> 56 */ InsightIdHasBeenSet()57 inline bool InsightIdHasBeenSet() const { return m_insightIdHasBeenSet; } 58 59 /** 60 * <p>The insights unique identifier. </p> 61 */ SetInsightId(const Aws::String & value)62 inline void SetInsightId(const Aws::String& value) { m_insightIdHasBeenSet = true; m_insightId = value; } 63 64 /** 65 * <p>The insights unique identifier. </p> 66 */ SetInsightId(Aws::String && value)67 inline void SetInsightId(Aws::String&& value) { m_insightIdHasBeenSet = true; m_insightId = std::move(value); } 68 69 /** 70 * <p>The insights unique identifier. </p> 71 */ SetInsightId(const char * value)72 inline void SetInsightId(const char* value) { m_insightIdHasBeenSet = true; m_insightId.assign(value); } 73 74 /** 75 * <p>The insights unique identifier. </p> 76 */ WithInsightId(const Aws::String & value)77 inline Insight& WithInsightId(const Aws::String& value) { SetInsightId(value); return *this;} 78 79 /** 80 * <p>The insights unique identifier. </p> 81 */ WithInsightId(Aws::String && value)82 inline Insight& WithInsightId(Aws::String&& value) { SetInsightId(std::move(value)); return *this;} 83 84 /** 85 * <p>The insights unique identifier. </p> 86 */ WithInsightId(const char * value)87 inline Insight& WithInsightId(const char* value) { SetInsightId(value); return *this;} 88 89 90 /** 91 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 92 */ GetGroupARN()93 inline const Aws::String& GetGroupARN() const{ return m_groupARN; } 94 95 /** 96 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 97 */ GroupARNHasBeenSet()98 inline bool GroupARNHasBeenSet() const { return m_groupARNHasBeenSet; } 99 100 /** 101 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 102 */ SetGroupARN(const Aws::String & value)103 inline void SetGroupARN(const Aws::String& value) { m_groupARNHasBeenSet = true; m_groupARN = value; } 104 105 /** 106 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 107 */ SetGroupARN(Aws::String && value)108 inline void SetGroupARN(Aws::String&& value) { m_groupARNHasBeenSet = true; m_groupARN = std::move(value); } 109 110 /** 111 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 112 */ SetGroupARN(const char * value)113 inline void SetGroupARN(const char* value) { m_groupARNHasBeenSet = true; m_groupARN.assign(value); } 114 115 /** 116 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 117 */ WithGroupARN(const Aws::String & value)118 inline Insight& WithGroupARN(const Aws::String& value) { SetGroupARN(value); return *this;} 119 120 /** 121 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 122 */ WithGroupARN(Aws::String && value)123 inline Insight& WithGroupARN(Aws::String&& value) { SetGroupARN(std::move(value)); return *this;} 124 125 /** 126 * <p>The Amazon Resource Name (ARN) of the group that the insight belongs to.</p> 127 */ WithGroupARN(const char * value)128 inline Insight& WithGroupARN(const char* value) { SetGroupARN(value); return *this;} 129 130 131 /** 132 * <p>The name of the group that the insight belongs to.</p> 133 */ GetGroupName()134 inline const Aws::String& GetGroupName() const{ return m_groupName; } 135 136 /** 137 * <p>The name of the group that the insight belongs to.</p> 138 */ GroupNameHasBeenSet()139 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } 140 141 /** 142 * <p>The name of the group that the insight belongs to.</p> 143 */ SetGroupName(const Aws::String & value)144 inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } 145 146 /** 147 * <p>The name of the group that the insight belongs to.</p> 148 */ SetGroupName(Aws::String && value)149 inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } 150 151 /** 152 * <p>The name of the group that the insight belongs to.</p> 153 */ SetGroupName(const char * value)154 inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } 155 156 /** 157 * <p>The name of the group that the insight belongs to.</p> 158 */ WithGroupName(const Aws::String & value)159 inline Insight& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} 160 161 /** 162 * <p>The name of the group that the insight belongs to.</p> 163 */ WithGroupName(Aws::String && value)164 inline Insight& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} 165 166 /** 167 * <p>The name of the group that the insight belongs to.</p> 168 */ WithGroupName(const char * value)169 inline Insight& WithGroupName(const char* value) { SetGroupName(value); return *this;} 170 171 172 GetRootCauseServiceId()173 inline const ServiceId& GetRootCauseServiceId() const{ return m_rootCauseServiceId; } 174 175 RootCauseServiceIdHasBeenSet()176 inline bool RootCauseServiceIdHasBeenSet() const { return m_rootCauseServiceIdHasBeenSet; } 177 178 SetRootCauseServiceId(const ServiceId & value)179 inline void SetRootCauseServiceId(const ServiceId& value) { m_rootCauseServiceIdHasBeenSet = true; m_rootCauseServiceId = value; } 180 181 SetRootCauseServiceId(ServiceId && value)182 inline void SetRootCauseServiceId(ServiceId&& value) { m_rootCauseServiceIdHasBeenSet = true; m_rootCauseServiceId = std::move(value); } 183 184 WithRootCauseServiceId(const ServiceId & value)185 inline Insight& WithRootCauseServiceId(const ServiceId& value) { SetRootCauseServiceId(value); return *this;} 186 187 WithRootCauseServiceId(ServiceId && value)188 inline Insight& WithRootCauseServiceId(ServiceId&& value) { SetRootCauseServiceId(std::move(value)); return *this;} 189 190 191 /** 192 * <p>The categories that label and describe the type of insight.</p> 193 */ GetCategories()194 inline const Aws::Vector<InsightCategory>& GetCategories() const{ return m_categories; } 195 196 /** 197 * <p>The categories that label and describe the type of insight.</p> 198 */ CategoriesHasBeenSet()199 inline bool CategoriesHasBeenSet() const { return m_categoriesHasBeenSet; } 200 201 /** 202 * <p>The categories that label and describe the type of insight.</p> 203 */ SetCategories(const Aws::Vector<InsightCategory> & value)204 inline void SetCategories(const Aws::Vector<InsightCategory>& value) { m_categoriesHasBeenSet = true; m_categories = value; } 205 206 /** 207 * <p>The categories that label and describe the type of insight.</p> 208 */ SetCategories(Aws::Vector<InsightCategory> && value)209 inline void SetCategories(Aws::Vector<InsightCategory>&& value) { m_categoriesHasBeenSet = true; m_categories = std::move(value); } 210 211 /** 212 * <p>The categories that label and describe the type of insight.</p> 213 */ WithCategories(const Aws::Vector<InsightCategory> & value)214 inline Insight& WithCategories(const Aws::Vector<InsightCategory>& value) { SetCategories(value); return *this;} 215 216 /** 217 * <p>The categories that label and describe the type of insight.</p> 218 */ WithCategories(Aws::Vector<InsightCategory> && value)219 inline Insight& WithCategories(Aws::Vector<InsightCategory>&& value) { SetCategories(std::move(value)); return *this;} 220 221 /** 222 * <p>The categories that label and describe the type of insight.</p> 223 */ AddCategories(const InsightCategory & value)224 inline Insight& AddCategories(const InsightCategory& value) { m_categoriesHasBeenSet = true; m_categories.push_back(value); return *this; } 225 226 /** 227 * <p>The categories that label and describe the type of insight.</p> 228 */ AddCategories(InsightCategory && value)229 inline Insight& AddCategories(InsightCategory&& value) { m_categoriesHasBeenSet = true; m_categories.push_back(std::move(value)); return *this; } 230 231 232 /** 233 * <p>The current state of the insight.</p> 234 */ GetState()235 inline const InsightState& GetState() const{ return m_state; } 236 237 /** 238 * <p>The current state of the insight.</p> 239 */ StateHasBeenSet()240 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } 241 242 /** 243 * <p>The current state of the insight.</p> 244 */ SetState(const InsightState & value)245 inline void SetState(const InsightState& value) { m_stateHasBeenSet = true; m_state = value; } 246 247 /** 248 * <p>The current state of the insight.</p> 249 */ SetState(InsightState && value)250 inline void SetState(InsightState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } 251 252 /** 253 * <p>The current state of the insight.</p> 254 */ WithState(const InsightState & value)255 inline Insight& WithState(const InsightState& value) { SetState(value); return *this;} 256 257 /** 258 * <p>The current state of the insight.</p> 259 */ WithState(InsightState && value)260 inline Insight& WithState(InsightState&& value) { SetState(std::move(value)); return *this;} 261 262 263 /** 264 * <p>The time, in Unix seconds, at which the insight began.</p> 265 */ GetStartTime()266 inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } 267 268 /** 269 * <p>The time, in Unix seconds, at which the insight began.</p> 270 */ StartTimeHasBeenSet()271 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } 272 273 /** 274 * <p>The time, in Unix seconds, at which the insight began.</p> 275 */ SetStartTime(const Aws::Utils::DateTime & value)276 inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } 277 278 /** 279 * <p>The time, in Unix seconds, at which the insight began.</p> 280 */ SetStartTime(Aws::Utils::DateTime && value)281 inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } 282 283 /** 284 * <p>The time, in Unix seconds, at which the insight began.</p> 285 */ WithStartTime(const Aws::Utils::DateTime & value)286 inline Insight& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} 287 288 /** 289 * <p>The time, in Unix seconds, at which the insight began.</p> 290 */ WithStartTime(Aws::Utils::DateTime && value)291 inline Insight& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} 292 293 294 /** 295 * <p>The time, in Unix seconds, at which the insight ended.</p> 296 */ GetEndTime()297 inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } 298 299 /** 300 * <p>The time, in Unix seconds, at which the insight ended.</p> 301 */ EndTimeHasBeenSet()302 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } 303 304 /** 305 * <p>The time, in Unix seconds, at which the insight ended.</p> 306 */ SetEndTime(const Aws::Utils::DateTime & value)307 inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } 308 309 /** 310 * <p>The time, in Unix seconds, at which the insight ended.</p> 311 */ SetEndTime(Aws::Utils::DateTime && value)312 inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } 313 314 /** 315 * <p>The time, in Unix seconds, at which the insight ended.</p> 316 */ WithEndTime(const Aws::Utils::DateTime & value)317 inline Insight& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} 318 319 /** 320 * <p>The time, in Unix seconds, at which the insight ended.</p> 321 */ WithEndTime(Aws::Utils::DateTime && value)322 inline Insight& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} 323 324 325 /** 326 * <p>A brief description of the insight.</p> 327 */ GetSummary()328 inline const Aws::String& GetSummary() const{ return m_summary; } 329 330 /** 331 * <p>A brief description of the insight.</p> 332 */ SummaryHasBeenSet()333 inline bool SummaryHasBeenSet() const { return m_summaryHasBeenSet; } 334 335 /** 336 * <p>A brief description of the insight.</p> 337 */ SetSummary(const Aws::String & value)338 inline void SetSummary(const Aws::String& value) { m_summaryHasBeenSet = true; m_summary = value; } 339 340 /** 341 * <p>A brief description of the insight.</p> 342 */ SetSummary(Aws::String && value)343 inline void SetSummary(Aws::String&& value) { m_summaryHasBeenSet = true; m_summary = std::move(value); } 344 345 /** 346 * <p>A brief description of the insight.</p> 347 */ SetSummary(const char * value)348 inline void SetSummary(const char* value) { m_summaryHasBeenSet = true; m_summary.assign(value); } 349 350 /** 351 * <p>A brief description of the insight.</p> 352 */ WithSummary(const Aws::String & value)353 inline Insight& WithSummary(const Aws::String& value) { SetSummary(value); return *this;} 354 355 /** 356 * <p>A brief description of the insight.</p> 357 */ WithSummary(Aws::String && value)358 inline Insight& WithSummary(Aws::String&& value) { SetSummary(std::move(value)); return *this;} 359 360 /** 361 * <p>A brief description of the insight.</p> 362 */ WithSummary(const char * value)363 inline Insight& WithSummary(const char* value) { SetSummary(value); return *this;} 364 365 366 /** 367 * <p>The impact statistics of the client side service. This includes the number of 368 * requests to the client service and whether the requests were faults or okay.</p> 369 */ GetClientRequestImpactStatistics()370 inline const RequestImpactStatistics& GetClientRequestImpactStatistics() const{ return m_clientRequestImpactStatistics; } 371 372 /** 373 * <p>The impact statistics of the client side service. This includes the number of 374 * requests to the client service and whether the requests were faults or okay.</p> 375 */ ClientRequestImpactStatisticsHasBeenSet()376 inline bool ClientRequestImpactStatisticsHasBeenSet() const { return m_clientRequestImpactStatisticsHasBeenSet; } 377 378 /** 379 * <p>The impact statistics of the client side service. This includes the number of 380 * requests to the client service and whether the requests were faults or okay.</p> 381 */ SetClientRequestImpactStatistics(const RequestImpactStatistics & value)382 inline void SetClientRequestImpactStatistics(const RequestImpactStatistics& value) { m_clientRequestImpactStatisticsHasBeenSet = true; m_clientRequestImpactStatistics = value; } 383 384 /** 385 * <p>The impact statistics of the client side service. This includes the number of 386 * requests to the client service and whether the requests were faults or okay.</p> 387 */ SetClientRequestImpactStatistics(RequestImpactStatistics && value)388 inline void SetClientRequestImpactStatistics(RequestImpactStatistics&& value) { m_clientRequestImpactStatisticsHasBeenSet = true; m_clientRequestImpactStatistics = std::move(value); } 389 390 /** 391 * <p>The impact statistics of the client side service. This includes the number of 392 * requests to the client service and whether the requests were faults or okay.</p> 393 */ WithClientRequestImpactStatistics(const RequestImpactStatistics & value)394 inline Insight& WithClientRequestImpactStatistics(const RequestImpactStatistics& value) { SetClientRequestImpactStatistics(value); return *this;} 395 396 /** 397 * <p>The impact statistics of the client side service. This includes the number of 398 * requests to the client service and whether the requests were faults or okay.</p> 399 */ WithClientRequestImpactStatistics(RequestImpactStatistics && value)400 inline Insight& WithClientRequestImpactStatistics(RequestImpactStatistics&& value) { SetClientRequestImpactStatistics(std::move(value)); return *this;} 401 402 403 /** 404 * <p>The impact statistics of the root cause service. This includes the number of 405 * requests to the client service and whether the requests were faults or okay.</p> 406 */ GetRootCauseServiceRequestImpactStatistics()407 inline const RequestImpactStatistics& GetRootCauseServiceRequestImpactStatistics() const{ return m_rootCauseServiceRequestImpactStatistics; } 408 409 /** 410 * <p>The impact statistics of the root cause service. This includes the number of 411 * requests to the client service and whether the requests were faults or okay.</p> 412 */ RootCauseServiceRequestImpactStatisticsHasBeenSet()413 inline bool RootCauseServiceRequestImpactStatisticsHasBeenSet() const { return m_rootCauseServiceRequestImpactStatisticsHasBeenSet; } 414 415 /** 416 * <p>The impact statistics of the root cause service. This includes the number of 417 * requests to the client service and whether the requests were faults or okay.</p> 418 */ SetRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics & value)419 inline void SetRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics& value) { m_rootCauseServiceRequestImpactStatisticsHasBeenSet = true; m_rootCauseServiceRequestImpactStatistics = value; } 420 421 /** 422 * <p>The impact statistics of the root cause service. This includes the number of 423 * requests to the client service and whether the requests were faults or okay.</p> 424 */ SetRootCauseServiceRequestImpactStatistics(RequestImpactStatistics && value)425 inline void SetRootCauseServiceRequestImpactStatistics(RequestImpactStatistics&& value) { m_rootCauseServiceRequestImpactStatisticsHasBeenSet = true; m_rootCauseServiceRequestImpactStatistics = std::move(value); } 426 427 /** 428 * <p>The impact statistics of the root cause service. This includes the number of 429 * requests to the client service and whether the requests were faults or okay.</p> 430 */ WithRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics & value)431 inline Insight& WithRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics& value) { SetRootCauseServiceRequestImpactStatistics(value); return *this;} 432 433 /** 434 * <p>The impact statistics of the root cause service. This includes the number of 435 * requests to the client service and whether the requests were faults or okay.</p> 436 */ WithRootCauseServiceRequestImpactStatistics(RequestImpactStatistics && value)437 inline Insight& WithRootCauseServiceRequestImpactStatistics(RequestImpactStatistics&& value) { SetRootCauseServiceRequestImpactStatistics(std::move(value)); return *this;} 438 439 440 /** 441 * <p>The service within the insight that is most impacted by the incident.</p> 442 */ GetTopAnomalousServices()443 inline const Aws::Vector<AnomalousService>& GetTopAnomalousServices() const{ return m_topAnomalousServices; } 444 445 /** 446 * <p>The service within the insight that is most impacted by the incident.</p> 447 */ TopAnomalousServicesHasBeenSet()448 inline bool TopAnomalousServicesHasBeenSet() const { return m_topAnomalousServicesHasBeenSet; } 449 450 /** 451 * <p>The service within the insight that is most impacted by the incident.</p> 452 */ SetTopAnomalousServices(const Aws::Vector<AnomalousService> & value)453 inline void SetTopAnomalousServices(const Aws::Vector<AnomalousService>& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices = value; } 454 455 /** 456 * <p>The service within the insight that is most impacted by the incident.</p> 457 */ SetTopAnomalousServices(Aws::Vector<AnomalousService> && value)458 inline void SetTopAnomalousServices(Aws::Vector<AnomalousService>&& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices = std::move(value); } 459 460 /** 461 * <p>The service within the insight that is most impacted by the incident.</p> 462 */ WithTopAnomalousServices(const Aws::Vector<AnomalousService> & value)463 inline Insight& WithTopAnomalousServices(const Aws::Vector<AnomalousService>& value) { SetTopAnomalousServices(value); return *this;} 464 465 /** 466 * <p>The service within the insight that is most impacted by the incident.</p> 467 */ WithTopAnomalousServices(Aws::Vector<AnomalousService> && value)468 inline Insight& WithTopAnomalousServices(Aws::Vector<AnomalousService>&& value) { SetTopAnomalousServices(std::move(value)); return *this;} 469 470 /** 471 * <p>The service within the insight that is most impacted by the incident.</p> 472 */ AddTopAnomalousServices(const AnomalousService & value)473 inline Insight& AddTopAnomalousServices(const AnomalousService& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices.push_back(value); return *this; } 474 475 /** 476 * <p>The service within the insight that is most impacted by the incident.</p> 477 */ AddTopAnomalousServices(AnomalousService && value)478 inline Insight& AddTopAnomalousServices(AnomalousService&& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices.push_back(std::move(value)); return *this; } 479 480 private: 481 482 Aws::String m_insightId; 483 bool m_insightIdHasBeenSet; 484 485 Aws::String m_groupARN; 486 bool m_groupARNHasBeenSet; 487 488 Aws::String m_groupName; 489 bool m_groupNameHasBeenSet; 490 491 ServiceId m_rootCauseServiceId; 492 bool m_rootCauseServiceIdHasBeenSet; 493 494 Aws::Vector<InsightCategory> m_categories; 495 bool m_categoriesHasBeenSet; 496 497 InsightState m_state; 498 bool m_stateHasBeenSet; 499 500 Aws::Utils::DateTime m_startTime; 501 bool m_startTimeHasBeenSet; 502 503 Aws::Utils::DateTime m_endTime; 504 bool m_endTimeHasBeenSet; 505 506 Aws::String m_summary; 507 bool m_summaryHasBeenSet; 508 509 RequestImpactStatistics m_clientRequestImpactStatistics; 510 bool m_clientRequestImpactStatisticsHasBeenSet; 511 512 RequestImpactStatistics m_rootCauseServiceRequestImpactStatistics; 513 bool m_rootCauseServiceRequestImpactStatisticsHasBeenSet; 514 515 Aws::Vector<AnomalousService> m_topAnomalousServices; 516 bool m_topAnomalousServicesHasBeenSet; 517 }; 518 519 } // namespace Model 520 } // namespace XRay 521 } // namespace Aws 522