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/docdb/DocDB_EXPORTS.h>
12#include <aws/docdb/model/SourceType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace DocDB {
23namespace Model {
24
30class Event {
31 public:
32 AWS_DOCDB_API Event() = default;
33 AWS_DOCDB_API Event(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_DOCDB_API Event& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_DOCDB_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_DOCDB_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
95 inline const Aws::Vector<Aws::String>& GetEventCategories() const { return m_eventCategories; }
96 inline bool EventCategoriesHasBeenSet() const { return m_eventCategoriesHasBeenSet; }
97 template <typename EventCategoriesT = Aws::Vector<Aws::String>>
98 void SetEventCategories(EventCategoriesT&& value) {
99 m_eventCategoriesHasBeenSet = true;
100 m_eventCategories = std::forward<EventCategoriesT>(value);
101 }
102 template <typename EventCategoriesT = Aws::Vector<Aws::String>>
103 Event& WithEventCategories(EventCategoriesT&& value) {
104 SetEventCategories(std::forward<EventCategoriesT>(value));
105 return *this;
106 }
107 template <typename EventCategoriesT = Aws::String>
108 Event& AddEventCategories(EventCategoriesT&& value) {
109 m_eventCategoriesHasBeenSet = true;
110 m_eventCategories.emplace_back(std::forward<EventCategoriesT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::Utils::DateTime& GetDate() const { return m_date; }
120 inline bool DateHasBeenSet() const { return m_dateHasBeenSet; }
121 template <typename DateT = Aws::Utils::DateTime>
122 void SetDate(DateT&& value) {
123 m_dateHasBeenSet = true;
124 m_date = std::forward<DateT>(value);
125 }
126 template <typename DateT = Aws::Utils::DateTime>
127 Event& WithDate(DateT&& value) {
128 SetDate(std::forward<DateT>(value));
129 return *this;
130 }
132
134
137 inline const Aws::String& GetSourceArn() const { return m_sourceArn; }
138 inline bool SourceArnHasBeenSet() const { return m_sourceArnHasBeenSet; }
139 template <typename SourceArnT = Aws::String>
140 void SetSourceArn(SourceArnT&& value) {
141 m_sourceArnHasBeenSet = true;
142 m_sourceArn = std::forward<SourceArnT>(value);
143 }
144 template <typename SourceArnT = Aws::String>
145 Event& WithSourceArn(SourceArnT&& value) {
146 SetSourceArn(std::forward<SourceArnT>(value));
147 return *this;
148 }
150 private:
151 Aws::String m_sourceIdentifier;
152
153 SourceType m_sourceType{SourceType::NOT_SET};
154
155 Aws::String m_message;
156
157 Aws::Vector<Aws::String> m_eventCategories;
158
159 Aws::Utils::DateTime m_date{};
160
161 Aws::String m_sourceArn;
162 bool m_sourceIdentifierHasBeenSet = false;
163 bool m_sourceTypeHasBeenSet = false;
164 bool m_messageHasBeenSet = false;
165 bool m_eventCategoriesHasBeenSet = false;
166 bool m_dateHasBeenSet = false;
167 bool m_sourceArnHasBeenSet = false;
168};
169
170} // namespace Model
171} // namespace DocDB
172} // namespace Aws
Event & WithEventCategories(EventCategoriesT &&value)
Definition Event.h:103
bool SourceArnHasBeenSet() const
Definition Event.h:138
Event & WithMessage(MessageT &&value)
Definition Event.h:85
const Aws::Vector< Aws::String > & GetEventCategories() const
Definition Event.h:95
SourceType GetSourceType() const
Definition Event.h:61
const Aws::String & GetSourceArn() const
Definition Event.h:137
Event & AddEventCategories(EventCategoriesT &&value)
Definition Event.h:108
bool SourceTypeHasBeenSet() const
Definition Event.h:62
const Aws::String & GetSourceIdentifier() const
Definition Event.h:43
Event & WithSourceIdentifier(SourceIdentifierT &&value)
Definition Event.h:51
Event & WithDate(DateT &&value)
Definition Event.h:127
bool SourceIdentifierHasBeenSet() const
Definition Event.h:44
bool DateHasBeenSet() const
Definition Event.h:120
bool EventCategoriesHasBeenSet() const
Definition Event.h:96
void SetDate(DateT &&value)
Definition Event.h:122
AWS_DOCDB_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetMessage(MessageT &&value)
Definition Event.h:80
void SetEventCategories(EventCategoriesT &&value)
Definition Event.h:98
void SetSourceType(SourceType value)
Definition Event.h:63
AWS_DOCDB_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetMessage() const
Definition Event.h:77
void SetSourceArn(SourceArnT &&value)
Definition Event.h:140
Event & WithSourceArn(SourceArnT &&value)
Definition Event.h:145
bool MessageHasBeenSet() const
Definition Event.h:78
AWS_DOCDB_API Event & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Event & WithSourceType(SourceType value)
Definition Event.h:67
const Aws::Utils::DateTime & GetDate() const
Definition Event.h:119
AWS_DOCDB_API Event()=default
void SetSourceIdentifier(SourceIdentifierT &&value)
Definition Event.h:46
AWS_DOCDB_API Event(const Aws::Utils::Xml::XmlNode &xmlNode)
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