/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.personalizeevents.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutEventsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. *
*/ private String trackingId; /** ** The user associated with the event. *
*/ private String userId; /** ** The session ID associated with the user's visit. Your application generates the sessionId when a user first * visits your website or uses your application. Amazon Personalize uses the sessionId to associate events with the * user before they log in. For more information, see Recording Events. *
*/ private String sessionId; /** ** A list of event data from the session. *
*/ private java.util.List* The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. *
* * @param trackingId * The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. */ public void setTrackingId(String trackingId) { this.trackingId = trackingId; } /** ** The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. *
* * @return The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. */ public String getTrackingId() { return this.trackingId; } /** ** The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. *
* * @param trackingId * The tracking ID for the event. The ID is generated by a call to the CreateEventTracker API. * @return Returns a reference to this object so that method calls can be chained together. */ public PutEventsRequest withTrackingId(String trackingId) { setTrackingId(trackingId); return this; } /** ** The user associated with the event. *
* * @param userId * The user associated with the event. */ public void setUserId(String userId) { this.userId = userId; } /** ** The user associated with the event. *
* * @return The user associated with the event. */ public String getUserId() { return this.userId; } /** ** The user associated with the event. *
* * @param userId * The user associated with the event. * @return Returns a reference to this object so that method calls can be chained together. */ public PutEventsRequest withUserId(String userId) { setUserId(userId); return this; } /** ** The session ID associated with the user's visit. Your application generates the sessionId when a user first * visits your website or uses your application. Amazon Personalize uses the sessionId to associate events with the * user before they log in. For more information, see Recording Events. *
* * @param sessionId * The session ID associated with the user's visit. Your application generates the sessionId when a user * first visits your website or uses your application. Amazon Personalize uses the sessionId to associate * events with the user before they log in. For more information, see Recording Events. */ public void setSessionId(String sessionId) { this.sessionId = sessionId; } /** ** The session ID associated with the user's visit. Your application generates the sessionId when a user first * visits your website or uses your application. Amazon Personalize uses the sessionId to associate events with the * user before they log in. For more information, see Recording Events. *
* * @return The session ID associated with the user's visit. Your application generates the sessionId when a user * first visits your website or uses your application. Amazon Personalize uses the sessionId to associate * events with the user before they log in. For more information, see Recording Events. */ public String getSessionId() { return this.sessionId; } /** ** The session ID associated with the user's visit. Your application generates the sessionId when a user first * visits your website or uses your application. Amazon Personalize uses the sessionId to associate events with the * user before they log in. For more information, see Recording Events. *
* * @param sessionId * The session ID associated with the user's visit. Your application generates the sessionId when a user * first visits your website or uses your application. Amazon Personalize uses the sessionId to associate * events with the user before they log in. For more information, see Recording Events. * @return Returns a reference to this object so that method calls can be chained together. */ public PutEventsRequest withSessionId(String sessionId) { setSessionId(sessionId); return this; } /** ** A list of event data from the session. *
* * @return A list of event data from the session. */ public java.util.List* A list of event data from the session. *
* * @param eventList * A list of event data from the session. */ public void setEventList(java.util.Collection* A list of event data from the session. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEventList(java.util.Collection)} or {@link #withEventList(java.util.Collection)} if you want to * override the existing values. *
* * @param eventList * A list of event data from the session. * @return Returns a reference to this object so that method calls can be chained together. */ public PutEventsRequest withEventList(Event... eventList) { if (this.eventList == null) { setEventList(new java.util.ArrayList* A list of event data from the session. *
* * @param eventList * A list of event data from the session. * @return Returns a reference to this object so that method calls can be chained together. */ public PutEventsRequest withEventList(java.util.Collection