
commonMain.aws.sdk.kotlin.services.batch.model.JobTimeout.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* An object that represents a job timeout configuration.
*/
public class JobTimeout private constructor(builder: Builder) {
/**
* The job timeout time (in seconds) that's measured from the job attempt's `startedAt` timestamp. After this time passes, Batch terminates your jobs if they aren't finished. The minimum value for the timeout is 60 seconds.
*
* For array jobs, the timeout applies to the child jobs, not to the parent array job.
*
* For multi-node parallel (MNP) jobs, the timeout applies to the whole job, not to the individual nodes.
*/
public val attemptDurationSeconds: kotlin.Int? = builder.attemptDurationSeconds
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.JobTimeout = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("JobTimeout(")
append("attemptDurationSeconds=$attemptDurationSeconds")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attemptDurationSeconds ?: 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 JobTimeout
if (attemptDurationSeconds != other.attemptDurationSeconds) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.JobTimeout = Builder(this).apply(block).build()
public class Builder {
/**
* The job timeout time (in seconds) that's measured from the job attempt's `startedAt` timestamp. After this time passes, Batch terminates your jobs if they aren't finished. The minimum value for the timeout is 60 seconds.
*
* For array jobs, the timeout applies to the child jobs, not to the parent array job.
*
* For multi-node parallel (MNP) jobs, the timeout applies to the whole job, not to the individual nodes.
*/
public var attemptDurationSeconds: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.JobTimeout) : this() {
this.attemptDurationSeconds = x.attemptDurationSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.JobTimeout = JobTimeout(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy