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

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

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

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



/**
 * Values for use in player attribute key-value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array, or data map. Each `AttributeValue` object can use only one of the available properties.
 */
public class AttributeValue private constructor(builder: Builder) {
    /**
     * For number values, expressed as double.
     */
    public val n: kotlin.Double? = builder.n
    /**
     * For single string values. Maximum string length is 100 characters.
     */
    public val s: kotlin.String? = builder.s
    /**
     * For a map of up to 10 data type:value pairs. Maximum length for each string value is 100 characters.
     */
    public val sdm: Map? = builder.sdm
    /**
     * For a list of up to 100 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
     */
    public val sl: List? = builder.sl

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

    override fun toString(): kotlin.String = buildString {
        append("AttributeValue(")
        append("n=$n,")
        append("s=$s,")
        append("sdm=$sdm,")
        append("sl=$sl")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = n?.hashCode() ?: 0
        result = 31 * result + (s?.hashCode() ?: 0)
        result = 31 * result + (sdm?.hashCode() ?: 0)
        result = 31 * result + (sl?.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 AttributeValue

        if (n != other.n) return false
        if (s != other.s) return false
        if (sdm != other.sdm) return false
        if (sl != other.sl) return false

        return true
    }

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

    public class Builder {
        /**
         * For number values, expressed as double.
         */
        public var n: kotlin.Double? = null
        /**
         * For single string values. Maximum string length is 100 characters.
         */
        public var s: kotlin.String? = null
        /**
         * For a map of up to 10 data type:value pairs. Maximum length for each string value is 100 characters.
         */
        public var sdm: Map? = null
        /**
         * For a list of up to 100 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
         */
        public var sl: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.gamelift.model.AttributeValue) : this() {
            this.n = x.n
            this.s = x.s
            this.sdm = x.sdm
            this.sl = x.sl
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy