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

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.DataValue.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iottwinmaker.model



/**
 * An object that specifies a value for a property.
 */
public class DataValue private constructor(builder: Builder) {
    /**
     * A Boolean value.
     */
    public val booleanValue: kotlin.Boolean? = builder.booleanValue
    /**
     * A double value.
     */
    public val doubleValue: kotlin.Double? = builder.doubleValue
    /**
     * An expression that produces the value.
     */
    public val expression: kotlin.String? = builder.expression
    /**
     * An integer value.
     */
    public val integerValue: kotlin.Int? = builder.integerValue
    /**
     * A list of multiple values.
     */
    public val listValue: List? = builder.listValue
    /**
     * A long value.
     */
    public val longValue: kotlin.Long? = builder.longValue
    /**
     * An object that maps strings to multiple `DataValue` objects.
     */
    public val mapValue: Map? = builder.mapValue
    /**
     * A value that relates a component to another component.
     */
    public val relationshipValue: aws.sdk.kotlin.services.iottwinmaker.model.RelationshipValue? = builder.relationshipValue
    /**
     * A string value.
     */
    public val stringValue: kotlin.String? = builder.stringValue

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

    override fun toString(): kotlin.String = buildString {
        append("DataValue(")
        append("booleanValue=$booleanValue,")
        append("doubleValue=$doubleValue,")
        append("expression=$expression,")
        append("integerValue=$integerValue,")
        append("listValue=$listValue,")
        append("longValue=$longValue,")
        append("mapValue=$mapValue,")
        append("relationshipValue=$relationshipValue,")
        append("stringValue=$stringValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = booleanValue?.hashCode() ?: 0
        result = 31 * result + (doubleValue?.hashCode() ?: 0)
        result = 31 * result + (expression?.hashCode() ?: 0)
        result = 31 * result + (integerValue ?: 0)
        result = 31 * result + (listValue?.hashCode() ?: 0)
        result = 31 * result + (longValue?.hashCode() ?: 0)
        result = 31 * result + (mapValue?.hashCode() ?: 0)
        result = 31 * result + (relationshipValue?.hashCode() ?: 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 DataValue

        if (booleanValue != other.booleanValue) return false
        if (doubleValue != other.doubleValue) return false
        if (expression != other.expression) return false
        if (integerValue != other.integerValue) return false
        if (listValue != other.listValue) return false
        if (longValue != other.longValue) return false
        if (mapValue != other.mapValue) return false
        if (relationshipValue != other.relationshipValue) return false
        if (stringValue != other.stringValue) return false

        return true
    }

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

    public class Builder {
        /**
         * A Boolean value.
         */
        public var booleanValue: kotlin.Boolean? = null
        /**
         * A double value.
         */
        public var doubleValue: kotlin.Double? = null
        /**
         * An expression that produces the value.
         */
        public var expression: kotlin.String? = null
        /**
         * An integer value.
         */
        public var integerValue: kotlin.Int? = null
        /**
         * A list of multiple values.
         */
        public var listValue: List? = null
        /**
         * A long value.
         */
        public var longValue: kotlin.Long? = null
        /**
         * An object that maps strings to multiple `DataValue` objects.
         */
        public var mapValue: Map? = null
        /**
         * A value that relates a component to another component.
         */
        public var relationshipValue: aws.sdk.kotlin.services.iottwinmaker.model.RelationshipValue? = null
        /**
         * A string value.
         */
        public var stringValue: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.DataValue) : this() {
            this.booleanValue = x.booleanValue
            this.doubleValue = x.doubleValue
            this.expression = x.expression
            this.integerValue = x.integerValue
            this.listValue = x.listValue
            this.longValue = x.longValue
            this.mapValue = x.mapValue
            this.relationshipValue = x.relationshipValue
            this.stringValue = x.stringValue
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.iottwinmaker.model.RelationshipValue] inside the given [block]
         */
        public fun relationshipValue(block: aws.sdk.kotlin.services.iottwinmaker.model.RelationshipValue.Builder.() -> kotlin.Unit) {
            this.relationshipValue = aws.sdk.kotlin.services.iottwinmaker.model.RelationshipValue.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy