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

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

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

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



public class UpdateThingGroupsForThingRequest private constructor(builder: Builder) {
    /**
     * Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.
     */
    public val overrideDynamicGroups: kotlin.Boolean? = builder.overrideDynamicGroups
    /**
     * The groups to which the thing will be added.
     */
    public val thingGroupsToAdd: List? = builder.thingGroupsToAdd
    /**
     * The groups from which the thing will be removed.
     */
    public val thingGroupsToRemove: List? = builder.thingGroupsToRemove
    /**
     * The thing whose group memberships will be updated.
     */
    public val thingName: kotlin.String? = builder.thingName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateThingGroupsForThingRequest(")
        append("overrideDynamicGroups=$overrideDynamicGroups,")
        append("thingGroupsToAdd=$thingGroupsToAdd,")
        append("thingGroupsToRemove=$thingGroupsToRemove,")
        append("thingName=$thingName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = overrideDynamicGroups?.hashCode() ?: 0
        result = 31 * result + (thingGroupsToAdd?.hashCode() ?: 0)
        result = 31 * result + (thingGroupsToRemove?.hashCode() ?: 0)
        result = 31 * result + (thingName?.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 UpdateThingGroupsForThingRequest

        if (overrideDynamicGroups != other.overrideDynamicGroups) return false
        if (thingGroupsToAdd != other.thingGroupsToAdd) return false
        if (thingGroupsToRemove != other.thingGroupsToRemove) return false
        if (thingName != other.thingName) return false

        return true
    }

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

    public class Builder {
        /**
         * Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.
         */
        public var overrideDynamicGroups: kotlin.Boolean? = null
        /**
         * The groups to which the thing will be added.
         */
        public var thingGroupsToAdd: List? = null
        /**
         * The groups from which the thing will be removed.
         */
        public var thingGroupsToRemove: List? = null
        /**
         * The thing whose group memberships will be updated.
         */
        public var thingName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateThingGroupsForThingRequest) : this() {
            this.overrideDynamicGroups = x.overrideDynamicGroups
            this.thingGroupsToAdd = x.thingGroupsToAdd
            this.thingGroupsToRemove = x.thingGroupsToRemove
            this.thingName = x.thingName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy