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

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

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.eventbridge.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The retry strategy to use for failed jobs, if the target is an Batch job. If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.
 */
public class BatchRetryStrategy private constructor(builder: Builder) {
    /**
     * The number of times to attempt to retry, if the job fails. Valid values are 1–10.
     */
    public val attempts: kotlin.Int = builder.attempts

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.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
        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.eventbridge.model.BatchRetryStrategy = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The number of times to attempt to retry, if the job fails. Valid values are 1–10.
         */
        public var attempts: kotlin.Int = 0

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy