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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.Variant.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains an asset property value (of a single type only).
 */
public class Variant private constructor(builder: Builder) {
    /**
     * Asset property data of type Boolean (true or false).
     */
    public val booleanValue: kotlin.Boolean? = builder.booleanValue
    /**
     * Asset property data of type double (floating point number).
     */
    public val doubleValue: kotlin.Double? = builder.doubleValue
    /**
     * Asset property data of type integer (whole number).
     */
    public val integerValue: kotlin.Int? = builder.integerValue
    /**
     * Asset property data of type string (sequence of characters).
     */
    public val stringValue: kotlin.String? = builder.stringValue

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

    override fun toString(): kotlin.String = buildString {
        append("Variant(")
        append("booleanValue=$booleanValue,")
        append("doubleValue=$doubleValue,")
        append("integerValue=$integerValue,")
        append("stringValue=$stringValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = booleanValue?.hashCode() ?: 0
        result = 31 * result + (doubleValue?.hashCode() ?: 0)
        result = 31 * result + (integerValue ?: 0)
        result = 31 * result + (stringValue?.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 Variant

        if (booleanValue != other.booleanValue) return false
        if (!(doubleValue?.equals(other.doubleValue) ?: (other.doubleValue == null))) return false
        if (integerValue != other.integerValue) return false
        if (stringValue != other.stringValue) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Asset property data of type Boolean (true or false).
         */
        public var booleanValue: kotlin.Boolean? = null
        /**
         * Asset property data of type double (floating point number).
         */
        public var doubleValue: kotlin.Double? = null
        /**
         * Asset property data of type integer (whole number).
         */
        public var integerValue: kotlin.Int? = null
        /**
         * Asset property data of type string (sequence of characters).
         */
        public var stringValue: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.Variant) : this() {
            this.booleanValue = x.booleanValue
            this.doubleValue = x.doubleValue
            this.integerValue = x.integerValue
            this.stringValue = x.stringValue
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy