AWS SDK for C++

AWS SDK for C++ Version 1.11.930

Loading...
Searching...
No Matches
CreateEventRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/UUID.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/opensearchmemory/OpenSearchMemoryRequest.h>
12#include <aws/opensearchmemory/OpenSearchMemory_EXPORTS.h>
13#include <aws/opensearchmemory/model/EventPayload.h>
14
15#include <utility>
16
17namespace Aws {
18namespace OpenSearchMemory {
19namespace Model {
20
24 public:
25 AWS_OPENSEARCHMEMORY_API CreateEventRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CreateEvent"; }
32
33 AWS_OPENSEARCHMEMORY_API Aws::String SerializePayload() const override;
34
35 AWS_OPENSEARCHMEMORY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36
40 AWS_OPENSEARCHMEMORY_API EndpointParameters GetEndpointContextParams() const override;
41
43
47 inline const Aws::String& GetSpaceId() const { return m_spaceId; }
48 inline bool SpaceIdHasBeenSet() const { return m_spaceIdHasBeenSet; }
49 template <typename SpaceIdT = Aws::String>
50 void SetSpaceId(SpaceIdT&& value) {
51 m_spaceIdHasBeenSet = true;
52 m_spaceId = std::forward<SpaceIdT>(value);
53 }
54 template <typename SpaceIdT = Aws::String>
55 CreateEventRequest& WithSpaceId(SpaceIdT&& value) {
56 SetSpaceId(std::forward<SpaceIdT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetActorId() const { return m_actorId; }
66 inline bool ActorIdHasBeenSet() const { return m_actorIdHasBeenSet; }
67 template <typename ActorIdT = Aws::String>
68 void SetActorId(ActorIdT&& value) {
69 m_actorIdHasBeenSet = true;
70 m_actorId = std::forward<ActorIdT>(value);
71 }
72 template <typename ActorIdT = Aws::String>
73 CreateEventRequest& WithActorId(ActorIdT&& value) {
74 SetActorId(std::forward<ActorIdT>(value));
75 return *this;
76 }
78
80
86 inline const Aws::String& GetSessionId() const { return m_sessionId; }
87 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
88 template <typename SessionIdT = Aws::String>
89 void SetSessionId(SessionIdT&& value) {
90 m_sessionIdHasBeenSet = true;
91 m_sessionId = std::forward<SessionIdT>(value);
92 }
93 template <typename SessionIdT = Aws::String>
94 CreateEventRequest& WithSessionId(SessionIdT&& value) {
95 SetSessionId(std::forward<SessionIdT>(value));
96 return *this;
97 }
99
101
105 inline const Aws::Utils::DateTime& GetEventTimestamp() const { return m_eventTimestamp; }
106 inline bool EventTimestampHasBeenSet() const { return m_eventTimestampHasBeenSet; }
107 template <typename EventTimestampT = Aws::Utils::DateTime>
108 void SetEventTimestamp(EventTimestampT&& value) {
109 m_eventTimestampHasBeenSet = true;
110 m_eventTimestamp = std::forward<EventTimestampT>(value);
111 }
112 template <typename EventTimestampT = Aws::Utils::DateTime>
113 CreateEventRequest& WithEventTimestamp(EventTimestampT&& value) {
114 SetEventTimestamp(std::forward<EventTimestampT>(value));
115 return *this;
116 }
118
120
123 inline const EventPayload& GetPayload() const { return m_payload; }
124 inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; }
125 template <typename PayloadT = EventPayload>
126 void SetPayload(PayloadT&& value) {
127 m_payloadHasBeenSet = true;
128 m_payload = std::forward<PayloadT>(value);
129 }
130 template <typename PayloadT = EventPayload>
131 CreateEventRequest& WithPayload(PayloadT&& value) {
132 SetPayload(std::forward<PayloadT>(value));
133 return *this;
134 }
136
138
148 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const { return m_metadata; }
149 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
150 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
151 void SetMetadata(MetadataT&& value) {
152 m_metadataHasBeenSet = true;
153 m_metadata = std::forward<MetadataT>(value);
154 }
155 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
156 CreateEventRequest& WithMetadata(MetadataT&& value) {
157 SetMetadata(std::forward<MetadataT>(value));
158 return *this;
159 }
160 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::String>
161 CreateEventRequest& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
162 m_metadataHasBeenSet = true;
163 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
164 return *this;
165 }
167
169
179 inline const Aws::String& GetClientToken() const { return m_clientToken; }
180 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
181 template <typename ClientTokenT = Aws::String>
182 void SetClientToken(ClientTokenT&& value) {
183 m_clientTokenHasBeenSet = true;
184 m_clientToken = std::forward<ClientTokenT>(value);
185 }
186 template <typename ClientTokenT = Aws::String>
187 CreateEventRequest& WithClientToken(ClientTokenT&& value) {
188 SetClientToken(std::forward<ClientTokenT>(value));
189 return *this;
190 }
192
194
201 inline bool GetInfer() const { return m_infer; }
202 inline bool InferHasBeenSet() const { return m_inferHasBeenSet; }
203 inline void SetInfer(bool value) {
204 m_inferHasBeenSet = true;
205 m_infer = value;
206 }
207 inline CreateEventRequest& WithInfer(bool value) {
208 SetInfer(value);
209 return *this;
210 }
212 private:
213 Aws::String m_spaceId;
214
215 Aws::String m_actorId;
216
217 Aws::String m_sessionId;
218
219 Aws::Utils::DateTime m_eventTimestamp{};
220
221 EventPayload m_payload;
222
224
226
227 bool m_infer{false};
228 bool m_spaceIdHasBeenSet = false;
229 bool m_actorIdHasBeenSet = false;
230 bool m_sessionIdHasBeenSet = false;
231 bool m_eventTimestampHasBeenSet = false;
232 bool m_payloadHasBeenSet = false;
233 bool m_metadataHasBeenSet = false;
234 bool m_clientTokenHasBeenSet = true;
235 bool m_inferHasBeenSet = false;
236};
237
238} // namespace Model
239} // namespace OpenSearchMemory
240} // namespace Aws
CreateEventRequest & WithActorId(ActorIdT &&value)
CreateEventRequest & WithEventTimestamp(EventTimestampT &&value)
CreateEventRequest & WithMetadata(MetadataT &&value)
AWS_OPENSEARCHMEMORY_API EndpointParameters GetEndpointContextParams() const override
CreateEventRequest & WithSessionId(SessionIdT &&value)
AWS_OPENSEARCHMEMORY_API Aws::String SerializePayload() const override
AWS_OPENSEARCHMEMORY_API CreateEventRequest()=default
CreateEventRequest & WithSpaceId(SpaceIdT &&value)
CreateEventRequest & WithClientToken(ClientTokenT &&value)
AWS_OPENSEARCHMEMORY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
virtual const char * GetServiceRequestName() const override
CreateEventRequest & WithPayload(PayloadT &&value)
const Aws::Utils::DateTime & GetEventTimestamp() const
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
CreateEventRequest & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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