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

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

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

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



/**
 * Parameters to define a mitigation action that changes the state of the device certificate to inactive.
 */
public class UpdateDeviceCertificateParams private constructor(builder: Builder) {
    /**
     * The action that you want to apply to the device certificate. The only supported value is `DEACTIVATE`.
     */
    public val action: aws.sdk.kotlin.services.iot.model.DeviceCertificateUpdateAction = requireNotNull(builder.action) { "A non-null value must be provided for action" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateDeviceCertificateParams(")
        append("action=$action")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = action.hashCode()
        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 UpdateDeviceCertificateParams

        if (action != other.action) return false

        return true
    }

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

    public class Builder {
        /**
         * The action that you want to apply to the device certificate. The only supported value is `DEACTIVATE`.
         */
        public var action: aws.sdk.kotlin.services.iot.model.DeviceCertificateUpdateAction? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateDeviceCertificateParams) : this() {
            this.action = x.action
        }

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

        internal fun correctErrors(): Builder {
            if (action == null) action = DeviceCertificateUpdateAction.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy