/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace MobileAnalytics { namespace Model { /** *

A JSON object representing a batch of unique event occurrences in your * app.

*/ class AWS_MOBILEANALYTICS_API Event { public: Event(); Event(Aws::Utils::Json::JsonView jsonValue); Event& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline const Aws::String& GetEventType() const{ return m_eventType; } /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; } /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline void SetEventType(const Aws::String& value) { m_eventTypeHasBeenSet = true; m_eventType = value; } /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline void SetEventType(Aws::String&& value) { m_eventTypeHasBeenSet = true; m_eventType = std::move(value); } /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline void SetEventType(const char* value) { m_eventTypeHasBeenSet = true; m_eventType.assign(value); } /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline Event& WithEventType(const Aws::String& value) { SetEventType(value); return *this;} /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline Event& WithEventType(Aws::String&& value) { SetEventType(std::move(value)); return *this;} /** *

A name signifying an event that occurred in your app. This is used for * grouping and aggregating like events together for reporting purposes.

*/ inline Event& WithEventType(const char* value) { SetEventType(value); return *this;} /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline const Aws::String& GetTimestamp() const{ return m_timestamp; } /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline void SetTimestamp(const Aws::String& value) { m_timestampHasBeenSet = true; m_timestamp = value; } /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline void SetTimestamp(Aws::String&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline void SetTimestamp(const char* value) { m_timestampHasBeenSet = true; m_timestamp.assign(value); } /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline Event& WithTimestamp(const Aws::String& value) { SetTimestamp(value); return *this;} /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline Event& WithTimestamp(Aws::String&& value) { SetTimestamp(std::move(value)); return *this;} /** *

The time the event occurred in ISO 8601 standard date time format. For * example, 2014-06-30T19:07:47.885Z

*/ inline Event& WithTimestamp(const char* value) { SetTimestamp(value); return *this;} /** *

The session the event occured within.

*/ inline const Session& GetSession() const{ return m_session; } /** *

The session the event occured within.

*/ inline bool SessionHasBeenSet() const { return m_sessionHasBeenSet; } /** *

The session the event occured within.

*/ inline void SetSession(const Session& value) { m_sessionHasBeenSet = true; m_session = value; } /** *

The session the event occured within.

*/ inline void SetSession(Session&& value) { m_sessionHasBeenSet = true; m_session = std::move(value); } /** *

The session the event occured within.

*/ inline Event& WithSession(const Session& value) { SetSession(value); return *this;} /** *

The session the event occured within.

*/ inline Event& WithSession(Session&& value) { SetSession(std::move(value)); return *this;} /** *

The version of the event.

*/ inline const Aws::String& GetVersion() const{ return m_version; } /** *

The version of the event.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

The version of the event.

*/ inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } /** *

The version of the event.

*/ inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } /** *

The version of the event.

*/ inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } /** *

The version of the event.

*/ inline Event& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} /** *

The version of the event.

*/ inline Event& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} /** *

The version of the event.

*/ inline Event& WithVersion(const char* value) { SetVersion(value); return *this;} /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A collection of key-value pairs that give additional context to the event. * The key-value pairs are specified by the developer.

This collection can * be empty or the attribute object can be omitted.

*/ inline Event& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline const Aws::Map& GetMetrics() const{ return m_metrics; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline void SetMetrics(const Aws::Map& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline void SetMetrics(Aws::Map&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline Event& WithMetrics(const Aws::Map& value) { SetMetrics(value); return *this;} /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline Event& WithMetrics(Aws::Map&& value) { SetMetrics(std::move(value)); return *this;} /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline Event& AddMetrics(const Aws::String& key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline Event& AddMetrics(Aws::String&& key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), value); return *this; } /** *

A collection of key-value pairs that gives additional, measurable context to * the event. The key-value pairs are specified by the developer.

This * collection can be empty or the attribute object can be omitted.

*/ inline Event& AddMetrics(const char* key, double value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } private: Aws::String m_eventType; bool m_eventTypeHasBeenSet; Aws::String m_timestamp; bool m_timestampHasBeenSet; Session m_session; bool m_sessionHasBeenSet; Aws::String m_version; bool m_versionHasBeenSet; Aws::Map m_attributes; bool m_attributesHasBeenSet; Aws::Map m_metrics; bool m_metricsHasBeenSet; }; } // namespace Model } // namespace MobileAnalytics } // namespace Aws