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

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

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

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



/**
 * An object that sets information about a property.
 */
public class PropertyRequest private constructor(builder: Builder) {
    /**
     * An object that specifies information about a property.
     */
    public val definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionRequest? = builder.definition
    /**
     * The update type of the update property request.
     */
    public val updateType: aws.sdk.kotlin.services.iottwinmaker.model.PropertyUpdateType? = builder.updateType
    /**
     * The value of the property.
     */
    public val value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = builder.value

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

    override fun toString(): kotlin.String = buildString {
        append("PropertyRequest(")
        append("definition=$definition,")
        append("updateType=$updateType,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = definition?.hashCode() ?: 0
        result = 31 * result + (updateType?.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 PropertyRequest

        if (definition != other.definition) return false
        if (updateType != other.updateType) return false
        if (value != other.value) return false

        return true
    }

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

    public class Builder {
        /**
         * An object that specifies information about a property.
         */
        public var definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionRequest? = null
        /**
         * The update type of the update property request.
         */
        public var updateType: aws.sdk.kotlin.services.iottwinmaker.model.PropertyUpdateType? = null
        /**
         * The value of the property.
         */
        public var value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.PropertyRequest) : this() {
            this.definition = x.definition
            this.updateType = x.updateType
            this.value = x.value
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy