
commonMain.aws.sdk.kotlin.services.gamelift.model.UpdateGameSessionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.model
public class UpdateGameSessionRequest private constructor(builder: Builder) {
/**
* A set of key-value pairs that can store custom data in a game session. For example: `{"Key": "difficulty", "Value": "novice"}`. You can use this parameter to modify game properties in an active game session. This action adds new properties and modifies existing properties. There is no way to delete properties. For an example, see [Update the value of a game property](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#game-properties-update).
*/
public val gameProperties: List? = builder.gameProperties
/**
* A unique identifier for the game session to update.
*/
public val gameSessionId: kotlin.String? = builder.gameSessionId
/**
* The maximum number of players that can be connected simultaneously to the game session.
*/
public val maximumPlayerSessionCount: kotlin.Int? = builder.maximumPlayerSessionCount
/**
* A descriptive label that is associated with a game session. Session names do not need to be unique.
*/
public val name: kotlin.String? = builder.name
/**
* A policy that determines whether the game session is accepting new players.
*/
public val playerSessionCreationPolicy: aws.sdk.kotlin.services.gamelift.model.PlayerSessionCreationPolicy? = builder.playerSessionCreationPolicy
/**
* Game session protection policy to apply to this game session only.
* + **NoProtection** -- The game session can be terminated during a scale-down event.
* + **FullProtection** -- If the game session is in an `ACTIVE` status, it cannot be terminated during a scale-down event.
*/
public val protectionPolicy: aws.sdk.kotlin.services.gamelift.model.ProtectionPolicy? = builder.protectionPolicy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.gamelift.model.UpdateGameSessionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateGameSessionRequest(")
append("gameProperties=$gameProperties,")
append("gameSessionId=$gameSessionId,")
append("maximumPlayerSessionCount=$maximumPlayerSessionCount,")
append("name=$name,")
append("playerSessionCreationPolicy=$playerSessionCreationPolicy,")
append("protectionPolicy=$protectionPolicy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = gameProperties?.hashCode() ?: 0
result = 31 * result + (gameSessionId?.hashCode() ?: 0)
result = 31 * result + (maximumPlayerSessionCount ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (playerSessionCreationPolicy?.hashCode() ?: 0)
result = 31 * result + (protectionPolicy?.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 UpdateGameSessionRequest
if (gameProperties != other.gameProperties) return false
if (gameSessionId != other.gameSessionId) return false
if (maximumPlayerSessionCount != other.maximumPlayerSessionCount) return false
if (name != other.name) return false
if (playerSessionCreationPolicy != other.playerSessionCreationPolicy) return false
if (protectionPolicy != other.protectionPolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.gamelift.model.UpdateGameSessionRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A set of key-value pairs that can store custom data in a game session. For example: `{"Key": "difficulty", "Value": "novice"}`. You can use this parameter to modify game properties in an active game session. This action adds new properties and modifies existing properties. There is no way to delete properties. For an example, see [Update the value of a game property](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#game-properties-update).
*/
public var gameProperties: List? = null
/**
* A unique identifier for the game session to update.
*/
public var gameSessionId: kotlin.String? = null
/**
* The maximum number of players that can be connected simultaneously to the game session.
*/
public var maximumPlayerSessionCount: kotlin.Int? = null
/**
* A descriptive label that is associated with a game session. Session names do not need to be unique.
*/
public var name: kotlin.String? = null
/**
* A policy that determines whether the game session is accepting new players.
*/
public var playerSessionCreationPolicy: aws.sdk.kotlin.services.gamelift.model.PlayerSessionCreationPolicy? = null
/**
* Game session protection policy to apply to this game session only.
* + **NoProtection** -- The game session can be terminated during a scale-down event.
* + **FullProtection** -- If the game session is in an `ACTIVE` status, it cannot be terminated during a scale-down event.
*/
public var protectionPolicy: aws.sdk.kotlin.services.gamelift.model.ProtectionPolicy? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.gamelift.model.UpdateGameSessionRequest) : this() {
this.gameProperties = x.gameProperties
this.gameSessionId = x.gameSessionId
this.maximumPlayerSessionCount = x.maximumPlayerSessionCount
this.name = x.name
this.playerSessionCreationPolicy = x.playerSessionCreationPolicy
this.protectionPolicy = x.protectionPolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.gamelift.model.UpdateGameSessionRequest = UpdateGameSessionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy