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/core/utils/DateTime.h>
10 #include <aws/xray/model/RequestImpactStatistics.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/xray/model/AnomalousService.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace XRay
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>X-Ray reevaluates insights periodically until they are resolved, and records
32    * each intermediate state in an event. You can review incident events in the
33    * Impact Timeline on the Inspect page in the X-Ray console.</p><p><h3>See
34    * Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/InsightEvent">AWS
36    * API Reference</a></p>
37    */
38   class AWS_XRAY_API InsightEvent
39   {
40   public:
41     InsightEvent();
42     InsightEvent(Aws::Utils::Json::JsonView jsonValue);
43     InsightEvent& operator=(Aws::Utils::Json::JsonView jsonValue);
44     Aws::Utils::Json::JsonValue Jsonize() const;
45 
46 
47     /**
48      * <p>A brief description of the event.</p>
49      */
GetSummary()50     inline const Aws::String& GetSummary() const{ return m_summary; }
51 
52     /**
53      * <p>A brief description of the event.</p>
54      */
SummaryHasBeenSet()55     inline bool SummaryHasBeenSet() const { return m_summaryHasBeenSet; }
56 
57     /**
58      * <p>A brief description of the event.</p>
59      */
SetSummary(const Aws::String & value)60     inline void SetSummary(const Aws::String& value) { m_summaryHasBeenSet = true; m_summary = value; }
61 
62     /**
63      * <p>A brief description of the event.</p>
64      */
SetSummary(Aws::String && value)65     inline void SetSummary(Aws::String&& value) { m_summaryHasBeenSet = true; m_summary = std::move(value); }
66 
67     /**
68      * <p>A brief description of the event.</p>
69      */
SetSummary(const char * value)70     inline void SetSummary(const char* value) { m_summaryHasBeenSet = true; m_summary.assign(value); }
71 
72     /**
73      * <p>A brief description of the event.</p>
74      */
WithSummary(const Aws::String & value)75     inline InsightEvent& WithSummary(const Aws::String& value) { SetSummary(value); return *this;}
76 
77     /**
78      * <p>A brief description of the event.</p>
79      */
WithSummary(Aws::String && value)80     inline InsightEvent& WithSummary(Aws::String&& value) { SetSummary(std::move(value)); return *this;}
81 
82     /**
83      * <p>A brief description of the event.</p>
84      */
WithSummary(const char * value)85     inline InsightEvent& WithSummary(const char* value) { SetSummary(value); return *this;}
86 
87 
88     /**
89      * <p>The time, in Unix seconds, at which the event was recorded.</p>
90      */
GetEventTime()91     inline const Aws::Utils::DateTime& GetEventTime() const{ return m_eventTime; }
92 
93     /**
94      * <p>The time, in Unix seconds, at which the event was recorded.</p>
95      */
EventTimeHasBeenSet()96     inline bool EventTimeHasBeenSet() const { return m_eventTimeHasBeenSet; }
97 
98     /**
99      * <p>The time, in Unix seconds, at which the event was recorded.</p>
100      */
SetEventTime(const Aws::Utils::DateTime & value)101     inline void SetEventTime(const Aws::Utils::DateTime& value) { m_eventTimeHasBeenSet = true; m_eventTime = value; }
102 
103     /**
104      * <p>The time, in Unix seconds, at which the event was recorded.</p>
105      */
SetEventTime(Aws::Utils::DateTime && value)106     inline void SetEventTime(Aws::Utils::DateTime&& value) { m_eventTimeHasBeenSet = true; m_eventTime = std::move(value); }
107 
108     /**
109      * <p>The time, in Unix seconds, at which the event was recorded.</p>
110      */
WithEventTime(const Aws::Utils::DateTime & value)111     inline InsightEvent& WithEventTime(const Aws::Utils::DateTime& value) { SetEventTime(value); return *this;}
112 
113     /**
114      * <p>The time, in Unix seconds, at which the event was recorded.</p>
115      */
WithEventTime(Aws::Utils::DateTime && value)116     inline InsightEvent& WithEventTime(Aws::Utils::DateTime&& value) { SetEventTime(std::move(value)); return *this;}
117 
118 
119     /**
120      * <p>The impact statistics of the client side service. This includes the number of
121      * requests to the client service and whether the requests were faults or okay.</p>
122      */
GetClientRequestImpactStatistics()123     inline const RequestImpactStatistics& GetClientRequestImpactStatistics() const{ return m_clientRequestImpactStatistics; }
124 
125     /**
126      * <p>The impact statistics of the client side service. This includes the number of
127      * requests to the client service and whether the requests were faults or okay.</p>
128      */
ClientRequestImpactStatisticsHasBeenSet()129     inline bool ClientRequestImpactStatisticsHasBeenSet() const { return m_clientRequestImpactStatisticsHasBeenSet; }
130 
131     /**
132      * <p>The impact statistics of the client side service. This includes the number of
133      * requests to the client service and whether the requests were faults or okay.</p>
134      */
SetClientRequestImpactStatistics(const RequestImpactStatistics & value)135     inline void SetClientRequestImpactStatistics(const RequestImpactStatistics& value) { m_clientRequestImpactStatisticsHasBeenSet = true; m_clientRequestImpactStatistics = value; }
136 
137     /**
138      * <p>The impact statistics of the client side service. This includes the number of
139      * requests to the client service and whether the requests were faults or okay.</p>
140      */
SetClientRequestImpactStatistics(RequestImpactStatistics && value)141     inline void SetClientRequestImpactStatistics(RequestImpactStatistics&& value) { m_clientRequestImpactStatisticsHasBeenSet = true; m_clientRequestImpactStatistics = std::move(value); }
142 
143     /**
144      * <p>The impact statistics of the client side service. This includes the number of
145      * requests to the client service and whether the requests were faults or okay.</p>
146      */
WithClientRequestImpactStatistics(const RequestImpactStatistics & value)147     inline InsightEvent& WithClientRequestImpactStatistics(const RequestImpactStatistics& value) { SetClientRequestImpactStatistics(value); return *this;}
148 
149     /**
150      * <p>The impact statistics of the client side service. This includes the number of
151      * requests to the client service and whether the requests were faults or okay.</p>
152      */
WithClientRequestImpactStatistics(RequestImpactStatistics && value)153     inline InsightEvent& WithClientRequestImpactStatistics(RequestImpactStatistics&& value) { SetClientRequestImpactStatistics(std::move(value)); return *this;}
154 
155 
156     /**
157      * <p>The impact statistics of the root cause service. This includes the number of
158      * requests to the client service and whether the requests were faults or okay.</p>
159      */
GetRootCauseServiceRequestImpactStatistics()160     inline const RequestImpactStatistics& GetRootCauseServiceRequestImpactStatistics() const{ return m_rootCauseServiceRequestImpactStatistics; }
161 
162     /**
163      * <p>The impact statistics of the root cause service. This includes the number of
164      * requests to the client service and whether the requests were faults or okay.</p>
165      */
RootCauseServiceRequestImpactStatisticsHasBeenSet()166     inline bool RootCauseServiceRequestImpactStatisticsHasBeenSet() const { return m_rootCauseServiceRequestImpactStatisticsHasBeenSet; }
167 
168     /**
169      * <p>The impact statistics of the root cause service. This includes the number of
170      * requests to the client service and whether the requests were faults or okay.</p>
171      */
SetRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics & value)172     inline void SetRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics& value) { m_rootCauseServiceRequestImpactStatisticsHasBeenSet = true; m_rootCauseServiceRequestImpactStatistics = value; }
173 
174     /**
175      * <p>The impact statistics of the root cause service. This includes the number of
176      * requests to the client service and whether the requests were faults or okay.</p>
177      */
SetRootCauseServiceRequestImpactStatistics(RequestImpactStatistics && value)178     inline void SetRootCauseServiceRequestImpactStatistics(RequestImpactStatistics&& value) { m_rootCauseServiceRequestImpactStatisticsHasBeenSet = true; m_rootCauseServiceRequestImpactStatistics = std::move(value); }
179 
180     /**
181      * <p>The impact statistics of the root cause service. This includes the number of
182      * requests to the client service and whether the requests were faults or okay.</p>
183      */
WithRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics & value)184     inline InsightEvent& WithRootCauseServiceRequestImpactStatistics(const RequestImpactStatistics& value) { SetRootCauseServiceRequestImpactStatistics(value); return *this;}
185 
186     /**
187      * <p>The impact statistics of the root cause service. This includes the number of
188      * requests to the client service and whether the requests were faults or okay.</p>
189      */
WithRootCauseServiceRequestImpactStatistics(RequestImpactStatistics && value)190     inline InsightEvent& WithRootCauseServiceRequestImpactStatistics(RequestImpactStatistics&& value) { SetRootCauseServiceRequestImpactStatistics(std::move(value)); return *this;}
191 
192 
193     /**
194      * <p>The service during the event that is most impacted by the incident.</p>
195      */
GetTopAnomalousServices()196     inline const Aws::Vector<AnomalousService>& GetTopAnomalousServices() const{ return m_topAnomalousServices; }
197 
198     /**
199      * <p>The service during the event that is most impacted by the incident.</p>
200      */
TopAnomalousServicesHasBeenSet()201     inline bool TopAnomalousServicesHasBeenSet() const { return m_topAnomalousServicesHasBeenSet; }
202 
203     /**
204      * <p>The service during the event that is most impacted by the incident.</p>
205      */
SetTopAnomalousServices(const Aws::Vector<AnomalousService> & value)206     inline void SetTopAnomalousServices(const Aws::Vector<AnomalousService>& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices = value; }
207 
208     /**
209      * <p>The service during the event that is most impacted by the incident.</p>
210      */
SetTopAnomalousServices(Aws::Vector<AnomalousService> && value)211     inline void SetTopAnomalousServices(Aws::Vector<AnomalousService>&& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices = std::move(value); }
212 
213     /**
214      * <p>The service during the event that is most impacted by the incident.</p>
215      */
WithTopAnomalousServices(const Aws::Vector<AnomalousService> & value)216     inline InsightEvent& WithTopAnomalousServices(const Aws::Vector<AnomalousService>& value) { SetTopAnomalousServices(value); return *this;}
217 
218     /**
219      * <p>The service during the event that is most impacted by the incident.</p>
220      */
WithTopAnomalousServices(Aws::Vector<AnomalousService> && value)221     inline InsightEvent& WithTopAnomalousServices(Aws::Vector<AnomalousService>&& value) { SetTopAnomalousServices(std::move(value)); return *this;}
222 
223     /**
224      * <p>The service during the event that is most impacted by the incident.</p>
225      */
AddTopAnomalousServices(const AnomalousService & value)226     inline InsightEvent& AddTopAnomalousServices(const AnomalousService& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices.push_back(value); return *this; }
227 
228     /**
229      * <p>The service during the event that is most impacted by the incident.</p>
230      */
AddTopAnomalousServices(AnomalousService && value)231     inline InsightEvent& AddTopAnomalousServices(AnomalousService&& value) { m_topAnomalousServicesHasBeenSet = true; m_topAnomalousServices.push_back(std::move(value)); return *this; }
232 
233   private:
234 
235     Aws::String m_summary;
236     bool m_summaryHasBeenSet;
237 
238     Aws::Utils::DateTime m_eventTime;
239     bool m_eventTimeHasBeenSet;
240 
241     RequestImpactStatistics m_clientRequestImpactStatistics;
242     bool m_clientRequestImpactStatisticsHasBeenSet;
243 
244     RequestImpactStatistics m_rootCauseServiceRequestImpactStatistics;
245     bool m_rootCauseServiceRequestImpactStatisticsHasBeenSet;
246 
247     Aws::Vector<AnomalousService> m_topAnomalousServices;
248     bool m_topAnomalousServicesHasBeenSet;
249   };
250 
251 } // namespace Model
252 } // namespace XRay
253 } // namespace Aws
254