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

Represents user interaction event information sent using the * PutEvents API.

See Also:

AWS * API Reference

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

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline const Aws::String& GetEventId() const{ return m_eventId; } /** *

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; } /** *

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline void SetEventId(const Aws::String& value) { m_eventIdHasBeenSet = true; m_eventId = value; } /** *

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline void SetEventId(Aws::String&& value) { m_eventIdHasBeenSet = true; m_eventId = std::move(value); } /** *

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline void SetEventId(const char* value) { m_eventIdHasBeenSet = true; m_eventId.assign(value); } /** *

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

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

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

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

An ID associated with the event. If an event ID is not provided, Amazon * Personalize generates a unique ID for the event. An event ID is not used as an * input to the model. Amazon Personalize uses the event ID to distinquish unique * events. Any subsequent events after the first with the same event ID are not * used in model training.

*/ inline Event& WithEventId(const char* value) { SetEventId(value); return *this;} /** *

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The type of event, such as click or download. This property corresponds to * the EVENT_TYPE field of your Interactions schema and depends on the * types of events you are tracking.

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

The event value that corresponds to the EVENT_VALUE field of the * Interactions schema.

*/ inline double GetEventValue() const{ return m_eventValue; } /** *

The event value that corresponds to the EVENT_VALUE field of the * Interactions schema.

*/ inline bool EventValueHasBeenSet() const { return m_eventValueHasBeenSet; } /** *

The event value that corresponds to the EVENT_VALUE field of the * Interactions schema.

*/ inline void SetEventValue(double value) { m_eventValueHasBeenSet = true; m_eventValue = value; } /** *

The event value that corresponds to the EVENT_VALUE field of the * Interactions schema.

*/ inline Event& WithEventValue(double value) { SetEventValue(value); return *this;} /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline const Aws::String& GetItemId() const{ return m_itemId; } /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; } /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline void SetItemId(const Aws::String& value) { m_itemIdHasBeenSet = true; m_itemId = value; } /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline void SetItemId(Aws::String&& value) { m_itemIdHasBeenSet = true; m_itemId = std::move(value); } /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline void SetItemId(const char* value) { m_itemIdHasBeenSet = true; m_itemId.assign(value); } /** *

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

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

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

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

The item ID key that corresponds to the ITEM_ID field of the * Interactions schema.

*/ inline Event& WithItemId(const char* value) { SetItemId(value); return *this;} /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline const Aws::String& GetProperties() const{ return m_properties; } /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; } /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline void SetProperties(const Aws::String& value) { m_propertiesHasBeenSet = true; m_properties = value; } /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline void SetProperties(Aws::String&& value) { m_propertiesHasBeenSet = true; m_properties = std::move(value); } /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline void SetProperties(const char* value) { m_propertiesHasBeenSet = true; m_properties.assign(value); } /** *

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

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

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

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

A string map of event-specific data that you might choose to record. For * example, if a user rates a movie on your site, other than movie ID * (itemId) and rating (eventValue) , you might also send * the number of movie ratings made by the user.

Each item in the map * consists of a key-value pair. For example,

{"numberOfRatings": * "12"}

The keys use camel case names that match the fields in the * Interactions schema. In the above example, the numberOfRatings * would match the 'NUMBER_OF_RATINGS' field defined in the Interactions * schema.

*/ inline Event& WithProperties(const char* value) { SetProperties(value); return *this;} /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline const Aws::Utils::DateTime& GetSentAt() const{ return m_sentAt; } /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline bool SentAtHasBeenSet() const { return m_sentAtHasBeenSet; } /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline void SetSentAt(const Aws::Utils::DateTime& value) { m_sentAtHasBeenSet = true; m_sentAt = value; } /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline void SetSentAt(Aws::Utils::DateTime&& value) { m_sentAtHasBeenSet = true; m_sentAt = std::move(value); } /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline Event& WithSentAt(const Aws::Utils::DateTime& value) { SetSentAt(value); return *this;} /** *

The timestamp (in Unix time) on the client side when the event occurred.

*/ inline Event& WithSentAt(Aws::Utils::DateTime&& value) { SetSentAt(std::move(value)); return *this;} /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline const Aws::String& GetRecommendationId() const{ return m_recommendationId; } /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline bool RecommendationIdHasBeenSet() const { return m_recommendationIdHasBeenSet; } /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline void SetRecommendationId(const Aws::String& value) { m_recommendationIdHasBeenSet = true; m_recommendationId = value; } /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline void SetRecommendationId(Aws::String&& value) { m_recommendationIdHasBeenSet = true; m_recommendationId = std::move(value); } /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline void SetRecommendationId(const char* value) { m_recommendationIdHasBeenSet = true; m_recommendationId.assign(value); } /** *

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

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

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

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

The ID of the list of recommendations that contains the item the user * interacted with. Provide a recommendationId to have Amazon * Personalize implicitly record the recommendations you show your user as * impressions data. Or provide a recommendationId if you use a metric * attribution to measure the impact of recommendations.

For more * information on recording impressions data, see Recording * impressions data. For more information on creating a metric attribution see * Measuring * impact of recommendations.

*/ inline Event& WithRecommendationId(const char* value) { SetRecommendationId(value); return *this;} /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline const Aws::Vector& GetImpression() const{ return m_impression; } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline bool ImpressionHasBeenSet() const { return m_impressionHasBeenSet; } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline void SetImpression(const Aws::Vector& value) { m_impressionHasBeenSet = true; m_impression = value; } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline void SetImpression(Aws::Vector&& value) { m_impressionHasBeenSet = true; m_impression = std::move(value); } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline Event& WithImpression(const Aws::Vector& value) { SetImpression(value); return *this;} /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline Event& WithImpression(Aws::Vector&& value) { SetImpression(std::move(value)); return *this;} /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline Event& AddImpression(const Aws::String& value) { m_impressionHasBeenSet = true; m_impression.push_back(value); return *this; } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline Event& AddImpression(Aws::String&& value) { m_impressionHasBeenSet = true; m_impression.push_back(std::move(value)); return *this; } /** *

A list of item IDs that represents the sequence of items you have shown the * user. For example, ["itemId1", "itemId2", "itemId3"]. Provide a * list of items to manually record impressions data for an event. For more * information on recording impressions data, see Recording * impressions data.

*/ inline Event& AddImpression(const char* value) { m_impressionHasBeenSet = true; m_impression.push_back(value); return *this; } /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline const MetricAttribution& GetMetricAttribution() const{ return m_metricAttribution; } /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline bool MetricAttributionHasBeenSet() const { return m_metricAttributionHasBeenSet; } /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline void SetMetricAttribution(const MetricAttribution& value) { m_metricAttributionHasBeenSet = true; m_metricAttribution = value; } /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline void SetMetricAttribution(MetricAttribution&& value) { m_metricAttributionHasBeenSet = true; m_metricAttribution = std::move(value); } /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline Event& WithMetricAttribution(const MetricAttribution& value) { SetMetricAttribution(value); return *this;} /** *

Contains information about the metric attribution associated with an event. * For more information about metric attributions, see Measuring * impact of recommendations.

*/ inline Event& WithMetricAttribution(MetricAttribution&& value) { SetMetricAttribution(std::move(value)); return *this;} private: Aws::String m_eventId; bool m_eventIdHasBeenSet = false; Aws::String m_eventType; bool m_eventTypeHasBeenSet = false; double m_eventValue; bool m_eventValueHasBeenSet = false; Aws::String m_itemId; bool m_itemIdHasBeenSet = false; Aws::String m_properties; bool m_propertiesHasBeenSet = false; Aws::Utils::DateTime m_sentAt; bool m_sentAtHasBeenSet = false; Aws::String m_recommendationId; bool m_recommendationIdHasBeenSet = false; Aws::Vector m_impression; bool m_impressionHasBeenSet = false; MetricAttribution m_metricAttribution; bool m_metricAttributionHasBeenSet = false; }; } // namespace Model } // namespace PersonalizeEvents } // namespace Aws