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

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

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

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



public class CreateDimensionRequest private constructor(builder: Builder) {
    /**
     * Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Specifies the value or list of values for the dimension. For `TOPIC_FILTER` dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
     */
    public val stringValues: List? = builder.stringValues
    /**
     * Metadata that can be used to manage the dimension.
     */
    public val tags: List? = builder.tags
    /**
     * Specifies the type of dimension. Supported types: `TOPIC_FILTER.`
     */
    public val type: aws.sdk.kotlin.services.iot.model.DimensionType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDimensionRequest(")
        append("clientRequestToken=$clientRequestToken,")
        append("name=$name,")
        append("stringValues=$stringValues,")
        append("tags=$tags,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientRequestToken?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (stringValues?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (type?.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 CreateDimensionRequest

        if (clientRequestToken != other.clientRequestToken) return false
        if (name != other.name) return false
        if (stringValues != other.stringValues) return false
        if (tags != other.tags) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies the value or list of values for the dimension. For `TOPIC_FILTER` dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
         */
        public var stringValues: List? = null
        /**
         * Metadata that can be used to manage the dimension.
         */
        public var tags: List? = null
        /**
         * Specifies the type of dimension. Supported types: `TOPIC_FILTER.`
         */
        public var type: aws.sdk.kotlin.services.iot.model.DimensionType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.CreateDimensionRequest) : this() {
            this.clientRequestToken = x.clientRequestToken
            this.name = x.name
            this.stringValues = x.stringValues
            this.tags = x.tags
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy