1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/pinpoint/Pinpoint_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <aws/pinpoint/model/Session.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace Pinpoint 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Specifies information about an event that reports data to Amazon 30 * Pinpoint.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/Event">AWS API 32 * Reference</a></p> 33 */ 34 class AWS_PINPOINT_API Event 35 { 36 public: 37 Event(); 38 Event(Aws::Utils::Json::JsonView jsonValue); 39 Event& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The package name of the app that's recording the event.</p> 45 */ GetAppPackageName()46 inline const Aws::String& GetAppPackageName() const{ return m_appPackageName; } 47 48 /** 49 * <p>The package name of the app that's recording the event.</p> 50 */ AppPackageNameHasBeenSet()51 inline bool AppPackageNameHasBeenSet() const { return m_appPackageNameHasBeenSet; } 52 53 /** 54 * <p>The package name of the app that's recording the event.</p> 55 */ SetAppPackageName(const Aws::String & value)56 inline void SetAppPackageName(const Aws::String& value) { m_appPackageNameHasBeenSet = true; m_appPackageName = value; } 57 58 /** 59 * <p>The package name of the app that's recording the event.</p> 60 */ SetAppPackageName(Aws::String && value)61 inline void SetAppPackageName(Aws::String&& value) { m_appPackageNameHasBeenSet = true; m_appPackageName = std::move(value); } 62 63 /** 64 * <p>The package name of the app that's recording the event.</p> 65 */ SetAppPackageName(const char * value)66 inline void SetAppPackageName(const char* value) { m_appPackageNameHasBeenSet = true; m_appPackageName.assign(value); } 67 68 /** 69 * <p>The package name of the app that's recording the event.</p> 70 */ WithAppPackageName(const Aws::String & value)71 inline Event& WithAppPackageName(const Aws::String& value) { SetAppPackageName(value); return *this;} 72 73 /** 74 * <p>The package name of the app that's recording the event.</p> 75 */ WithAppPackageName(Aws::String && value)76 inline Event& WithAppPackageName(Aws::String&& value) { SetAppPackageName(std::move(value)); return *this;} 77 78 /** 79 * <p>The package name of the app that's recording the event.</p> 80 */ WithAppPackageName(const char * value)81 inline Event& WithAppPackageName(const char* value) { SetAppPackageName(value); return *this;} 82 83 84 /** 85 * <p>The title of the app that's recording the event.</p> 86 */ GetAppTitle()87 inline const Aws::String& GetAppTitle() const{ return m_appTitle; } 88 89 /** 90 * <p>The title of the app that's recording the event.</p> 91 */ AppTitleHasBeenSet()92 inline bool AppTitleHasBeenSet() const { return m_appTitleHasBeenSet; } 93 94 /** 95 * <p>The title of the app that's recording the event.</p> 96 */ SetAppTitle(const Aws::String & value)97 inline void SetAppTitle(const Aws::String& value) { m_appTitleHasBeenSet = true; m_appTitle = value; } 98 99 /** 100 * <p>The title of the app that's recording the event.</p> 101 */ SetAppTitle(Aws::String && value)102 inline void SetAppTitle(Aws::String&& value) { m_appTitleHasBeenSet = true; m_appTitle = std::move(value); } 103 104 /** 105 * <p>The title of the app that's recording the event.</p> 106 */ SetAppTitle(const char * value)107 inline void SetAppTitle(const char* value) { m_appTitleHasBeenSet = true; m_appTitle.assign(value); } 108 109 /** 110 * <p>The title of the app that's recording the event.</p> 111 */ WithAppTitle(const Aws::String & value)112 inline Event& WithAppTitle(const Aws::String& value) { SetAppTitle(value); return *this;} 113 114 /** 115 * <p>The title of the app that's recording the event.</p> 116 */ WithAppTitle(Aws::String && value)117 inline Event& WithAppTitle(Aws::String&& value) { SetAppTitle(std::move(value)); return *this;} 118 119 /** 120 * <p>The title of the app that's recording the event.</p> 121 */ WithAppTitle(const char * value)122 inline Event& WithAppTitle(const char* value) { SetAppTitle(value); return *this;} 123 124 125 /** 126 * <p>The version number of the app that's recording the event.</p> 127 */ GetAppVersionCode()128 inline const Aws::String& GetAppVersionCode() const{ return m_appVersionCode; } 129 130 /** 131 * <p>The version number of the app that's recording the event.</p> 132 */ AppVersionCodeHasBeenSet()133 inline bool AppVersionCodeHasBeenSet() const { return m_appVersionCodeHasBeenSet; } 134 135 /** 136 * <p>The version number of the app that's recording the event.</p> 137 */ SetAppVersionCode(const Aws::String & value)138 inline void SetAppVersionCode(const Aws::String& value) { m_appVersionCodeHasBeenSet = true; m_appVersionCode = value; } 139 140 /** 141 * <p>The version number of the app that's recording the event.</p> 142 */ SetAppVersionCode(Aws::String && value)143 inline void SetAppVersionCode(Aws::String&& value) { m_appVersionCodeHasBeenSet = true; m_appVersionCode = std::move(value); } 144 145 /** 146 * <p>The version number of the app that's recording the event.</p> 147 */ SetAppVersionCode(const char * value)148 inline void SetAppVersionCode(const char* value) { m_appVersionCodeHasBeenSet = true; m_appVersionCode.assign(value); } 149 150 /** 151 * <p>The version number of the app that's recording the event.</p> 152 */ WithAppVersionCode(const Aws::String & value)153 inline Event& WithAppVersionCode(const Aws::String& value) { SetAppVersionCode(value); return *this;} 154 155 /** 156 * <p>The version number of the app that's recording the event.</p> 157 */ WithAppVersionCode(Aws::String && value)158 inline Event& WithAppVersionCode(Aws::String&& value) { SetAppVersionCode(std::move(value)); return *this;} 159 160 /** 161 * <p>The version number of the app that's recording the event.</p> 162 */ WithAppVersionCode(const char * value)163 inline Event& WithAppVersionCode(const char* value) { SetAppVersionCode(value); return *this;} 164 165 166 /** 167 * <p>One or more custom attributes that are associated with the event.</p> 168 */ GetAttributes()169 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; } 170 171 /** 172 * <p>One or more custom attributes that are associated with the event.</p> 173 */ AttributesHasBeenSet()174 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } 175 176 /** 177 * <p>One or more custom attributes that are associated with the event.</p> 178 */ SetAttributes(const Aws::Map<Aws::String,Aws::String> & value)179 inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; } 180 181 /** 182 * <p>One or more custom attributes that are associated with the event.</p> 183 */ SetAttributes(Aws::Map<Aws::String,Aws::String> && value)184 inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } 185 186 /** 187 * <p>One or more custom attributes that are associated with the event.</p> 188 */ WithAttributes(const Aws::Map<Aws::String,Aws::String> & value)189 inline Event& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;} 190 191 /** 192 * <p>One or more custom attributes that are associated with the event.</p> 193 */ WithAttributes(Aws::Map<Aws::String,Aws::String> && value)194 inline Event& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(std::move(value)); return *this;} 195 196 /** 197 * <p>One or more custom attributes that are associated with the event.</p> 198 */ AddAttributes(const Aws::String & key,const Aws::String & value)199 inline Event& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } 200 201 /** 202 * <p>One or more custom attributes that are associated with the event.</p> 203 */ AddAttributes(Aws::String && key,const Aws::String & value)204 inline Event& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } 205 206 /** 207 * <p>One or more custom attributes that are associated with the event.</p> 208 */ AddAttributes(const Aws::String & key,Aws::String && value)209 inline Event& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } 210 211 /** 212 * <p>One or more custom attributes that are associated with the event.</p> 213 */ AddAttributes(Aws::String && key,Aws::String && value)214 inline Event& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } 215 216 /** 217 * <p>One or more custom attributes that are associated with the event.</p> 218 */ AddAttributes(const char * key,Aws::String && value)219 inline Event& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } 220 221 /** 222 * <p>One or more custom attributes that are associated with the event.</p> 223 */ AddAttributes(Aws::String && key,const char * value)224 inline Event& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } 225 226 /** 227 * <p>One or more custom attributes that are associated with the event.</p> 228 */ AddAttributes(const char * key,const char * value)229 inline Event& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } 230 231 232 /** 233 * <p>The version of the SDK that's running on the client device.</p> 234 */ GetClientSdkVersion()235 inline const Aws::String& GetClientSdkVersion() const{ return m_clientSdkVersion; } 236 237 /** 238 * <p>The version of the SDK that's running on the client device.</p> 239 */ ClientSdkVersionHasBeenSet()240 inline bool ClientSdkVersionHasBeenSet() const { return m_clientSdkVersionHasBeenSet; } 241 242 /** 243 * <p>The version of the SDK that's running on the client device.</p> 244 */ SetClientSdkVersion(const Aws::String & value)245 inline void SetClientSdkVersion(const Aws::String& value) { m_clientSdkVersionHasBeenSet = true; m_clientSdkVersion = value; } 246 247 /** 248 * <p>The version of the SDK that's running on the client device.</p> 249 */ SetClientSdkVersion(Aws::String && value)250 inline void SetClientSdkVersion(Aws::String&& value) { m_clientSdkVersionHasBeenSet = true; m_clientSdkVersion = std::move(value); } 251 252 /** 253 * <p>The version of the SDK that's running on the client device.</p> 254 */ SetClientSdkVersion(const char * value)255 inline void SetClientSdkVersion(const char* value) { m_clientSdkVersionHasBeenSet = true; m_clientSdkVersion.assign(value); } 256 257 /** 258 * <p>The version of the SDK that's running on the client device.</p> 259 */ WithClientSdkVersion(const Aws::String & value)260 inline Event& WithClientSdkVersion(const Aws::String& value) { SetClientSdkVersion(value); return *this;} 261 262 /** 263 * <p>The version of the SDK that's running on the client device.</p> 264 */ WithClientSdkVersion(Aws::String && value)265 inline Event& WithClientSdkVersion(Aws::String&& value) { SetClientSdkVersion(std::move(value)); return *this;} 266 267 /** 268 * <p>The version of the SDK that's running on the client device.</p> 269 */ WithClientSdkVersion(const char * value)270 inline Event& WithClientSdkVersion(const char* value) { SetClientSdkVersion(value); return *this;} 271 272 273 /** 274 * <p>The name of the event.</p> 275 */ GetEventType()276 inline const Aws::String& GetEventType() const{ return m_eventType; } 277 278 /** 279 * <p>The name of the event.</p> 280 */ EventTypeHasBeenSet()281 inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; } 282 283 /** 284 * <p>The name of the event.</p> 285 */ SetEventType(const Aws::String & value)286 inline void SetEventType(const Aws::String& value) { m_eventTypeHasBeenSet = true; m_eventType = value; } 287 288 /** 289 * <p>The name of the event.</p> 290 */ SetEventType(Aws::String && value)291 inline void SetEventType(Aws::String&& value) { m_eventTypeHasBeenSet = true; m_eventType = std::move(value); } 292 293 /** 294 * <p>The name of the event.</p> 295 */ SetEventType(const char * value)296 inline void SetEventType(const char* value) { m_eventTypeHasBeenSet = true; m_eventType.assign(value); } 297 298 /** 299 * <p>The name of the event.</p> 300 */ WithEventType(const Aws::String & value)301 inline Event& WithEventType(const Aws::String& value) { SetEventType(value); return *this;} 302 303 /** 304 * <p>The name of the event.</p> 305 */ WithEventType(Aws::String && value)306 inline Event& WithEventType(Aws::String&& value) { SetEventType(std::move(value)); return *this;} 307 308 /** 309 * <p>The name of the event.</p> 310 */ WithEventType(const char * value)311 inline Event& WithEventType(const char* value) { SetEventType(value); return *this;} 312 313 314 /** 315 * <p>One or more custom metrics that are associated with the event.</p> 316 */ GetMetrics()317 inline const Aws::Map<Aws::String, double>& GetMetrics() const{ return m_metrics; } 318 319 /** 320 * <p>One or more custom metrics that are associated with the event.</p> 321 */ MetricsHasBeenSet()322 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } 323 324 /** 325 * <p>One or more custom metrics that are associated with the event.</p> 326 */ SetMetrics(const Aws::Map<Aws::String,double> & value)327 inline void SetMetrics(const Aws::Map<Aws::String, double>& value) { m_metricsHasBeenSet = true; m_metrics = value; } 328 329 /** 330 * <p>One or more custom metrics that are associated with the event.</p> 331 */ SetMetrics(Aws::Map<Aws::String,double> && value)332 inline void SetMetrics(Aws::Map<Aws::String, double>&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } 333 334 /** 335 * <p>One or more custom metrics that are associated with the event.</p> 336 */ WithMetrics(const Aws::Map<Aws::String,double> & value)337 inline Event& WithMetrics(const Aws::Map<Aws::String, double>& value) { SetMetrics(value); return *this;} 338 339 /** 340 * <p>One or more custom metrics that are associated with the event.</p> 341 */ WithMetrics(Aws::Map<Aws::String,double> && value)342 inline Event& WithMetrics(Aws::Map<Aws::String, double>&& value) { SetMetrics(std::move(value)); return *this;} 343 344 /** 345 * <p>One or more custom metrics that are associated with the event.</p> 346 */ AddMetrics(const Aws::String & key,double value)347 inline Event& AddMetrics(const Aws::String& key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } 348 349 /** 350 * <p>One or more custom metrics that are associated with the event.</p> 351 */ AddMetrics(Aws::String && key,double value)352 inline Event& AddMetrics(Aws::String&& key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), value); return *this; } 353 354 /** 355 * <p>One or more custom metrics that are associated with the event.</p> 356 */ AddMetrics(const char * key,double value)357 inline Event& AddMetrics(const char* key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } 358 359 360 /** 361 * <p>The name of the SDK that's being used to record the event.</p> 362 */ GetSdkName()363 inline const Aws::String& GetSdkName() const{ return m_sdkName; } 364 365 /** 366 * <p>The name of the SDK that's being used to record the event.</p> 367 */ SdkNameHasBeenSet()368 inline bool SdkNameHasBeenSet() const { return m_sdkNameHasBeenSet; } 369 370 /** 371 * <p>The name of the SDK that's being used to record the event.</p> 372 */ SetSdkName(const Aws::String & value)373 inline void SetSdkName(const Aws::String& value) { m_sdkNameHasBeenSet = true; m_sdkName = value; } 374 375 /** 376 * <p>The name of the SDK that's being used to record the event.</p> 377 */ SetSdkName(Aws::String && value)378 inline void SetSdkName(Aws::String&& value) { m_sdkNameHasBeenSet = true; m_sdkName = std::move(value); } 379 380 /** 381 * <p>The name of the SDK that's being used to record the event.</p> 382 */ SetSdkName(const char * value)383 inline void SetSdkName(const char* value) { m_sdkNameHasBeenSet = true; m_sdkName.assign(value); } 384 385 /** 386 * <p>The name of the SDK that's being used to record the event.</p> 387 */ WithSdkName(const Aws::String & value)388 inline Event& WithSdkName(const Aws::String& value) { SetSdkName(value); return *this;} 389 390 /** 391 * <p>The name of the SDK that's being used to record the event.</p> 392 */ WithSdkName(Aws::String && value)393 inline Event& WithSdkName(Aws::String&& value) { SetSdkName(std::move(value)); return *this;} 394 395 /** 396 * <p>The name of the SDK that's being used to record the event.</p> 397 */ WithSdkName(const char * value)398 inline Event& WithSdkName(const char* value) { SetSdkName(value); return *this;} 399 400 401 /** 402 * <p>Information about the session in which the event occurred.</p> 403 */ GetSession()404 inline const Session& GetSession() const{ return m_session; } 405 406 /** 407 * <p>Information about the session in which the event occurred.</p> 408 */ SessionHasBeenSet()409 inline bool SessionHasBeenSet() const { return m_sessionHasBeenSet; } 410 411 /** 412 * <p>Information about the session in which the event occurred.</p> 413 */ SetSession(const Session & value)414 inline void SetSession(const Session& value) { m_sessionHasBeenSet = true; m_session = value; } 415 416 /** 417 * <p>Information about the session in which the event occurred.</p> 418 */ SetSession(Session && value)419 inline void SetSession(Session&& value) { m_sessionHasBeenSet = true; m_session = std::move(value); } 420 421 /** 422 * <p>Information about the session in which the event occurred.</p> 423 */ WithSession(const Session & value)424 inline Event& WithSession(const Session& value) { SetSession(value); return *this;} 425 426 /** 427 * <p>Information about the session in which the event occurred.</p> 428 */ WithSession(Session && value)429 inline Event& WithSession(Session&& value) { SetSession(std::move(value)); return *this;} 430 431 432 /** 433 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 434 */ GetTimestamp()435 inline const Aws::String& GetTimestamp() const{ return m_timestamp; } 436 437 /** 438 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 439 */ TimestampHasBeenSet()440 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } 441 442 /** 443 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 444 */ SetTimestamp(const Aws::String & value)445 inline void SetTimestamp(const Aws::String& value) { m_timestampHasBeenSet = true; m_timestamp = value; } 446 447 /** 448 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 449 */ SetTimestamp(Aws::String && value)450 inline void SetTimestamp(Aws::String&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } 451 452 /** 453 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 454 */ SetTimestamp(const char * value)455 inline void SetTimestamp(const char* value) { m_timestampHasBeenSet = true; m_timestamp.assign(value); } 456 457 /** 458 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 459 */ WithTimestamp(const Aws::String & value)460 inline Event& WithTimestamp(const Aws::String& value) { SetTimestamp(value); return *this;} 461 462 /** 463 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 464 */ WithTimestamp(Aws::String && value)465 inline Event& WithTimestamp(Aws::String&& value) { SetTimestamp(std::move(value)); return *this;} 466 467 /** 468 * <p>The date and time, in ISO 8601 format, when the event occurred.</p> 469 */ WithTimestamp(const char * value)470 inline Event& WithTimestamp(const char* value) { SetTimestamp(value); return *this;} 471 472 private: 473 474 Aws::String m_appPackageName; 475 bool m_appPackageNameHasBeenSet; 476 477 Aws::String m_appTitle; 478 bool m_appTitleHasBeenSet; 479 480 Aws::String m_appVersionCode; 481 bool m_appVersionCodeHasBeenSet; 482 483 Aws::Map<Aws::String, Aws::String> m_attributes; 484 bool m_attributesHasBeenSet; 485 486 Aws::String m_clientSdkVersion; 487 bool m_clientSdkVersionHasBeenSet; 488 489 Aws::String m_eventType; 490 bool m_eventTypeHasBeenSet; 491 492 Aws::Map<Aws::String, double> m_metrics; 493 bool m_metricsHasBeenSet; 494 495 Aws::String m_sdkName; 496 bool m_sdkNameHasBeenSet; 497 498 Session m_session; 499 bool m_sessionHasBeenSet; 500 501 Aws::String m_timestamp; 502 bool m_timestampHasBeenSet; 503 }; 504 505 } // namespace Model 506 } // namespace Pinpoint 507 } // namespace Aws 508