AWS SDK for C++

AWS SDK for C++ Version 1.11.934

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/bedrock-agentcore/BedrockAgentCore_EXPORTS.h>
8#include <aws/bedrock-agentcore/model/Branch.h>
9#include <aws/bedrock-agentcore/model/MetadataValue.h>
10#include <aws/bedrock-agentcore/model/PayloadType.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace BedrockAgentCore {
26namespace Model {
27
34class Event {
35 public:
36 AWS_BEDROCKAGENTCORE_API Event() = default;
37 AWS_BEDROCKAGENTCORE_API Event(Aws::Utils::Json::JsonView jsonValue);
38 AWS_BEDROCKAGENTCORE_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetMemoryId() const { return m_memoryId; }
46 inline bool MemoryIdHasBeenSet() const { return m_memoryIdHasBeenSet; }
47 template <typename MemoryIdT = Aws::String>
48 void SetMemoryId(MemoryIdT&& value) {
49 m_memoryIdHasBeenSet = true;
50 m_memoryId = std::forward<MemoryIdT>(value);
51 }
52 template <typename MemoryIdT = Aws::String>
53 Event& WithMemoryId(MemoryIdT&& value) {
54 SetMemoryId(std::forward<MemoryIdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetActorId() const { return m_actorId; }
64 inline bool ActorIdHasBeenSet() const { return m_actorIdHasBeenSet; }
65 template <typename ActorIdT = Aws::String>
66 void SetActorId(ActorIdT&& value) {
67 m_actorIdHasBeenSet = true;
68 m_actorId = std::forward<ActorIdT>(value);
69 }
70 template <typename ActorIdT = Aws::String>
71 Event& WithActorId(ActorIdT&& value) {
72 SetActorId(std::forward<ActorIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetSessionId() const { return m_sessionId; }
82 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
83 template <typename SessionIdT = Aws::String>
84 void SetSessionId(SessionIdT&& value) {
85 m_sessionIdHasBeenSet = true;
86 m_sessionId = std::forward<SessionIdT>(value);
87 }
88 template <typename SessionIdT = Aws::String>
89 Event& WithSessionId(SessionIdT&& value) {
90 SetSessionId(std::forward<SessionIdT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetEventId() const { return m_eventId; }
100 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
101 template <typename EventIdT = Aws::String>
102 void SetEventId(EventIdT&& value) {
103 m_eventIdHasBeenSet = true;
104 m_eventId = std::forward<EventIdT>(value);
105 }
106 template <typename EventIdT = Aws::String>
107 Event& WithEventId(EventIdT&& value) {
108 SetEventId(std::forward<EventIdT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::Utils::DateTime& GetEventTimestamp() const { return m_eventTimestamp; }
118 inline bool EventTimestampHasBeenSet() const { return m_eventTimestampHasBeenSet; }
119 template <typename EventTimestampT = Aws::Utils::DateTime>
120 void SetEventTimestamp(EventTimestampT&& value) {
121 m_eventTimestampHasBeenSet = true;
122 m_eventTimestamp = std::forward<EventTimestampT>(value);
123 }
124 template <typename EventTimestampT = Aws::Utils::DateTime>
125 Event& WithEventTimestamp(EventTimestampT&& value) {
126 SetEventTimestamp(std::forward<EventTimestampT>(value));
127 return *this;
128 }
130
132
135 inline const Aws::Vector<PayloadType>& GetPayload() const { return m_payload; }
136 inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; }
137 template <typename PayloadT = Aws::Vector<PayloadType>>
138 void SetPayload(PayloadT&& value) {
139 m_payloadHasBeenSet = true;
140 m_payload = std::forward<PayloadT>(value);
141 }
142 template <typename PayloadT = Aws::Vector<PayloadType>>
143 Event& WithPayload(PayloadT&& value) {
144 SetPayload(std::forward<PayloadT>(value));
145 return *this;
146 }
147 template <typename PayloadT = PayloadType>
148 Event& AddPayload(PayloadT&& value) {
149 m_payloadHasBeenSet = true;
150 m_payload.emplace_back(std::forward<PayloadT>(value));
151 return *this;
152 }
154
156
159 inline const Branch& GetBranch() const { return m_branch; }
160 inline bool BranchHasBeenSet() const { return m_branchHasBeenSet; }
161 template <typename BranchT = Branch>
162 void SetBranch(BranchT&& value) {
163 m_branchHasBeenSet = true;
164 m_branch = std::forward<BranchT>(value);
165 }
166 template <typename BranchT = Branch>
167 Event& WithBranch(BranchT&& value) {
168 SetBranch(std::forward<BranchT>(value));
169 return *this;
170 }
172
174
177 inline const Aws::Map<Aws::String, MetadataValue>& GetMetadata() const { return m_metadata; }
178 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
179 template <typename MetadataT = Aws::Map<Aws::String, MetadataValue>>
180 void SetMetadata(MetadataT&& value) {
181 m_metadataHasBeenSet = true;
182 m_metadata = std::forward<MetadataT>(value);
183 }
184 template <typename MetadataT = Aws::Map<Aws::String, MetadataValue>>
185 Event& WithMetadata(MetadataT&& value) {
186 SetMetadata(std::forward<MetadataT>(value));
187 return *this;
188 }
189 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = MetadataValue>
190 Event& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
191 m_metadataHasBeenSet = true;
192 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
193 return *this;
194 }
196 private:
197 Aws::String m_memoryId;
198
199 Aws::String m_actorId;
200
201 Aws::String m_sessionId;
202
203 Aws::String m_eventId;
204
205 Aws::Utils::DateTime m_eventTimestamp{};
206
207 Aws::Vector<PayloadType> m_payload;
208
209 Branch m_branch;
210
212 bool m_memoryIdHasBeenSet = false;
213 bool m_actorIdHasBeenSet = false;
214 bool m_sessionIdHasBeenSet = false;
215 bool m_eventIdHasBeenSet = false;
216 bool m_eventTimestampHasBeenSet = false;
217 bool m_payloadHasBeenSet = false;
218 bool m_branchHasBeenSet = false;
219 bool m_metadataHasBeenSet = false;
220};
221
222} // namespace Model
223} // namespace BedrockAgentCore
224} // namespace Aws
const Aws::String & GetEventId() const
Definition Event.h:99
Event & WithEventTimestamp(EventTimestampT &&value)
Definition Event.h:125
Event & WithBranch(BranchT &&value)
Definition Event.h:167
const Branch & GetBranch() const
Definition Event.h:159
void SetActorId(ActorIdT &&value)
Definition Event.h:66
void SetMetadata(MetadataT &&value)
Definition Event.h:180
void SetEventId(EventIdT &&value)
Definition Event.h:102
const Aws::String & GetSessionId() const
Definition Event.h:81
AWS_BEDROCKAGENTCORE_API Event()=default
void SetPayload(PayloadT &&value)
Definition Event.h:138
void SetSessionId(SessionIdT &&value)
Definition Event.h:84
AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const
Event & WithEventId(EventIdT &&value)
Definition Event.h:107
Event & AddPayload(PayloadT &&value)
Definition Event.h:148
AWS_BEDROCKAGENTCORE_API Event(Aws::Utils::Json::JsonView jsonValue)
void SetBranch(BranchT &&value)
Definition Event.h:162
const Aws::String & GetActorId() const
Definition Event.h:63
const Aws::Utils::DateTime & GetEventTimestamp() const
Definition Event.h:117
Event & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
Definition Event.h:190
const Aws::Vector< PayloadType > & GetPayload() const
Definition Event.h:135
void SetMemoryId(MemoryIdT &&value)
Definition Event.h:48
const Aws::Map< Aws::String, MetadataValue > & GetMetadata() const
Definition Event.h:177
Event & WithMemoryId(MemoryIdT &&value)
Definition Event.h:53
void SetEventTimestamp(EventTimestampT &&value)
Definition Event.h:120
Event & WithPayload(PayloadT &&value)
Definition Event.h:143
AWS_BEDROCKAGENTCORE_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
Event & WithMetadata(MetadataT &&value)
Definition Event.h:185
Event & WithSessionId(SessionIdT &&value)
Definition Event.h:89
const Aws::String & GetMemoryId() const
Definition Event.h:45
Event & WithActorId(ActorIdT &&value)
Definition Event.h:71
bool EventTimestampHasBeenSet() const
Definition Event.h:118
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
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue