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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

public class CreatePlayerSessionRequest private constructor(builder: Builder) {
    /**
     * A unique identifier for the game session to add a player to.
     */
    public val gameSessionId: kotlin.String? = builder.gameSessionId
    /**
     * 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. Player IDs are developer-defined.
     */
    public val playerId: kotlin.String? = builder.playerId

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

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

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

        if (gameSessionId != other.gameSessionId) return false
        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.CreatePlayerSessionRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A unique identifier for the game session to add a player to.
         */
        public var gameSessionId: kotlin.String? = null
        /**
         * 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. Player IDs are developer-defined.
         */
        public var playerId: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy