AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/personalize-events/PersonalizeEvents_EXPORTS.h>
11#include <aws/personalize-events/model/MetricAttribution.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace PersonalizeEvents {
23namespace Model {
24
31class Event {
32 public:
33 AWS_PERSONALIZEEVENTS_API Event() = default;
34 AWS_PERSONALIZEEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue);
35 AWS_PERSONALIZEEVENTS_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_PERSONALIZEEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
46 inline const Aws::String& GetEventId() const { return m_eventId; }
47 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
48 template <typename EventIdT = Aws::String>
49 void SetEventId(EventIdT&& value) {
50 m_eventIdHasBeenSet = true;
51 m_eventId = std::forward<EventIdT>(value);
52 }
53 template <typename EventIdT = Aws::String>
54 Event& WithEventId(EventIdT&& value) {
55 SetEventId(std::forward<EventIdT>(value));
56 return *this;
57 }
59
61
66 inline const Aws::String& GetEventType() const { return m_eventType; }
67 inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; }
68 template <typename EventTypeT = Aws::String>
69 void SetEventType(EventTypeT&& value) {
70 m_eventTypeHasBeenSet = true;
71 m_eventType = std::forward<EventTypeT>(value);
72 }
73 template <typename EventTypeT = Aws::String>
74 Event& WithEventType(EventTypeT&& value) {
75 SetEventType(std::forward<EventTypeT>(value));
76 return *this;
77 }
79
81
85 inline double GetEventValue() const { return m_eventValue; }
86 inline bool EventValueHasBeenSet() const { return m_eventValueHasBeenSet; }
87 inline void SetEventValue(double value) {
88 m_eventValueHasBeenSet = true;
89 m_eventValue = value;
90 }
91 inline Event& WithEventValue(double value) {
92 SetEventValue(value);
93 return *this;
94 }
96
98
102 inline const Aws::String& GetItemId() const { return m_itemId; }
103 inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; }
104 template <typename ItemIdT = Aws::String>
105 void SetItemId(ItemIdT&& value) {
106 m_itemIdHasBeenSet = true;
107 m_itemId = std::forward<ItemIdT>(value);
108 }
109 template <typename ItemIdT = Aws::String>
110 Event& WithItemId(ItemIdT&& value) {
111 SetItemId(std::forward<ItemIdT>(value));
112 return *this;
113 }
115
117
132 inline const Aws::String& GetProperties() const { return m_properties; }
133 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
134 template <typename PropertiesT = Aws::String>
135 void SetProperties(PropertiesT&& value) {
136 m_propertiesHasBeenSet = true;
137 m_properties = std::forward<PropertiesT>(value);
138 }
139 template <typename PropertiesT = Aws::String>
140 Event& WithProperties(PropertiesT&& value) {
141 SetProperties(std::forward<PropertiesT>(value));
142 return *this;
143 }
145
147
150 inline const Aws::Utils::DateTime& GetSentAt() const { return m_sentAt; }
151 inline bool SentAtHasBeenSet() const { return m_sentAtHasBeenSet; }
152 template <typename SentAtT = Aws::Utils::DateTime>
153 void SetSentAt(SentAtT&& value) {
154 m_sentAtHasBeenSet = true;
155 m_sentAt = std::forward<SentAtT>(value);
156 }
157 template <typename SentAtT = Aws::Utils::DateTime>
158 Event& WithSentAt(SentAtT&& value) {
159 SetSentAt(std::forward<SentAtT>(value));
160 return *this;
161 }
163
165
178 inline const Aws::String& GetRecommendationId() const { return m_recommendationId; }
179 inline bool RecommendationIdHasBeenSet() const { return m_recommendationIdHasBeenSet; }
180 template <typename RecommendationIdT = Aws::String>
181 void SetRecommendationId(RecommendationIdT&& value) {
182 m_recommendationIdHasBeenSet = true;
183 m_recommendationId = std::forward<RecommendationIdT>(value);
184 }
185 template <typename RecommendationIdT = Aws::String>
186 Event& WithRecommendationId(RecommendationIdT&& value) {
187 SetRecommendationId(std::forward<RecommendationIdT>(value));
188 return *this;
189 }
191
193
201 inline const Aws::Vector<Aws::String>& GetImpression() const { return m_impression; }
202 inline bool ImpressionHasBeenSet() const { return m_impressionHasBeenSet; }
203 template <typename ImpressionT = Aws::Vector<Aws::String>>
204 void SetImpression(ImpressionT&& value) {
205 m_impressionHasBeenSet = true;
206 m_impression = std::forward<ImpressionT>(value);
207 }
208 template <typename ImpressionT = Aws::Vector<Aws::String>>
209 Event& WithImpression(ImpressionT&& value) {
210 SetImpression(std::forward<ImpressionT>(value));
211 return *this;
212 }
213 template <typename ImpressionT = Aws::String>
214 Event& AddImpression(ImpressionT&& value) {
215 m_impressionHasBeenSet = true;
216 m_impression.emplace_back(std::forward<ImpressionT>(value));
217 return *this;
218 }
220
222
228 inline const MetricAttribution& GetMetricAttribution() const { return m_metricAttribution; }
229 inline bool MetricAttributionHasBeenSet() const { return m_metricAttributionHasBeenSet; }
230 template <typename MetricAttributionT = MetricAttribution>
231 void SetMetricAttribution(MetricAttributionT&& value) {
232 m_metricAttributionHasBeenSet = true;
233 m_metricAttribution = std::forward<MetricAttributionT>(value);
234 }
235 template <typename MetricAttributionT = MetricAttribution>
236 Event& WithMetricAttribution(MetricAttributionT&& value) {
237 SetMetricAttribution(std::forward<MetricAttributionT>(value));
238 return *this;
239 }
241 private:
242 Aws::String m_eventId;
243
244 Aws::String m_eventType;
245
246 double m_eventValue{0.0};
247
248 Aws::String m_itemId;
249
250 Aws::String m_properties;
251
252 Aws::Utils::DateTime m_sentAt{};
253
254 Aws::String m_recommendationId;
255
256 Aws::Vector<Aws::String> m_impression;
257
258 MetricAttribution m_metricAttribution;
259 bool m_eventIdHasBeenSet = false;
260 bool m_eventTypeHasBeenSet = false;
261 bool m_eventValueHasBeenSet = false;
262 bool m_itemIdHasBeenSet = false;
263 bool m_propertiesHasBeenSet = false;
264 bool m_sentAtHasBeenSet = false;
265 bool m_recommendationIdHasBeenSet = false;
266 bool m_impressionHasBeenSet = false;
267 bool m_metricAttributionHasBeenSet = false;
268};
269
270} // namespace Model
271} // namespace PersonalizeEvents
272} // namespace Aws
bool MetricAttributionHasBeenSet() const
Definition Event.h:229
void SetProperties(PropertiesT &&value)
Definition Event.h:135
AWS_PERSONALIZEEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue)
Event & WithEventType(EventTypeT &&value)
Definition Event.h:74
bool RecommendationIdHasBeenSet() const
Definition Event.h:179
Event & WithImpression(ImpressionT &&value)
Definition Event.h:209
const Aws::String & GetEventType() const
Definition Event.h:66
void SetSentAt(SentAtT &&value)
Definition Event.h:153
Event & WithItemId(ItemIdT &&value)
Definition Event.h:110
const Aws::String & GetProperties() const
Definition Event.h:132
void SetEventType(EventTypeT &&value)
Definition Event.h:69
const Aws::String & GetItemId() const
Definition Event.h:102
Event & WithEventId(EventIdT &&value)
Definition Event.h:54
const Aws::Utils::DateTime & GetSentAt() const
Definition Event.h:150
Event & WithMetricAttribution(MetricAttributionT &&value)
Definition Event.h:236
Event & WithProperties(PropertiesT &&value)
Definition Event.h:140
const Aws::String & GetRecommendationId() const
Definition Event.h:178
const Aws::Vector< Aws::String > & GetImpression() const
Definition Event.h:201
Event & WithSentAt(SentAtT &&value)
Definition Event.h:158
const Aws::String & GetEventId() const
Definition Event.h:46
AWS_PERSONALIZEEVENTS_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
Event & WithEventValue(double value)
Definition Event.h:91
Event & WithRecommendationId(RecommendationIdT &&value)
Definition Event.h:186
AWS_PERSONALIZEEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetMetricAttribution(MetricAttributionT &&value)
Definition Event.h:231
void SetRecommendationId(RecommendationIdT &&value)
Definition Event.h:181
AWS_PERSONALIZEEVENTS_API Event()=default
void SetEventId(EventIdT &&value)
Definition Event.h:49
void SetImpression(ImpressionT &&value)
Definition Event.h:204
void SetEventValue(double value)
Definition Event.h:87
Event & AddImpression(ImpressionT &&value)
Definition Event.h:214
const MetricAttribution & GetMetricAttribution() const
Definition Event.h:228
void SetItemId(ItemIdT &&value)
Definition Event.h:105
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue