AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
HealthEvent.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/internetmonitor/InternetMonitor_EXPORTS.h>
11#include <aws/internetmonitor/model/HealthEventImpactType.h>
12#include <aws/internetmonitor/model/HealthEventStatus.h>
13#include <aws/internetmonitor/model/ImpactedLocation.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace InternetMonitor {
25namespace Model {
26
34 public:
35 AWS_INTERNETMONITOR_API HealthEvent() = default;
36 AWS_INTERNETMONITOR_API HealthEvent(Aws::Utils::Json::JsonView jsonValue);
37 AWS_INTERNETMONITOR_API HealthEvent& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_INTERNETMONITOR_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetEventArn() const { return m_eventArn; }
45 inline bool EventArnHasBeenSet() const { return m_eventArnHasBeenSet; }
46 template <typename EventArnT = Aws::String>
47 void SetEventArn(EventArnT&& value) {
48 m_eventArnHasBeenSet = true;
49 m_eventArn = std::forward<EventArnT>(value);
50 }
51 template <typename EventArnT = Aws::String>
52 HealthEvent& WithEventArn(EventArnT&& value) {
53 SetEventArn(std::forward<EventArnT>(value));
54 return *this;
55 }
57
59
63 inline const Aws::String& GetEventId() const { return m_eventId; }
64 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
65 template <typename EventIdT = Aws::String>
66 void SetEventId(EventIdT&& value) {
67 m_eventIdHasBeenSet = true;
68 m_eventId = std::forward<EventIdT>(value);
69 }
70 template <typename EventIdT = Aws::String>
71 HealthEvent& WithEventId(EventIdT&& value) {
72 SetEventId(std::forward<EventIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
82 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
83 template <typename StartedAtT = Aws::Utils::DateTime>
84 void SetStartedAt(StartedAtT&& value) {
85 m_startedAtHasBeenSet = true;
86 m_startedAt = std::forward<StartedAtT>(value);
87 }
88 template <typename StartedAtT = Aws::Utils::DateTime>
89 HealthEvent& WithStartedAt(StartedAtT&& value) {
90 SetStartedAt(std::forward<StartedAtT>(value));
91 return *this;
92 }
94
96
100 inline const Aws::Utils::DateTime& GetEndedAt() const { return m_endedAt; }
101 inline bool EndedAtHasBeenSet() const { return m_endedAtHasBeenSet; }
102 template <typename EndedAtT = Aws::Utils::DateTime>
103 void SetEndedAt(EndedAtT&& value) {
104 m_endedAtHasBeenSet = true;
105 m_endedAt = std::forward<EndedAtT>(value);
106 }
107 template <typename EndedAtT = Aws::Utils::DateTime>
108 HealthEvent& WithEndedAt(EndedAtT&& value) {
109 SetEndedAt(std::forward<EndedAtT>(value));
110 return *this;
111 }
113
115
118 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
119 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
120 template <typename CreatedAtT = Aws::Utils::DateTime>
121 void SetCreatedAt(CreatedAtT&& value) {
122 m_createdAtHasBeenSet = true;
123 m_createdAt = std::forward<CreatedAtT>(value);
124 }
125 template <typename CreatedAtT = Aws::Utils::DateTime>
126 HealthEvent& WithCreatedAt(CreatedAtT&& value) {
127 SetCreatedAt(std::forward<CreatedAtT>(value));
128 return *this;
129 }
131
133
136 inline const Aws::Utils::DateTime& GetLastUpdatedAt() const { return m_lastUpdatedAt; }
137 inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; }
138 template <typename LastUpdatedAtT = Aws::Utils::DateTime>
139 void SetLastUpdatedAt(LastUpdatedAtT&& value) {
140 m_lastUpdatedAtHasBeenSet = true;
141 m_lastUpdatedAt = std::forward<LastUpdatedAtT>(value);
142 }
143 template <typename LastUpdatedAtT = Aws::Utils::DateTime>
144 HealthEvent& WithLastUpdatedAt(LastUpdatedAtT&& value) {
145 SetLastUpdatedAt(std::forward<LastUpdatedAtT>(value));
146 return *this;
147 }
149
151
154 inline const Aws::Vector<ImpactedLocation>& GetImpactedLocations() const { return m_impactedLocations; }
155 inline bool ImpactedLocationsHasBeenSet() const { return m_impactedLocationsHasBeenSet; }
156 template <typename ImpactedLocationsT = Aws::Vector<ImpactedLocation>>
157 void SetImpactedLocations(ImpactedLocationsT&& value) {
158 m_impactedLocationsHasBeenSet = true;
159 m_impactedLocations = std::forward<ImpactedLocationsT>(value);
160 }
161 template <typename ImpactedLocationsT = Aws::Vector<ImpactedLocation>>
162 HealthEvent& WithImpactedLocations(ImpactedLocationsT&& value) {
163 SetImpactedLocations(std::forward<ImpactedLocationsT>(value));
164 return *this;
165 }
166 template <typename ImpactedLocationsT = ImpactedLocation>
167 HealthEvent& AddImpactedLocations(ImpactedLocationsT&& value) {
168 m_impactedLocationsHasBeenSet = true;
169 m_impactedLocations.emplace_back(std::forward<ImpactedLocationsT>(value));
170 return *this;
171 }
173
175
178 inline HealthEventStatus GetStatus() const { return m_status; }
179 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
180 inline void SetStatus(HealthEventStatus value) {
181 m_statusHasBeenSet = true;
182 m_status = value;
183 }
185 SetStatus(value);
186 return *this;
187 }
189
191
198 inline double GetPercentOfTotalTrafficImpacted() const { return m_percentOfTotalTrafficImpacted; }
199 inline bool PercentOfTotalTrafficImpactedHasBeenSet() const { return m_percentOfTotalTrafficImpactedHasBeenSet; }
200 inline void SetPercentOfTotalTrafficImpacted(double value) {
201 m_percentOfTotalTrafficImpactedHasBeenSet = true;
202 m_percentOfTotalTrafficImpacted = value;
203 }
206 return *this;
207 }
209
211
214 inline HealthEventImpactType GetImpactType() const { return m_impactType; }
215 inline bool ImpactTypeHasBeenSet() const { return m_impactTypeHasBeenSet; }
217 m_impactTypeHasBeenSet = true;
218 m_impactType = value;
219 }
221 SetImpactType(value);
222 return *this;
223 }
225
227
232 inline double GetHealthScoreThreshold() const { return m_healthScoreThreshold; }
233 inline bool HealthScoreThresholdHasBeenSet() const { return m_healthScoreThresholdHasBeenSet; }
234 inline void SetHealthScoreThreshold(double value) {
235 m_healthScoreThresholdHasBeenSet = true;
236 m_healthScoreThreshold = value;
237 }
238 inline HealthEvent& WithHealthScoreThreshold(double value) {
240 return *this;
241 }
243 private:
244 Aws::String m_eventArn;
245
246 Aws::String m_eventId;
247
248 Aws::Utils::DateTime m_startedAt{};
249
250 Aws::Utils::DateTime m_endedAt{};
251
252 Aws::Utils::DateTime m_createdAt{};
253
254 Aws::Utils::DateTime m_lastUpdatedAt{};
255
256 Aws::Vector<ImpactedLocation> m_impactedLocations;
257
259
260 double m_percentOfTotalTrafficImpacted{0.0};
261
263
264 double m_healthScoreThreshold{0.0};
265 bool m_eventArnHasBeenSet = false;
266 bool m_eventIdHasBeenSet = false;
267 bool m_startedAtHasBeenSet = false;
268 bool m_endedAtHasBeenSet = false;
269 bool m_createdAtHasBeenSet = false;
270 bool m_lastUpdatedAtHasBeenSet = false;
271 bool m_impactedLocationsHasBeenSet = false;
272 bool m_statusHasBeenSet = false;
273 bool m_percentOfTotalTrafficImpactedHasBeenSet = false;
274 bool m_impactTypeHasBeenSet = false;
275 bool m_healthScoreThresholdHasBeenSet = false;
276};
277
278} // namespace Model
279} // namespace InternetMonitor
280} // namespace Aws
HealthEvent & WithImpactedLocations(ImpactedLocationsT &&value)
AWS_INTERNETMONITOR_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Utils::DateTime & GetLastUpdatedAt() const
HealthEvent & AddImpactedLocations(ImpactedLocationsT &&value)
void SetPercentOfTotalTrafficImpacted(double value)
HealthEvent & WithEventArn(EventArnT &&value)
Definition HealthEvent.h:52
void SetCreatedAt(CreatedAtT &&value)
HealthEvent & WithEventId(EventIdT &&value)
Definition HealthEvent.h:71
const Aws::String & GetEventId() const
Definition HealthEvent.h:63
void SetStatus(HealthEventStatus value)
HealthEvent & WithStartedAt(StartedAtT &&value)
Definition HealthEvent.h:89
void SetImpactedLocations(ImpactedLocationsT &&value)
HealthEvent & WithPercentOfTotalTrafficImpacted(double value)
HealthEventStatus GetStatus() const
const Aws::String & GetEventArn() const
Definition HealthEvent.h:44
void SetLastUpdatedAt(LastUpdatedAtT &&value)
void SetStartedAt(StartedAtT &&value)
Definition HealthEvent.h:84
const Aws::Utils::DateTime & GetEndedAt() const
const Aws::Vector< ImpactedLocation > & GetImpactedLocations() const
const Aws::Utils::DateTime & GetStartedAt() const
Definition HealthEvent.h:81
void SetEventArn(EventArnT &&value)
Definition HealthEvent.h:47
HealthEvent & WithLastUpdatedAt(LastUpdatedAtT &&value)
HealthEvent & WithEndedAt(EndedAtT &&value)
HealthEvent & WithHealthScoreThreshold(double value)
HealthEvent & WithCreatedAt(CreatedAtT &&value)
AWS_INTERNETMONITOR_API HealthEvent()=default
const Aws::Utils::DateTime & GetCreatedAt() const
void SetImpactType(HealthEventImpactType value)
HealthEventImpactType GetImpactType() const
AWS_INTERNETMONITOR_API HealthEvent & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_INTERNETMONITOR_API HealthEvent(Aws::Utils::Json::JsonView jsonValue)
HealthEvent & WithStatus(HealthEventStatus value)
HealthEvent & WithImpactType(HealthEventImpactType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue