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

commonMain.aws.sdk.kotlin.services.iot.model.ThingAttribute.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



/**
 * The properties of the thing, including thing name, thing type name, and a list of thing attributes.
 */
public class ThingAttribute private constructor(builder: Builder) {
    /**
     * A list of thing attributes which are name-value pairs.
     */
    public val attributes: Map? = builder.attributes
    /**
     * The thing ARN.
     */
    public val thingArn: kotlin.String? = builder.thingArn
    /**
     * The name of the thing.
     */
    public val thingName: kotlin.String? = builder.thingName
    /**
     * The name of the thing type, if the thing has been associated with a type.
     */
    public val thingTypeName: kotlin.String? = builder.thingTypeName
    /**
     * The version of the thing record in the registry.
     */
    public val version: kotlin.Long = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("ThingAttribute(")
        append("attributes=$attributes,")
        append("thingArn=$thingArn,")
        append("thingName=$thingName,")
        append("thingTypeName=$thingTypeName,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attributes?.hashCode() ?: 0
        result = 31 * result + (thingArn?.hashCode() ?: 0)
        result = 31 * result + (thingName?.hashCode() ?: 0)
        result = 31 * result + (thingTypeName?.hashCode() ?: 0)
        result = 31 * result + (version.hashCode())
        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 ThingAttribute

        if (attributes != other.attributes) return false
        if (thingArn != other.thingArn) return false
        if (thingName != other.thingName) return false
        if (thingTypeName != other.thingTypeName) return false
        if (version != other.version) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of thing attributes which are name-value pairs.
         */
        public var attributes: Map? = null
        /**
         * The thing ARN.
         */
        public var thingArn: kotlin.String? = null
        /**
         * The name of the thing.
         */
        public var thingName: kotlin.String? = null
        /**
         * The name of the thing type, if the thing has been associated with a type.
         */
        public var thingTypeName: kotlin.String? = null
        /**
         * The version of the thing record in the registry.
         */
        public var version: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.ThingAttribute) : this() {
            this.attributes = x.attributes
            this.thingArn = x.thingArn
            this.thingName = x.thingName
            this.thingTypeName = x.thingTypeName
            this.version = x.version
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy