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

commonMain.aws.sdk.kotlin.services.personalizeevents.model.PutEventsRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.personalizeevents.model



public class PutEventsRequest private constructor(builder: Builder) {
    /**
     * A list of event data from the session.
     */
    public val eventList: List? = builder.eventList
    /**
     * 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](https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html).
     */
    public val sessionId: kotlin.String? = builder.sessionId
    /**
     * The tracking ID for the event. The ID is generated by a call to the [CreateEventTracker](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html) API.
     */
    public val trackingId: kotlin.String? = builder.trackingId
    /**
     * The user associated with the event.
     */
    public val userId: kotlin.String? = builder.userId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalizeevents.model.PutEventsRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PutEventsRequest(")
        append("eventList=$eventList,")
        append("sessionId=$sessionId,")
        append("trackingId=$trackingId,")
        append("userId=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = eventList?.hashCode() ?: 0
        result = 31 * result + (sessionId?.hashCode() ?: 0)
        result = 31 * result + (trackingId?.hashCode() ?: 0)
        result = 31 * result + (userId?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as PutEventsRequest

        if (eventList != other.eventList) return false
        if (sessionId != other.sessionId) return false
        if (trackingId != other.trackingId) return false
        if (userId != other.userId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalizeevents.model.PutEventsRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * A list of event data from the session.
         */
        public var eventList: List? = null
        /**
         * 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](https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html).
         */
        public var sessionId: kotlin.String? = null
        /**
         * The tracking ID for the event. The ID is generated by a call to the [CreateEventTracker](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html) API.
         */
        public var trackingId: kotlin.String? = null
        /**
         * The user associated with the event.
         */
        public var userId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.personalizeevents.model.PutEventsRequest) : this() {
            this.eventList = x.eventList
            this.sessionId = x.sessionId
            this.trackingId = x.trackingId
            this.userId = x.userId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.personalizeevents.model.PutEventsRequest = PutEventsRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy