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

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

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

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



/**
 * An object that contains information about a property response.
 */
public class PropertyResponse private constructor(builder: Builder) {
    /**
     * This flag notes whether all values of a list or map type property are returned in the API response. The maximum number of values per property returned is 50.
     */
    public val areAllPropertyValuesReturned: kotlin.Boolean? = builder.areAllPropertyValuesReturned
    /**
     * An object that specifies information about a property.
     */
    public val definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse? = builder.definition
    /**
     * 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.PropertyResponse = Builder().apply(block).build()
    }

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * This flag notes whether all values of a list or map type property are returned in the API response. The maximum number of values per property returned is 50.
         */
        public var areAllPropertyValuesReturned: kotlin.Boolean? = null
        /**
         * An object that specifies information about a property.
         */
        public var definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse? = 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.PropertyResponse) : this() {
            this.areAllPropertyValuesReturned = x.areAllPropertyValuesReturned
            this.definition = x.definition
            this.value = x.value
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse] inside the given [block]
         */
        public fun definition(block: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse.Builder.() -> kotlin.Unit) {
            this.definition = aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse.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