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

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

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

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



/**
 * Thing group properties.
 */
public class ThingGroupProperties private constructor(builder: Builder) {
    /**
     * The thing group attributes in JSON format.
     */
    public val attributePayload: aws.sdk.kotlin.services.iot.model.AttributePayload? = builder.attributePayload
    /**
     * The thing group description.
     */
    public val thingGroupDescription: kotlin.String? = builder.thingGroupDescription

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

    override fun toString(): kotlin.String = buildString {
        append("ThingGroupProperties(")
        append("attributePayload=$attributePayload,")
        append("thingGroupDescription=$thingGroupDescription")
        append(")")
    }

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

        if (attributePayload != other.attributePayload) return false
        if (thingGroupDescription != other.thingGroupDescription) return false

        return true
    }

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

    public class Builder {
        /**
         * The thing group attributes in JSON format.
         */
        public var attributePayload: aws.sdk.kotlin.services.iot.model.AttributePayload? = null
        /**
         * The thing group description.
         */
        public var thingGroupDescription: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.ThingGroupProperties) : this() {
            this.attributePayload = x.attributePayload
            this.thingGroupDescription = x.thingGroupDescription
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy