AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/redshift/Redshift_EXPORTS.h>
12#include <aws/redshift/model/SourceType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace Redshift {
23namespace Model {
24
30class Event {
31 public:
32 AWS_REDSHIFT_API Event() = default;
33 AWS_REDSHIFT_API Event(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_REDSHIFT_API Event& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_REDSHIFT_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_REDSHIFT_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline const Aws::String& GetSourceIdentifier() const { return m_sourceIdentifier; }
44 inline bool SourceIdentifierHasBeenSet() const { return m_sourceIdentifierHasBeenSet; }
45 template <typename SourceIdentifierT = Aws::String>
46 void SetSourceIdentifier(SourceIdentifierT&& value) {
47 m_sourceIdentifierHasBeenSet = true;
48 m_sourceIdentifier = std::forward<SourceIdentifierT>(value);
49 }
50 template <typename SourceIdentifierT = Aws::String>
51 Event& WithSourceIdentifier(SourceIdentifierT&& value) {
52 SetSourceIdentifier(std::forward<SourceIdentifierT>(value));
53 return *this;
54 }
56
58
61 inline SourceType GetSourceType() const { return m_sourceType; }
62 inline bool SourceTypeHasBeenSet() const { return m_sourceTypeHasBeenSet; }
63 inline void SetSourceType(SourceType value) {
64 m_sourceTypeHasBeenSet = true;
65 m_sourceType = value;
66 }
68 SetSourceType(value);
69 return *this;
70 }
72
74
77 inline const Aws::String& GetMessage() const { return m_message; }
78 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
79 template <typename MessageT = Aws::String>
80 void SetMessage(MessageT&& value) {
81 m_messageHasBeenSet = true;
82 m_message = std::forward<MessageT>(value);
83 }
84 template <typename MessageT = Aws::String>
85 Event& WithMessage(MessageT&& value) {
86 SetMessage(std::forward<MessageT>(value));
87 return *this;
88 }
90
92
96 inline const Aws::Vector<Aws::String>& GetEventCategories() const { return m_eventCategories; }
97 inline bool EventCategoriesHasBeenSet() const { return m_eventCategoriesHasBeenSet; }
98 template <typename EventCategoriesT = Aws::Vector<Aws::String>>
99 void SetEventCategories(EventCategoriesT&& value) {
100 m_eventCategoriesHasBeenSet = true;
101 m_eventCategories = std::forward<EventCategoriesT>(value);
102 }
103 template <typename EventCategoriesT = Aws::Vector<Aws::String>>
104 Event& WithEventCategories(EventCategoriesT&& value) {
105 SetEventCategories(std::forward<EventCategoriesT>(value));
106 return *this;
107 }
108 template <typename EventCategoriesT = Aws::String>
109 Event& AddEventCategories(EventCategoriesT&& value) {
110 m_eventCategoriesHasBeenSet = true;
111 m_eventCategories.emplace_back(std::forward<EventCategoriesT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::String& GetSeverity() const { return m_severity; }
121 inline bool SeverityHasBeenSet() const { return m_severityHasBeenSet; }
122 template <typename SeverityT = Aws::String>
123 void SetSeverity(SeverityT&& value) {
124 m_severityHasBeenSet = true;
125 m_severity = std::forward<SeverityT>(value);
126 }
127 template <typename SeverityT = Aws::String>
128 Event& WithSeverity(SeverityT&& value) {
129 SetSeverity(std::forward<SeverityT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::Utils::DateTime& GetDate() const { return m_date; }
139 inline bool DateHasBeenSet() const { return m_dateHasBeenSet; }
140 template <typename DateT = Aws::Utils::DateTime>
141 void SetDate(DateT&& value) {
142 m_dateHasBeenSet = true;
143 m_date = std::forward<DateT>(value);
144 }
145 template <typename DateT = Aws::Utils::DateTime>
146 Event& WithDate(DateT&& value) {
147 SetDate(std::forward<DateT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetEventId() const { return m_eventId; }
157 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
158 template <typename EventIdT = Aws::String>
159 void SetEventId(EventIdT&& value) {
160 m_eventIdHasBeenSet = true;
161 m_eventId = std::forward<EventIdT>(value);
162 }
163 template <typename EventIdT = Aws::String>
164 Event& WithEventId(EventIdT&& value) {
165 SetEventId(std::forward<EventIdT>(value));
166 return *this;
167 }
169 private:
170 Aws::String m_sourceIdentifier;
171
172 SourceType m_sourceType{SourceType::NOT_SET};
173
174 Aws::String m_message;
175
176 Aws::Vector<Aws::String> m_eventCategories;
177
178 Aws::String m_severity;
179
180 Aws::Utils::DateTime m_date{};
181
182 Aws::String m_eventId;
183 bool m_sourceIdentifierHasBeenSet = false;
184 bool m_sourceTypeHasBeenSet = false;
185 bool m_messageHasBeenSet = false;
186 bool m_eventCategoriesHasBeenSet = false;
187 bool m_severityHasBeenSet = false;
188 bool m_dateHasBeenSet = false;
189 bool m_eventIdHasBeenSet = false;
190};
191
192} // namespace Model
193} // namespace Redshift
194} // namespace Aws
bool SourceIdentifierHasBeenSet() const
Definition Event.h:44
const Aws::String & GetEventId() const
Definition Event.h:156
Event & WithEventId(EventIdT &&value)
Definition Event.h:164
Event & AddEventCategories(EventCategoriesT &&value)
Definition Event.h:109
void SetEventId(EventIdT &&value)
Definition Event.h:159
const Aws::String & GetMessage() const
Definition Event.h:77
AWS_REDSHIFT_API Event()=default
SourceType GetSourceType() const
Definition Event.h:61
Event & WithSourceIdentifier(SourceIdentifierT &&value)
Definition Event.h:51
bool EventCategoriesHasBeenSet() const
Definition Event.h:97
bool MessageHasBeenSet() const
Definition Event.h:78
void SetSourceIdentifier(SourceIdentifierT &&value)
Definition Event.h:46
bool EventIdHasBeenSet() const
Definition Event.h:157
AWS_REDSHIFT_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_REDSHIFT_API void OutputToStream(Aws::OStream &oStream, const char *location) const
Event & WithDate(DateT &&value)
Definition Event.h:146
void SetMessage(MessageT &&value)
Definition Event.h:80
void SetDate(DateT &&value)
Definition Event.h:141
bool SeverityHasBeenSet() const
Definition Event.h:121
void SetSourceType(SourceType value)
Definition Event.h:63
bool DateHasBeenSet() const
Definition Event.h:139
AWS_REDSHIFT_API Event & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetSourceIdentifier() const
Definition Event.h:43
Event & WithSeverity(SeverityT &&value)
Definition Event.h:128
Event & WithSourceType(SourceType value)
Definition Event.h:67
const Aws::String & GetSeverity() const
Definition Event.h:120
Event & WithMessage(MessageT &&value)
Definition Event.h:85
void SetSeverity(SeverityT &&value)
Definition Event.h:123
Event & WithEventCategories(EventCategoriesT &&value)
Definition Event.h:104
bool SourceTypeHasBeenSet() const
Definition Event.h:62
void SetEventCategories(EventCategoriesT &&value)
Definition Event.h:99
const Aws::Vector< Aws::String > & GetEventCategories() const
Definition Event.h:96
AWS_REDSHIFT_API Event(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Utils::DateTime & GetDate() const
Definition Event.h:138
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream