
commonMain.aws.sdk.kotlin.services.gamelift.model.StartGameSessionPlacementRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.model
public class StartGameSessionPlacementRequest private constructor(builder: Builder) {
/**
* Set of information on each player to create a player session for.
*/
public val desiredPlayerSessions: List? = builder.desiredPlayerSessions
/**
* A set of key-value pairs that can store custom data in a game session. For example: `{"Key": "difficulty", "Value": "novice"}`.
*/
public val gameProperties: List? = builder.gameProperties
/**
* A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the `GameSession` object with a request to start a new game session (see [Start a Game Session](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)).
*/
public val gameSessionData: kotlin.String? = builder.gameSessionData
/**
* A descriptive label that is associated with a game session. Session names do not need to be unique.
*/
public val gameSessionName: kotlin.String? = builder.gameSessionName
/**
* Name of the queue to use to place the new game session. You can use either the queue name or ARN value.
*/
public val gameSessionQueueName: kotlin.String? = builder.gameSessionQueueName
/**
* The maximum number of players that can be connected simultaneously to the game session.
*/
public val maximumPlayerSessionCount: kotlin.Int? = builder.maximumPlayerSessionCount
/**
* A unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all Regions and cannot be reused.
*/
public val placementId: kotlin.String? = builder.placementId
/**
* A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.
*/
public val playerLatencies: List? = builder.playerLatencies
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.gamelift.model.StartGameSessionPlacementRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartGameSessionPlacementRequest(")
append("desiredPlayerSessions=$desiredPlayerSessions,")
append("gameProperties=$gameProperties,")
append("gameSessionData=$gameSessionData,")
append("gameSessionName=$gameSessionName,")
append("gameSessionQueueName=$gameSessionQueueName,")
append("maximumPlayerSessionCount=$maximumPlayerSessionCount,")
append("placementId=$placementId,")
append("playerLatencies=$playerLatencies")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = desiredPlayerSessions?.hashCode() ?: 0
result = 31 * result + (gameProperties?.hashCode() ?: 0)
result = 31 * result + (gameSessionData?.hashCode() ?: 0)
result = 31 * result + (gameSessionName?.hashCode() ?: 0)
result = 31 * result + (gameSessionQueueName?.hashCode() ?: 0)
result = 31 * result + (maximumPlayerSessionCount ?: 0)
result = 31 * result + (placementId?.hashCode() ?: 0)
result = 31 * result + (playerLatencies?.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 StartGameSessionPlacementRequest
if (desiredPlayerSessions != other.desiredPlayerSessions) return false
if (gameProperties != other.gameProperties) return false
if (gameSessionData != other.gameSessionData) return false
if (gameSessionName != other.gameSessionName) return false
if (gameSessionQueueName != other.gameSessionQueueName) return false
if (maximumPlayerSessionCount != other.maximumPlayerSessionCount) return false
if (placementId != other.placementId) return false
if (playerLatencies != other.playerLatencies) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.gamelift.model.StartGameSessionPlacementRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Set of information on each player to create a player session for.
*/
public var desiredPlayerSessions: List? = null
/**
* A set of key-value pairs that can store custom data in a game session. For example: `{"Key": "difficulty", "Value": "novice"}`.
*/
public var gameProperties: List? = null
/**
* A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the `GameSession` object with a request to start a new game session (see [Start a Game Session](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)).
*/
public var gameSessionData: kotlin.String? = null
/**
* A descriptive label that is associated with a game session. Session names do not need to be unique.
*/
public var gameSessionName: kotlin.String? = null
/**
* Name of the queue to use to place the new game session. You can use either the queue name or ARN value.
*/
public var gameSessionQueueName: kotlin.String? = null
/**
* The maximum number of players that can be connected simultaneously to the game session.
*/
public var maximumPlayerSessionCount: kotlin.Int? = null
/**
* A unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all Regions and cannot be reused.
*/
public var placementId: kotlin.String? = null
/**
* A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.
*/
public var playerLatencies: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.gamelift.model.StartGameSessionPlacementRequest) : this() {
this.desiredPlayerSessions = x.desiredPlayerSessions
this.gameProperties = x.gameProperties
this.gameSessionData = x.gameSessionData
this.gameSessionName = x.gameSessionName
this.gameSessionQueueName = x.gameSessionQueueName
this.maximumPlayerSessionCount = x.maximumPlayerSessionCount
this.placementId = x.placementId
this.playerLatencies = x.playerLatencies
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.gamelift.model.StartGameSessionPlacementRequest = StartGameSessionPlacementRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy