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

commonMain.aws.sdk.kotlin.services.emr.model.StepStatus.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.emr.model



/**
 * The execution status details of the cluster step.
 */
public class StepStatus private constructor(builder: Builder) {
    /**
     * The details for the step failure including reason, message, and log file path where the root cause was identified.
     */
    public val failureDetails: aws.sdk.kotlin.services.emr.model.FailureDetails? = builder.failureDetails
    /**
     * The execution state of the cluster step.
     */
    public val state: aws.sdk.kotlin.services.emr.model.StepState? = builder.state
    /**
     * The reason for the step execution status change.
     */
    public val stateChangeReason: aws.sdk.kotlin.services.emr.model.StepStateChangeReason? = builder.stateChangeReason
    /**
     * The timeline of the cluster step status over time.
     */
    public val timeline: aws.sdk.kotlin.services.emr.model.StepTimeline? = builder.timeline

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

    override fun toString(): kotlin.String = buildString {
        append("StepStatus(")
        append("failureDetails=$failureDetails,")
        append("state=$state,")
        append("stateChangeReason=$stateChangeReason,")
        append("timeline=$timeline)")
    }

    override fun hashCode(): kotlin.Int {
        var result = failureDetails?.hashCode() ?: 0
        result = 31 * result + (state?.hashCode() ?: 0)
        result = 31 * result + (stateChangeReason?.hashCode() ?: 0)
        result = 31 * result + (timeline?.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 StepStatus

        if (failureDetails != other.failureDetails) return false
        if (state != other.state) return false
        if (stateChangeReason != other.stateChangeReason) return false
        if (timeline != other.timeline) return false

        return true
    }

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

    public class Builder {
        /**
         * The details for the step failure including reason, message, and log file path where the root cause was identified.
         */
        public var failureDetails: aws.sdk.kotlin.services.emr.model.FailureDetails? = null
        /**
         * The execution state of the cluster step.
         */
        public var state: aws.sdk.kotlin.services.emr.model.StepState? = null
        /**
         * The reason for the step execution status change.
         */
        public var stateChangeReason: aws.sdk.kotlin.services.emr.model.StepStateChangeReason? = null
        /**
         * The timeline of the cluster step status over time.
         */
        public var timeline: aws.sdk.kotlin.services.emr.model.StepTimeline? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.StepStatus) : this() {
            this.failureDetails = x.failureDetails
            this.state = x.state
            this.stateChangeReason = x.stateChangeReason
            this.timeline = x.timeline
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy