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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Returned by ListAuditMitigationActionsTask, this object contains information that describes a mitigation action that has been started.
 */
public class AuditMitigationActionExecutionMetadata private constructor(builder: Builder) {
    /**
     * The unique identifier for the mitigation action being applied by the task.
     */
    public val actionId: kotlin.String? = builder.actionId
    /**
     * The friendly name of the mitigation action being applied by the task.
     */
    public val actionName: kotlin.String? = builder.actionName
    /**
     * The date and time when the task was completed or canceled. Blank if the task is still running.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * If an error occurred, the code that indicates which type of error occurred.
     */
    public val errorCode: kotlin.String? = builder.errorCode
    /**
     * The unique identifier for the findings to which the task and associated mitigation action are applied.
     */
    public val findingId: kotlin.String? = builder.findingId
    /**
     * If an error occurred, a message that describes the error.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The date and time when the task was started.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * The current status of the task being executed.
     */
    public val status: aws.sdk.kotlin.services.iot.model.AuditMitigationActionsExecutionStatus? = builder.status
    /**
     * The unique identifier for the task that applies the mitigation action.
     */
    public val taskId: kotlin.String? = builder.taskId

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

    override fun toString(): kotlin.String = buildString {
        append("AuditMitigationActionExecutionMetadata(")
        append("actionId=$actionId,")
        append("actionName=$actionName,")
        append("endTime=$endTime,")
        append("errorCode=$errorCode,")
        append("findingId=$findingId,")
        append("message=$message,")
        append("startTime=$startTime,")
        append("status=$status,")
        append("taskId=$taskId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionId?.hashCode() ?: 0
        result = 31 * result + (actionName?.hashCode() ?: 0)
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (errorCode?.hashCode() ?: 0)
        result = 31 * result + (findingId?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (taskId?.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 AuditMitigationActionExecutionMetadata

        if (actionId != other.actionId) return false
        if (actionName != other.actionName) return false
        if (endTime != other.endTime) return false
        if (errorCode != other.errorCode) return false
        if (findingId != other.findingId) return false
        if (message != other.message) return false
        if (startTime != other.startTime) return false
        if (status != other.status) return false
        if (taskId != other.taskId) return false

        return true
    }

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

    public class Builder {
        /**
         * The unique identifier for the mitigation action being applied by the task.
         */
        public var actionId: kotlin.String? = null
        /**
         * The friendly name of the mitigation action being applied by the task.
         */
        public var actionName: kotlin.String? = null
        /**
         * The date and time when the task was completed or canceled. Blank if the task is still running.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * If an error occurred, the code that indicates which type of error occurred.
         */
        public var errorCode: kotlin.String? = null
        /**
         * The unique identifier for the findings to which the task and associated mitigation action are applied.
         */
        public var findingId: kotlin.String? = null
        /**
         * If an error occurred, a message that describes the error.
         */
        public var message: kotlin.String? = null
        /**
         * The date and time when the task was started.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The current status of the task being executed.
         */
        public var status: aws.sdk.kotlin.services.iot.model.AuditMitigationActionsExecutionStatus? = null
        /**
         * The unique identifier for the task that applies the mitigation action.
         */
        public var taskId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.AuditMitigationActionExecutionMetadata) : this() {
            this.actionId = x.actionId
            this.actionName = x.actionName
            this.endTime = x.endTime
            this.errorCode = x.errorCode
            this.findingId = x.findingId
            this.message = x.message
            this.startTime = x.startTime
            this.status = x.status
            this.taskId = x.taskId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy