
commonMain.aws.sdk.kotlin.services.gamelift.model.GameProperty.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.model
/**
* This key-value pair can store custom data about a game session. For example, you might use a `GameProperty` to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: `{"Key": "difficulty", "Value":"Novice"}`.
*
* You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
*
* For examples of working with game properties, see [Create a game session with properties](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#game-properties).
*/
public class GameProperty private constructor(builder: Builder) {
/**
* The game property identifier.
*/
public val key: kotlin.String? = builder.key
/**
* The game property value.
*/
public val value: kotlin.String? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.gamelift.model.GameProperty = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GameProperty(")
append("key=$key,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = key?.hashCode() ?: 0
result = 31 * result + (value?.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 GameProperty
if (key != other.key) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.gamelift.model.GameProperty = Builder(this).apply(block).build()
public class Builder {
/**
* The game property identifier.
*/
public var key: kotlin.String? = null
/**
* The game property value.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.gamelift.model.GameProperty) : this() {
this.key = x.key
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.gamelift.model.GameProperty = GameProperty(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy