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

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

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

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



public class CreateMitigationActionRequest private constructor(builder: Builder) {
    /**
     * A friendly name for the action. Choose a friendly name that accurately describes the action (for example, `EnableLoggingAction`).
     */
    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
    /**
     * Metadata that can be used to manage the mitigation action.
     */
    public val tags: List? = builder.tags

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * A friendly name for the action. Choose a friendly name that accurately describes the action (for example, `EnableLoggingAction`).
         */
        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
        /**
         * Metadata that can be used to manage the mitigation action.
         */
        public var tags: List? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iot.model.CreateMitigationActionRequest = CreateMitigationActionRequest(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