commonMain.aws.sdk.kotlin.services.eventbridge.model.BatchRetryStrategy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// 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
}
}
}