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

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

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

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



public class CreateDynamicThingGroupRequest private constructor(builder: Builder) {
    /**
     * The dynamic thing group index name.
     *
     * Currently one index is supported: `AWS_Things`.
     */
    public val indexName: kotlin.String? = builder.indexName
    /**
     * The dynamic thing group search query string.
     *
     * See [Query Syntax](https://docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html) for information about query string syntax.
     */
    public val queryString: kotlin.String? = builder.queryString
    /**
     * The dynamic thing group query version.
     *
     * Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.
     */
    public val queryVersion: kotlin.String? = builder.queryVersion
    /**
     * Metadata which can be used to manage the dynamic thing group.
     */
    public val tags: List? = builder.tags
    /**
     * The dynamic thing group name to create.
     */
    public val thingGroupName: kotlin.String? = builder.thingGroupName
    /**
     * The dynamic thing group properties.
     */
    public val thingGroupProperties: aws.sdk.kotlin.services.iot.model.ThingGroupProperties? = builder.thingGroupProperties

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDynamicThingGroupRequest(")
        append("indexName=$indexName,")
        append("queryString=$queryString,")
        append("queryVersion=$queryVersion,")
        append("tags=$tags,")
        append("thingGroupName=$thingGroupName,")
        append("thingGroupProperties=$thingGroupProperties")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = indexName?.hashCode() ?: 0
        result = 31 * result + (queryString?.hashCode() ?: 0)
        result = 31 * result + (queryVersion?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (thingGroupName?.hashCode() ?: 0)
        result = 31 * result + (thingGroupProperties?.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 CreateDynamicThingGroupRequest

        if (indexName != other.indexName) return false
        if (queryString != other.queryString) return false
        if (queryVersion != other.queryVersion) return false
        if (tags != other.tags) return false
        if (thingGroupName != other.thingGroupName) return false
        if (thingGroupProperties != other.thingGroupProperties) return false

        return true
    }

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

    public class Builder {
        /**
         * The dynamic thing group index name.
         *
         * Currently one index is supported: `AWS_Things`.
         */
        public var indexName: kotlin.String? = null
        /**
         * The dynamic thing group search query string.
         *
         * See [Query Syntax](https://docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html) for information about query string syntax.
         */
        public var queryString: kotlin.String? = null
        /**
         * The dynamic thing group query version.
         *
         * Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.
         */
        public var queryVersion: kotlin.String? = null
        /**
         * Metadata which can be used to manage the dynamic thing group.
         */
        public var tags: List? = null
        /**
         * The dynamic thing group name to create.
         */
        public var thingGroupName: kotlin.String? = null
        /**
         * The dynamic thing group properties.
         */
        public var thingGroupProperties: aws.sdk.kotlin.services.iot.model.ThingGroupProperties? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.CreateDynamicThingGroupRequest) : this() {
            this.indexName = x.indexName
            this.queryString = x.queryString
            this.queryVersion = x.queryVersion
            this.tags = x.tags
            this.thingGroupName = x.thingGroupName
            this.thingGroupProperties = x.thingGroupProperties
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy