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

commonMain.aws.sdk.kotlin.services.gamelift.model.DesiredPlayerSession.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.gamelift.model



/**
 * Player information for use when creating player sessions using a game session placement request.
 */
public class DesiredPlayerSession private constructor(builder: Builder) {
    /**
     * Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
     */
    public val playerData: kotlin.String? = builder.playerData
    /**
     * A unique identifier for a player to associate with the player session.
     */
    public val playerId: kotlin.String? = builder.playerId

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

    override fun toString(): kotlin.String = buildString {
        append("DesiredPlayerSession(")
        append("playerData=$playerData,")
        append("playerId=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = playerData?.hashCode() ?: 0
        result = 31 * result + (playerId?.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 DesiredPlayerSession

        if (playerData != other.playerData) return false
        if (playerId != other.playerId) return false

        return true
    }

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

    public class Builder {
        /**
         * Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
         */
        public var playerData: kotlin.String? = null
        /**
         * A unique identifier for a player to associate with the player session.
         */
        public var playerId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.gamelift.model.DesiredPlayerSession) : this() {
            this.playerData = x.playerData
            this.playerId = x.playerId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy