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

commonMain.aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionState.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iotjobsdataplane.model



/**
 * Contains data about the state of a job execution.
 */
public class JobExecutionState private constructor(builder: Builder) {
    /**
     * The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
     */
    public val status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = builder.status
    /**
     * A collection of name/value pairs that describe the status of the job execution.
     */
    public val statusDetails: Map? = builder.statusDetails
    /**
     * The version of the job execution. Job execution versions are incremented each time they are updated by a device.
     */
    public val versionNumber: kotlin.Long = builder.versionNumber

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

    override fun toString(): kotlin.String = buildString {
        append("JobExecutionState(")
        append("status=$status,")
        append("statusDetails=$statusDetails,")
        append("versionNumber=$versionNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = status?.hashCode() ?: 0
        result = 31 * result + (statusDetails?.hashCode() ?: 0)
        result = 31 * result + (versionNumber.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 JobExecutionState

        if (status != other.status) return false
        if (statusDetails != other.statusDetails) return false
        if (versionNumber != other.versionNumber) return false

        return true
    }

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

    public class Builder {
        /**
         * The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
         */
        public var status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = null
        /**
         * A collection of name/value pairs that describe the status of the job execution.
         */
        public var statusDetails: Map? = null
        /**
         * The version of the job execution. Job execution versions are incremented each time they are updated by a device.
         */
        public var versionNumber: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionState) : this() {
            this.status = x.status
            this.statusDetails = x.statusDetails
            this.versionNumber = x.versionNumber
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy