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

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

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

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



/**
 * The input argument to the CancelSteps operation.
 */
public class CancelStepsRequest private constructor(builder: Builder) {
    /**
     * The `ClusterID` for the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.
     */
    public val clusterId: kotlin.String? = builder.clusterId
    /**
     * The option to choose to cancel `RUNNING` steps. By default, the value is `SEND_INTERRUPT`.
     */
    public val stepCancellationOption: aws.sdk.kotlin.services.emr.model.StepCancellationOption? = builder.stepCancellationOption
    /**
     * The list of `StepIDs` to cancel. Use ListSteps to get steps and their states for the specified cluster.
     */
    public val stepIds: List? = builder.stepIds

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

    override fun toString(): kotlin.String = buildString {
        append("CancelStepsRequest(")
        append("clusterId=$clusterId,")
        append("stepCancellationOption=$stepCancellationOption,")
        append("stepIds=$stepIds)")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterId?.hashCode() ?: 0
        result = 31 * result + (stepCancellationOption?.hashCode() ?: 0)
        result = 31 * result + (stepIds?.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 CancelStepsRequest

        if (clusterId != other.clusterId) return false
        if (stepCancellationOption != other.stepCancellationOption) return false
        if (stepIds != other.stepIds) return false

        return true
    }

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

    public class Builder {
        /**
         * The `ClusterID` for the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.
         */
        public var clusterId: kotlin.String? = null
        /**
         * The option to choose to cancel `RUNNING` steps. By default, the value is `SEND_INTERRUPT`.
         */
        public var stepCancellationOption: aws.sdk.kotlin.services.emr.model.StepCancellationOption? = null
        /**
         * The list of `StepIDs` to cancel. Use ListSteps to get steps and their states for the specified cluster.
         */
        public var stepIds: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.CancelStepsRequest) : this() {
            this.clusterId = x.clusterId
            this.stepCancellationOption = x.stepCancellationOption
            this.stepIds = x.stepIds
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy