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

commonMain.aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pipes.model



/**
 * The retry strategy that's associated with a job. For more information, see [ Automated job retries](https://docs.aws.amazon.com/batch/latest/userguide/job_retries.html) in the *Batch User Guide*.
 */
public class BatchRetryStrategy private constructor(builder: Builder) {
    /**
     * The number of times to move a job to the `RUNNABLE` status. If the value of `attempts` is greater than one, the job is retried on failure the same number of attempts as the value.
     */
    public val attempts: kotlin.Int? = builder.attempts

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

    override fun toString(): kotlin.String = buildString {
        append("BatchRetryStrategy(")
        append("attempts=$attempts")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attempts ?: 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 BatchRetryStrategy

        if (attempts != other.attempts) return false

        return true
    }

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

    public class Builder {
        /**
         * The number of times to move a job to the `RUNNABLE` status. If the value of `attempts` is greater than one, the job is retried on failure the same number of attempts as the value.
         */
        public var attempts: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy) : this() {
            this.attempts = x.attempts
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy