All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.personalizeevents.model.PutEventsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Personalize Events module holds the client classes that are used for communicating with Amazon Personalize Events Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2015-2020 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. *

*/ private String sessionId; /** *

* A list of event data from the session. *

*/ private java.util.List eventList; /** *

* 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. *

* * @param sessionId * The session ID associated with the user's visit. */ public void setSessionId(String sessionId) { this.sessionId = sessionId; } /** *

* The session ID associated with the user's visit. *

* * @return The session ID associated with the user's visit. */ public String getSessionId() { return this.sessionId; } /** *

* The session ID associated with the user's visit. *

* * @param sessionId * The session ID associated with the user's visit. * @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 getEventList() { return eventList; } /** *

* A list of event data from the session. *

* * @param eventList * A list of event data from the session. */ public void setEventList(java.util.Collection eventList) { if (eventList == null) { this.eventList = null; return; } this.eventList = new java.util.ArrayList(eventList); } /** *

* 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(eventList.length)); } for (Event ele : eventList) { this.eventList.add(ele); } return this; } /** *

* 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 eventList) { setEventList(eventList); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTrackingId() != null) sb.append("TrackingId: ").append(getTrackingId()).append(","); if (getUserId() != null) sb.append("UserId: ").append(getUserId()).append(","); if (getSessionId() != null) sb.append("SessionId: ").append(getSessionId()).append(","); if (getEventList() != null) sb.append("EventList: ").append(getEventList()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutEventsRequest == false) return false; PutEventsRequest other = (PutEventsRequest) obj; if (other.getTrackingId() == null ^ this.getTrackingId() == null) return false; if (other.getTrackingId() != null && other.getTrackingId().equals(this.getTrackingId()) == false) return false; if (other.getUserId() == null ^ this.getUserId() == null) return false; if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false) return false; if (other.getSessionId() == null ^ this.getSessionId() == null) return false; if (other.getSessionId() != null && other.getSessionId().equals(this.getSessionId()) == false) return false; if (other.getEventList() == null ^ this.getEventList() == null) return false; if (other.getEventList() != null && other.getEventList().equals(this.getEventList()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTrackingId() == null) ? 0 : getTrackingId().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getSessionId() == null) ? 0 : getSessionId().hashCode()); hashCode = prime * hashCode + ((getEventList() == null) ? 0 : getEventList().hashCode()); return hashCode; } @Override public PutEventsRequest clone() { return (PutEventsRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy