AWS SDK for C++

AWS SDK for C++ Version 1.11.930

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/opensearchmemory/OpenSearchMemory_EXPORTS.h>
11#include <aws/opensearchmemory/model/EventPayload.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace OpenSearchMemory {
23namespace Model {
24
30class Event {
31 public:
32 AWS_OPENSEARCHMEMORY_API Event() = default;
33 AWS_OPENSEARCHMEMORY_API Event(Aws::Utils::Json::JsonView jsonValue);
34 AWS_OPENSEARCHMEMORY_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_OPENSEARCHMEMORY_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetEventId() const { return m_eventId; }
42 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
43 template <typename EventIdT = Aws::String>
44 void SetEventId(EventIdT&& value) {
45 m_eventIdHasBeenSet = true;
46 m_eventId = std::forward<EventIdT>(value);
47 }
48 template <typename EventIdT = Aws::String>
49 Event& WithEventId(EventIdT&& value) {
50 SetEventId(std::forward<EventIdT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetSpaceId() const { return m_spaceId; }
60 inline bool SpaceIdHasBeenSet() const { return m_spaceIdHasBeenSet; }
61 template <typename SpaceIdT = Aws::String>
62 void SetSpaceId(SpaceIdT&& value) {
63 m_spaceIdHasBeenSet = true;
64 m_spaceId = std::forward<SpaceIdT>(value);
65 }
66 template <typename SpaceIdT = Aws::String>
67 Event& WithSpaceId(SpaceIdT&& value) {
68 SetSpaceId(std::forward<SpaceIdT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetActorId() const { return m_actorId; }
78 inline bool ActorIdHasBeenSet() const { return m_actorIdHasBeenSet; }
79 template <typename ActorIdT = Aws::String>
80 void SetActorId(ActorIdT&& value) {
81 m_actorIdHasBeenSet = true;
82 m_actorId = std::forward<ActorIdT>(value);
83 }
84 template <typename ActorIdT = Aws::String>
85 Event& WithActorId(ActorIdT&& value) {
86 SetActorId(std::forward<ActorIdT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::String& GetSessionId() const { return m_sessionId; }
96 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
97 template <typename SessionIdT = Aws::String>
98 void SetSessionId(SessionIdT&& value) {
99 m_sessionIdHasBeenSet = true;
100 m_sessionId = std::forward<SessionIdT>(value);
101 }
102 template <typename SessionIdT = Aws::String>
103 Event& WithSessionId(SessionIdT&& value) {
104 SetSessionId(std::forward<SessionIdT>(value));
105 return *this;
106 }
108
110
113 inline const EventPayload& GetPayload() const { return m_payload; }
114 inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; }
115 template <typename PayloadT = EventPayload>
116 void SetPayload(PayloadT&& value) {
117 m_payloadHasBeenSet = true;
118 m_payload = std::forward<PayloadT>(value);
119 }
120 template <typename PayloadT = EventPayload>
121 Event& WithPayload(PayloadT&& value) {
122 SetPayload(std::forward<PayloadT>(value));
123 return *this;
124 }
126
128
132 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const { return m_metadata; }
133 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
134 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
135 void SetMetadata(MetadataT&& value) {
136 m_metadataHasBeenSet = true;
137 m_metadata = std::forward<MetadataT>(value);
138 }
139 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
140 Event& WithMetadata(MetadataT&& value) {
141 SetMetadata(std::forward<MetadataT>(value));
142 return *this;
143 }
144 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::String>
145 Event& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
146 m_metadataHasBeenSet = true;
147 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::Utils::DateTime& GetEventTimestamp() const { return m_eventTimestamp; }
157 inline bool EventTimestampHasBeenSet() const { return m_eventTimestampHasBeenSet; }
158 template <typename EventTimestampT = Aws::Utils::DateTime>
159 void SetEventTimestamp(EventTimestampT&& value) {
160 m_eventTimestampHasBeenSet = true;
161 m_eventTimestamp = std::forward<EventTimestampT>(value);
162 }
163 template <typename EventTimestampT = Aws::Utils::DateTime>
164 Event& WithEventTimestamp(EventTimestampT&& value) {
165 SetEventTimestamp(std::forward<EventTimestampT>(value));
166 return *this;
167 }
169 private:
170 Aws::String m_eventId;
171
172 Aws::String m_spaceId;
173
174 Aws::String m_actorId;
175
176 Aws::String m_sessionId;
177
178 EventPayload m_payload;
179
181
182 Aws::Utils::DateTime m_eventTimestamp{};
183 bool m_eventIdHasBeenSet = false;
184 bool m_spaceIdHasBeenSet = false;
185 bool m_actorIdHasBeenSet = false;
186 bool m_sessionIdHasBeenSet = false;
187 bool m_payloadHasBeenSet = false;
188 bool m_metadataHasBeenSet = false;
189 bool m_eventTimestampHasBeenSet = false;
190};
191
192} // namespace Model
193} // namespace OpenSearchMemory
194} // namespace Aws
const Aws::String & GetEventId() const
Definition Event.h:41
Event & WithSessionId(SessionIdT &&value)
Definition Event.h:103
Event & WithSpaceId(SpaceIdT &&value)
Definition Event.h:67
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
Definition Event.h:132
void SetEventTimestamp(EventTimestampT &&value)
Definition Event.h:159
void SetSpaceId(SpaceIdT &&value)
Definition Event.h:62
void SetPayload(PayloadT &&value)
Definition Event.h:116
Event & WithEventTimestamp(EventTimestampT &&value)
Definition Event.h:164
AWS_OPENSEARCHMEMORY_API Event(Aws::Utils::Json::JsonView jsonValue)
bool EventTimestampHasBeenSet() const
Definition Event.h:157
const Aws::String & GetActorId() const
Definition Event.h:77
Event & WithPayload(PayloadT &&value)
Definition Event.h:121
void SetEventId(EventIdT &&value)
Definition Event.h:44
Event & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
Definition Event.h:145
void SetMetadata(MetadataT &&value)
Definition Event.h:135
Event & WithEventId(EventIdT &&value)
Definition Event.h:49
Event & WithActorId(ActorIdT &&value)
Definition Event.h:85
AWS_OPENSEARCHMEMORY_API Event()=default
void SetActorId(ActorIdT &&value)
Definition Event.h:80
const Aws::String & GetSessionId() const
Definition Event.h:95
AWS_OPENSEARCHMEMORY_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
Event & WithMetadata(MetadataT &&value)
Definition Event.h:140
AWS_OPENSEARCHMEMORY_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetSpaceId() const
Definition Event.h:59
void SetSessionId(SessionIdT &&value)
Definition Event.h:98
const Aws::Utils::DateTime & GetEventTimestamp() const
Definition Event.h:156
const EventPayload & GetPayload() const
Definition Event.h:113
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue