AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/pinpoint/Pinpoint_EXPORTS.h>
10#include <aws/pinpoint/model/Session.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Pinpoint {
22namespace Model {
23
30class Event {
31 public:
32 AWS_PINPOINT_API Event() = default;
33 AWS_PINPOINT_API Event(Aws::Utils::Json::JsonView jsonValue);
34 AWS_PINPOINT_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetAppPackageName() const { return m_appPackageName; }
42 inline bool AppPackageNameHasBeenSet() const { return m_appPackageNameHasBeenSet; }
43 template <typename AppPackageNameT = Aws::String>
44 void SetAppPackageName(AppPackageNameT&& value) {
45 m_appPackageNameHasBeenSet = true;
46 m_appPackageName = std::forward<AppPackageNameT>(value);
47 }
48 template <typename AppPackageNameT = Aws::String>
49 Event& WithAppPackageName(AppPackageNameT&& value) {
50 SetAppPackageName(std::forward<AppPackageNameT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetAppTitle() const { return m_appTitle; }
60 inline bool AppTitleHasBeenSet() const { return m_appTitleHasBeenSet; }
61 template <typename AppTitleT = Aws::String>
62 void SetAppTitle(AppTitleT&& value) {
63 m_appTitleHasBeenSet = true;
64 m_appTitle = std::forward<AppTitleT>(value);
65 }
66 template <typename AppTitleT = Aws::String>
67 Event& WithAppTitle(AppTitleT&& value) {
68 SetAppTitle(std::forward<AppTitleT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetAppVersionCode() const { return m_appVersionCode; }
78 inline bool AppVersionCodeHasBeenSet() const { return m_appVersionCodeHasBeenSet; }
79 template <typename AppVersionCodeT = Aws::String>
80 void SetAppVersionCode(AppVersionCodeT&& value) {
81 m_appVersionCodeHasBeenSet = true;
82 m_appVersionCode = std::forward<AppVersionCodeT>(value);
83 }
84 template <typename AppVersionCodeT = Aws::String>
85 Event& WithAppVersionCode(AppVersionCodeT&& value) {
86 SetAppVersionCode(std::forward<AppVersionCodeT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
96 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
97 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
98 void SetAttributes(AttributesT&& value) {
99 m_attributesHasBeenSet = true;
100 m_attributes = std::forward<AttributesT>(value);
101 }
102 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
103 Event& WithAttributes(AttributesT&& value) {
104 SetAttributes(std::forward<AttributesT>(value));
105 return *this;
106 }
107 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
108 Event& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
109 m_attributesHasBeenSet = true;
110 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::String& GetClientSdkVersion() const { return m_clientSdkVersion; }
120 inline bool ClientSdkVersionHasBeenSet() const { return m_clientSdkVersionHasBeenSet; }
121 template <typename ClientSdkVersionT = Aws::String>
122 void SetClientSdkVersion(ClientSdkVersionT&& value) {
123 m_clientSdkVersionHasBeenSet = true;
124 m_clientSdkVersion = std::forward<ClientSdkVersionT>(value);
125 }
126 template <typename ClientSdkVersionT = Aws::String>
127 Event& WithClientSdkVersion(ClientSdkVersionT&& value) {
128 SetClientSdkVersion(std::forward<ClientSdkVersionT>(value));
129 return *this;
130 }
132
134
137 inline const Aws::String& GetEventType() const { return m_eventType; }
138 inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; }
139 template <typename EventTypeT = Aws::String>
140 void SetEventType(EventTypeT&& value) {
141 m_eventTypeHasBeenSet = true;
142 m_eventType = std::forward<EventTypeT>(value);
143 }
144 template <typename EventTypeT = Aws::String>
145 Event& WithEventType(EventTypeT&& value) {
146 SetEventType(std::forward<EventTypeT>(value));
147 return *this;
148 }
150
152
155 inline const Aws::Map<Aws::String, double>& GetMetrics() const { return m_metrics; }
156 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
157 template <typename MetricsT = Aws::Map<Aws::String, double>>
158 void SetMetrics(MetricsT&& value) {
159 m_metricsHasBeenSet = true;
160 m_metrics = std::forward<MetricsT>(value);
161 }
162 template <typename MetricsT = Aws::Map<Aws::String, double>>
163 Event& WithMetrics(MetricsT&& value) {
164 SetMetrics(std::forward<MetricsT>(value));
165 return *this;
166 }
167 inline Event& AddMetrics(Aws::String key, double value) {
168 m_metricsHasBeenSet = true;
169 m_metrics.emplace(key, value);
170 return *this;
171 }
173
175
178 inline const Aws::String& GetSdkName() const { return m_sdkName; }
179 inline bool SdkNameHasBeenSet() const { return m_sdkNameHasBeenSet; }
180 template <typename SdkNameT = Aws::String>
181 void SetSdkName(SdkNameT&& value) {
182 m_sdkNameHasBeenSet = true;
183 m_sdkName = std::forward<SdkNameT>(value);
184 }
185 template <typename SdkNameT = Aws::String>
186 Event& WithSdkName(SdkNameT&& value) {
187 SetSdkName(std::forward<SdkNameT>(value));
188 return *this;
189 }
191
193
196 inline const Session& GetSession() const { return m_session; }
197 inline bool SessionHasBeenSet() const { return m_sessionHasBeenSet; }
198 template <typename SessionT = Session>
199 void SetSession(SessionT&& value) {
200 m_sessionHasBeenSet = true;
201 m_session = std::forward<SessionT>(value);
202 }
203 template <typename SessionT = Session>
204 Event& WithSession(SessionT&& value) {
205 SetSession(std::forward<SessionT>(value));
206 return *this;
207 }
209
211
214 inline const Aws::String& GetTimestamp() const { return m_timestamp; }
215 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
216 template <typename TimestampT = Aws::String>
217 void SetTimestamp(TimestampT&& value) {
218 m_timestampHasBeenSet = true;
219 m_timestamp = std::forward<TimestampT>(value);
220 }
221 template <typename TimestampT = Aws::String>
222 Event& WithTimestamp(TimestampT&& value) {
223 SetTimestamp(std::forward<TimestampT>(value));
224 return *this;
225 }
227 private:
228 Aws::String m_appPackageName;
229
230 Aws::String m_appTitle;
231
232 Aws::String m_appVersionCode;
233
235
236 Aws::String m_clientSdkVersion;
237
238 Aws::String m_eventType;
239
241
242 Aws::String m_sdkName;
243
244 Session m_session;
245
246 Aws::String m_timestamp;
247 bool m_appPackageNameHasBeenSet = false;
248 bool m_appTitleHasBeenSet = false;
249 bool m_appVersionCodeHasBeenSet = false;
250 bool m_attributesHasBeenSet = false;
251 bool m_clientSdkVersionHasBeenSet = false;
252 bool m_eventTypeHasBeenSet = false;
253 bool m_metricsHasBeenSet = false;
254 bool m_sdkNameHasBeenSet = false;
255 bool m_sessionHasBeenSet = false;
256 bool m_timestampHasBeenSet = false;
257};
258
259} // namespace Model
260} // namespace Pinpoint
261} // namespace Aws
AWS_PINPOINT_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
bool ClientSdkVersionHasBeenSet() const
Definition Event.h:120
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
Definition Event.h:95
Event & WithAppVersionCode(AppVersionCodeT &&value)
Definition Event.h:85
const Aws::String & GetAppVersionCode() const
Definition Event.h:77
Event & WithMetrics(MetricsT &&value)
Definition Event.h:163
Event & WithAppTitle(AppTitleT &&value)
Definition Event.h:67
void SetSession(SessionT &&value)
Definition Event.h:199
Event & WithTimestamp(TimestampT &&value)
Definition Event.h:222
bool AppTitleHasBeenSet() const
Definition Event.h:60
void SetEventType(EventTypeT &&value)
Definition Event.h:140
AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetAppTitle() const
Definition Event.h:59
bool SessionHasBeenSet() const
Definition Event.h:197
void SetAppVersionCode(AppVersionCodeT &&value)
Definition Event.h:80
Event & WithSession(SessionT &&value)
Definition Event.h:204
Event & WithSdkName(SdkNameT &&value)
Definition Event.h:186
void SetSdkName(SdkNameT &&value)
Definition Event.h:181
const Aws::String & GetTimestamp() const
Definition Event.h:214
const Aws::String & GetClientSdkVersion() const
Definition Event.h:119
void SetMetrics(MetricsT &&value)
Definition Event.h:158
void SetAttributes(AttributesT &&value)
Definition Event.h:98
bool MetricsHasBeenSet() const
Definition Event.h:156
Event & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
Definition Event.h:108
void SetClientSdkVersion(ClientSdkVersionT &&value)
Definition Event.h:122
const Aws::String & GetSdkName() const
Definition Event.h:178
void SetTimestamp(TimestampT &&value)
Definition Event.h:217
bool AppPackageNameHasBeenSet() const
Definition Event.h:42
AWS_PINPOINT_API Event(Aws::Utils::Json::JsonView jsonValue)
Event & WithAttributes(AttributesT &&value)
Definition Event.h:103
const Aws::String & GetAppPackageName() const
Definition Event.h:41
bool SdkNameHasBeenSet() const
Definition Event.h:179
bool TimestampHasBeenSet() const
Definition Event.h:215
bool AttributesHasBeenSet() const
Definition Event.h:96
bool EventTypeHasBeenSet() const
Definition Event.h:138
const Aws::Map< Aws::String, double > & GetMetrics() const
Definition Event.h:155
AWS_PINPOINT_API Event()=default
const Aws::String & GetEventType() const
Definition Event.h:137
void SetAppTitle(AppTitleT &&value)
Definition Event.h:62
bool AppVersionCodeHasBeenSet() const
Definition Event.h:78
Event & WithAppPackageName(AppPackageNameT &&value)
Definition Event.h:49
Event & WithClientSdkVersion(ClientSdkVersionT &&value)
Definition Event.h:127
Event & WithEventType(EventTypeT &&value)
Definition Event.h:145
const Session & GetSession() const
Definition Event.h:196
void SetAppPackageName(AppPackageNameT &&value)
Definition Event.h:44
Event & AddMetrics(Aws::String key, double value)
Definition Event.h:167
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