
commonMain.aws.sdk.kotlin.services.batch.model.AttemptDetail.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 attempt.
*/
public class AttemptDetail private constructor(builder: Builder) {
/**
* The details for the container in this job attempt.
*/
public val container: aws.sdk.kotlin.services.batch.model.AttemptContainerDetail? = builder.container
/**
* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the `STARTING` state to the `RUNNING` state).
*/
public val startedAt: kotlin.Long? = builder.startedAt
/**
* A short, human-readable string to provide additional details for the current status of the job attempt.
*/
public val statusReason: kotlin.String? = builder.statusReason
/**
* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the `RUNNING` state to a terminal state, such as `SUCCEEDED` or `FAILED`).
*/
public val stoppedAt: kotlin.Long? = builder.stoppedAt
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.AttemptDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AttemptDetail(")
append("container=$container,")
append("startedAt=$startedAt,")
append("statusReason=$statusReason,")
append("stoppedAt=$stoppedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = container?.hashCode() ?: 0
result = 31 * result + (startedAt?.hashCode() ?: 0)
result = 31 * result + (statusReason?.hashCode() ?: 0)
result = 31 * result + (stoppedAt?.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 AttemptDetail
if (container != other.container) return false
if (startedAt != other.startedAt) return false
if (statusReason != other.statusReason) return false
if (stoppedAt != other.stoppedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.AttemptDetail = Builder(this).apply(block).build()
public class Builder {
/**
* The details for the container in this job attempt.
*/
public var container: aws.sdk.kotlin.services.batch.model.AttemptContainerDetail? = null
/**
* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the `STARTING` state to the `RUNNING` state).
*/
public var startedAt: kotlin.Long? = null
/**
* A short, human-readable string to provide additional details for the current status of the job attempt.
*/
public var statusReason: kotlin.String? = null
/**
* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the `RUNNING` state to a terminal state, such as `SUCCEEDED` or `FAILED`).
*/
public var stoppedAt: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.AttemptDetail) : this() {
this.container = x.container
this.startedAt = x.startedAt
this.statusReason = x.statusReason
this.stoppedAt = x.stoppedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.AttemptDetail = AttemptDetail(this)
/**
* construct an [aws.sdk.kotlin.services.batch.model.AttemptContainerDetail] inside the given [block]
*/
public fun container(block: aws.sdk.kotlin.services.batch.model.AttemptContainerDetail.Builder.() -> kotlin.Unit) {
this.container = aws.sdk.kotlin.services.batch.model.AttemptContainerDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy