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

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

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

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



/**
 * The summary of the cluster step.
 */
public class StepSummary private constructor(builder: Builder) {
    /**
     * The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward compatibility.
     */
    public val actionOnFailure: aws.sdk.kotlin.services.emr.model.ActionOnFailure? = builder.actionOnFailure
    /**
     * The Hadoop job configuration of the cluster step.
     */
    public val config: aws.sdk.kotlin.services.emr.model.HadoopStepConfig? = builder.config
    /**
     * The identifier of the cluster step.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of the cluster step.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The current execution status details of the cluster step.
     */
    public val status: aws.sdk.kotlin.services.emr.model.StepStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("StepSummary(")
        append("actionOnFailure=$actionOnFailure,")
        append("config=$config,")
        append("id=$id,")
        append("name=$name,")
        append("status=$status)")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionOnFailure?.hashCode() ?: 0
        result = 31 * result + (config?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (status?.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 StepSummary

        if (actionOnFailure != other.actionOnFailure) return false
        if (config != other.config) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (status != other.status) return false

        return true
    }

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

    public class Builder {
        /**
         * The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward compatibility.
         */
        public var actionOnFailure: aws.sdk.kotlin.services.emr.model.ActionOnFailure? = null
        /**
         * The Hadoop job configuration of the cluster step.
         */
        public var config: aws.sdk.kotlin.services.emr.model.HadoopStepConfig? = null
        /**
         * The identifier of the cluster step.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the cluster step.
         */
        public var name: kotlin.String? = null
        /**
         * The current execution status details of the cluster step.
         */
        public var status: aws.sdk.kotlin.services.emr.model.StepStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.StepSummary) : this() {
            this.actionOnFailure = x.actionOnFailure
            this.config = x.config
            this.id = x.id
            this.name = x.name
            this.status = x.status
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy