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

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

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

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



public class UpdateMitigationActionRequest private constructor(builder: Builder) {
    /**
     * The friendly name for the mitigation action. You cannot change the name by using `UpdateMitigationAction`. Instead, you must delete and recreate the mitigation action with the new name.
     */
    public val actionName: kotlin.String? = builder.actionName
    /**
     * Defines the type of action and the parameters for that action.
     */
    public val actionParams: aws.sdk.kotlin.services.iot.model.MitigationActionParams? = builder.actionParams
    /**
     * The ARN of the IAM role that is used to apply the mitigation action.
     */
    public val roleArn: kotlin.String? = builder.roleArn

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateMitigationActionRequest(")
        append("actionName=$actionName,")
        append("actionParams=$actionParams,")
        append("roleArn=$roleArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionName?.hashCode() ?: 0
        result = 31 * result + (actionParams?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.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 UpdateMitigationActionRequest

        if (actionName != other.actionName) return false
        if (actionParams != other.actionParams) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    public class Builder {
        /**
         * The friendly name for the mitigation action. You cannot change the name by using `UpdateMitigationAction`. Instead, you must delete and recreate the mitigation action with the new name.
         */
        public var actionName: kotlin.String? = null
        /**
         * Defines the type of action and the parameters for that action.
         */
        public var actionParams: aws.sdk.kotlin.services.iot.model.MitigationActionParams? = null
        /**
         * The ARN of the IAM role that is used to apply the mitigation action.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateMitigationActionRequest) : this() {
            this.actionName = x.actionName
            this.actionParams = x.actionParams
            this.roleArn = x.roleArn
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy