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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.DeleteAssetModelCompositeModelRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DeleteAssetModelCompositeModelRequest private constructor(builder: Builder) {
    /**
     * The ID of a composite model on this asset model.
     */
    public val assetModelCompositeModelId: kotlin.String? = builder.assetModelCompositeModelId
    /**
     * The ID of the asset model, in UUID format.
     */
    public val assetModelId: kotlin.String? = builder.assetModelId
    /**
     * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The expected current entity tag (ETag) for the asset model’s latest or active version (specified using `matchForVersionType`). The delete request is rejected if the tag does not match the latest or active version's current entity tag. See [Optimistic locking for asset model writes](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html) in the *IoT SiteWise User Guide*.
     */
    public val ifMatch: kotlin.String? = builder.ifMatch
    /**
     * Accepts ***** to reject the delete request if an active version (specified using `matchForVersionType` as `ACTIVE`) already exists for the asset model.
     */
    public val ifNoneMatch: kotlin.String? = builder.ifNoneMatch
    /**
     * Specifies the asset model version type (`LATEST` or `ACTIVE`) used in conjunction with `If-Match` or `If-None-Match` headers to determine the target ETag for the delete operation.
     */
    public val matchForVersionType: aws.sdk.kotlin.services.iotsitewise.model.AssetModelVersionType? = builder.matchForVersionType

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteAssetModelCompositeModelRequest(")
        append("assetModelCompositeModelId=$assetModelCompositeModelId,")
        append("assetModelId=$assetModelId,")
        append("clientToken=$clientToken,")
        append("ifMatch=$ifMatch,")
        append("ifNoneMatch=$ifNoneMatch,")
        append("matchForVersionType=$matchForVersionType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetModelCompositeModelId?.hashCode() ?: 0
        result = 31 * result + (assetModelId?.hashCode() ?: 0)
        result = 31 * result + (clientToken?.hashCode() ?: 0)
        result = 31 * result + (ifMatch?.hashCode() ?: 0)
        result = 31 * result + (ifNoneMatch?.hashCode() ?: 0)
        result = 31 * result + (matchForVersionType?.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 DeleteAssetModelCompositeModelRequest

        if (assetModelCompositeModelId != other.assetModelCompositeModelId) return false
        if (assetModelId != other.assetModelId) return false
        if (clientToken != other.clientToken) return false
        if (ifMatch != other.ifMatch) return false
        if (ifNoneMatch != other.ifNoneMatch) return false
        if (matchForVersionType != other.matchForVersionType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of a composite model on this asset model.
         */
        public var assetModelCompositeModelId: kotlin.String? = null
        /**
         * The ID of the asset model, in UUID format.
         */
        public var assetModelId: kotlin.String? = null
        /**
         * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The expected current entity tag (ETag) for the asset model’s latest or active version (specified using `matchForVersionType`). The delete request is rejected if the tag does not match the latest or active version's current entity tag. See [Optimistic locking for asset model writes](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html) in the *IoT SiteWise User Guide*.
         */
        public var ifMatch: kotlin.String? = null
        /**
         * Accepts ***** to reject the delete request if an active version (specified using `matchForVersionType` as `ACTIVE`) already exists for the asset model.
         */
        public var ifNoneMatch: kotlin.String? = null
        /**
         * Specifies the asset model version type (`LATEST` or `ACTIVE`) used in conjunction with `If-Match` or `If-None-Match` headers to determine the target ETag for the delete operation.
         */
        public var matchForVersionType: aws.sdk.kotlin.services.iotsitewise.model.AssetModelVersionType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.DeleteAssetModelCompositeModelRequest) : this() {
            this.assetModelCompositeModelId = x.assetModelCompositeModelId
            this.assetModelId = x.assetModelId
            this.clientToken = x.clientToken
            this.ifMatch = x.ifMatch
            this.ifNoneMatch = x.ifNoneMatch
            this.matchForVersionType = x.matchForVersionType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy