AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/personalize-events/PersonalizeEvents_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/personalize-events/model/MetricAttribution.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace PersonalizeEvents
25{
26namespace Model
27{
28
35 class Event
36 {
37 public:
38 AWS_PERSONALIZEEVENTS_API Event() = default;
39 AWS_PERSONALIZEEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue);
40 AWS_PERSONALIZEEVENTS_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_PERSONALIZEEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
52 inline const Aws::String& GetEventId() const { return m_eventId; }
53 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
54 template<typename EventIdT = Aws::String>
55 void SetEventId(EventIdT&& value) { m_eventIdHasBeenSet = true; m_eventId = std::forward<EventIdT>(value); }
56 template<typename EventIdT = Aws::String>
57 Event& WithEventId(EventIdT&& value) { SetEventId(std::forward<EventIdT>(value)); return *this;}
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) { m_eventTypeHasBeenSet = true; m_eventType = std::forward<EventTypeT>(value); }
70 template<typename EventTypeT = Aws::String>
71 Event& WithEventType(EventTypeT&& value) { SetEventType(std::forward<EventTypeT>(value)); return *this;}
73
75
79 inline double GetEventValue() const { return m_eventValue; }
80 inline bool EventValueHasBeenSet() const { return m_eventValueHasBeenSet; }
81 inline void SetEventValue(double value) { m_eventValueHasBeenSet = true; m_eventValue = value; }
82 inline Event& WithEventValue(double value) { SetEventValue(value); return *this;}
84
86
90 inline const Aws::String& GetItemId() const { return m_itemId; }
91 inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; }
92 template<typename ItemIdT = Aws::String>
93 void SetItemId(ItemIdT&& value) { m_itemIdHasBeenSet = true; m_itemId = std::forward<ItemIdT>(value); }
94 template<typename ItemIdT = Aws::String>
95 Event& WithItemId(ItemIdT&& value) { SetItemId(std::forward<ItemIdT>(value)); return *this;}
97
99
114 inline const Aws::String& GetProperties() const { return m_properties; }
115 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
116 template<typename PropertiesT = Aws::String>
117 void SetProperties(PropertiesT&& value) { m_propertiesHasBeenSet = true; m_properties = std::forward<PropertiesT>(value); }
118 template<typename PropertiesT = Aws::String>
119 Event& WithProperties(PropertiesT&& value) { SetProperties(std::forward<PropertiesT>(value)); return *this;}
121
123
126 inline const Aws::Utils::DateTime& GetSentAt() const { return m_sentAt; }
127 inline bool SentAtHasBeenSet() const { return m_sentAtHasBeenSet; }
128 template<typename SentAtT = Aws::Utils::DateTime>
129 void SetSentAt(SentAtT&& value) { m_sentAtHasBeenSet = true; m_sentAt = std::forward<SentAtT>(value); }
130 template<typename SentAtT = Aws::Utils::DateTime>
131 Event& WithSentAt(SentAtT&& value) { SetSentAt(std::forward<SentAtT>(value)); return *this;}
133
135
148 inline const Aws::String& GetRecommendationId() const { return m_recommendationId; }
149 inline bool RecommendationIdHasBeenSet() const { return m_recommendationIdHasBeenSet; }
150 template<typename RecommendationIdT = Aws::String>
151 void SetRecommendationId(RecommendationIdT&& value) { m_recommendationIdHasBeenSet = true; m_recommendationId = std::forward<RecommendationIdT>(value); }
152 template<typename RecommendationIdT = Aws::String>
153 Event& WithRecommendationId(RecommendationIdT&& value) { SetRecommendationId(std::forward<RecommendationIdT>(value)); return *this;}
155
157
165 inline const Aws::Vector<Aws::String>& GetImpression() const { return m_impression; }
166 inline bool ImpressionHasBeenSet() const { return m_impressionHasBeenSet; }
167 template<typename ImpressionT = Aws::Vector<Aws::String>>
168 void SetImpression(ImpressionT&& value) { m_impressionHasBeenSet = true; m_impression = std::forward<ImpressionT>(value); }
169 template<typename ImpressionT = Aws::Vector<Aws::String>>
170 Event& WithImpression(ImpressionT&& value) { SetImpression(std::forward<ImpressionT>(value)); return *this;}
171 template<typename ImpressionT = Aws::String>
172 Event& AddImpression(ImpressionT&& value) { m_impressionHasBeenSet = true; m_impression.emplace_back(std::forward<ImpressionT>(value)); return *this; }
174
176
182 inline const MetricAttribution& GetMetricAttribution() const { return m_metricAttribution; }
183 inline bool MetricAttributionHasBeenSet() const { return m_metricAttributionHasBeenSet; }
184 template<typename MetricAttributionT = MetricAttribution>
185 void SetMetricAttribution(MetricAttributionT&& value) { m_metricAttributionHasBeenSet = true; m_metricAttribution = std::forward<MetricAttributionT>(value); }
186 template<typename MetricAttributionT = MetricAttribution>
187 Event& WithMetricAttribution(MetricAttributionT&& value) { SetMetricAttribution(std::forward<MetricAttributionT>(value)); return *this;}
189 private:
190
191 Aws::String m_eventId;
192 bool m_eventIdHasBeenSet = false;
193
194 Aws::String m_eventType;
195 bool m_eventTypeHasBeenSet = false;
196
197 double m_eventValue{0.0};
198 bool m_eventValueHasBeenSet = false;
199
200 Aws::String m_itemId;
201 bool m_itemIdHasBeenSet = false;
202
203 Aws::String m_properties;
204 bool m_propertiesHasBeenSet = false;
205
206 Aws::Utils::DateTime m_sentAt{};
207 bool m_sentAtHasBeenSet = false;
208
209 Aws::String m_recommendationId;
210 bool m_recommendationIdHasBeenSet = false;
211
212 Aws::Vector<Aws::String> m_impression;
213 bool m_impressionHasBeenSet = false;
214
215 MetricAttribution m_metricAttribution;
216 bool m_metricAttributionHasBeenSet = false;
217 };
218
219} // namespace Model
220} // namespace PersonalizeEvents
221} // namespace Aws
bool MetricAttributionHasBeenSet() const
Definition Event.h:183
void SetProperties(PropertiesT &&value)
Definition Event.h:117
AWS_PERSONALIZEEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue)
Event & WithEventType(EventTypeT &&value)
Definition Event.h:71
bool RecommendationIdHasBeenSet() const
Definition Event.h:149
Event & WithImpression(ImpressionT &&value)
Definition Event.h:170
const Aws::String & GetEventType() const
Definition Event.h:66
void SetSentAt(SentAtT &&value)
Definition Event.h:129
Event & WithItemId(ItemIdT &&value)
Definition Event.h:95
const Aws::String & GetProperties() const
Definition Event.h:114
void SetEventType(EventTypeT &&value)
Definition Event.h:69
const Aws::String & GetItemId() const
Definition Event.h:90
Event & WithEventId(EventIdT &&value)
Definition Event.h:57
const Aws::Utils::DateTime & GetSentAt() const
Definition Event.h:126
Event & WithMetricAttribution(MetricAttributionT &&value)
Definition Event.h:187
Event & WithProperties(PropertiesT &&value)
Definition Event.h:119
const Aws::String & GetRecommendationId() const
Definition Event.h:148
const Aws::Vector< Aws::String > & GetImpression() const
Definition Event.h:165
Event & WithSentAt(SentAtT &&value)
Definition Event.h:131
const Aws::String & GetEventId() const
Definition Event.h:52
AWS_PERSONALIZEEVENTS_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
Event & WithEventValue(double value)
Definition Event.h:82
Event & WithRecommendationId(RecommendationIdT &&value)
Definition Event.h:153
AWS_PERSONALIZEEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetMetricAttribution(MetricAttributionT &&value)
Definition Event.h:185
void SetRecommendationId(RecommendationIdT &&value)
Definition Event.h:151
AWS_PERSONALIZEEVENTS_API Event()=default
void SetEventId(EventIdT &&value)
Definition Event.h:55
void SetImpression(ImpressionT &&value)
Definition Event.h:168
void SetEventValue(double value)
Definition Event.h:81
Event & AddImpression(ImpressionT &&value)
Definition Event.h:172
const MetricAttribution & GetMetricAttribution() const
Definition Event.h:182
void SetItemId(ItemIdT &&value)
Definition Event.h:93
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue