
commonMain.aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecution.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotjobsdataplane.model
/**
* Contains data about a job execution.
*/
public class JobExecution private constructor(builder: Builder) {
/**
* The estimated number of seconds that remain before the job execution status will be changed to `TIMED_OUT`.
*/
public val approximateSecondsBeforeTimedOut: kotlin.Long? = builder.approximateSecondsBeforeTimedOut
/**
* A number that identifies a particular job execution on a particular device. It can be used later in commands that return or update job execution information.
*/
public val executionNumber: kotlin.Long? = builder.executionNumber
/**
* The content of the job document.
*/
public val jobDocument: kotlin.String? = builder.jobDocument
/**
* The unique identifier you assigned to this job when it was created.
*/
public val jobId: kotlin.String? = builder.jobId
/**
* The time, in milliseconds since the epoch, when the job execution was last updated.
*/
public val lastUpdatedAt: kotlin.Long = builder.lastUpdatedAt
/**
* The time, in milliseconds since the epoch, when the job execution was enqueued.
*/
public val queuedAt: kotlin.Long = builder.queuedAt
/**
* The time, in milliseconds since the epoch, when the job execution was started.
*/
public val startedAt: kotlin.Long? = builder.startedAt
/**
* The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
*/
public val status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = builder.status
/**
* A collection of name/value pairs that describe the status of the job execution.
*/
public val statusDetails: Map? = builder.statusDetails
/**
* The name of the thing that is executing the job.
*/
public val thingName: kotlin.String? = builder.thingName
/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
*/
public val versionNumber: kotlin.Long = builder.versionNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecution = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("JobExecution(")
append("approximateSecondsBeforeTimedOut=$approximateSecondsBeforeTimedOut,")
append("executionNumber=$executionNumber,")
append("jobDocument=$jobDocument,")
append("jobId=$jobId,")
append("lastUpdatedAt=$lastUpdatedAt,")
append("queuedAt=$queuedAt,")
append("startedAt=$startedAt,")
append("status=$status,")
append("statusDetails=$statusDetails,")
append("thingName=$thingName,")
append("versionNumber=$versionNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approximateSecondsBeforeTimedOut?.hashCode() ?: 0
result = 31 * result + (executionNumber?.hashCode() ?: 0)
result = 31 * result + (jobDocument?.hashCode() ?: 0)
result = 31 * result + (jobId?.hashCode() ?: 0)
result = 31 * result + (lastUpdatedAt.hashCode())
result = 31 * result + (queuedAt.hashCode())
result = 31 * result + (startedAt?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (statusDetails?.hashCode() ?: 0)
result = 31 * result + (thingName?.hashCode() ?: 0)
result = 31 * result + (versionNumber.hashCode())
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 JobExecution
if (approximateSecondsBeforeTimedOut != other.approximateSecondsBeforeTimedOut) return false
if (executionNumber != other.executionNumber) return false
if (jobDocument != other.jobDocument) return false
if (jobId != other.jobId) return false
if (lastUpdatedAt != other.lastUpdatedAt) return false
if (queuedAt != other.queuedAt) return false
if (startedAt != other.startedAt) return false
if (status != other.status) return false
if (statusDetails != other.statusDetails) return false
if (thingName != other.thingName) return false
if (versionNumber != other.versionNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecution = Builder(this).apply(block).build()
public class Builder {
/**
* The estimated number of seconds that remain before the job execution status will be changed to `TIMED_OUT`.
*/
public var approximateSecondsBeforeTimedOut: kotlin.Long? = null
/**
* A number that identifies a particular job execution on a particular device. It can be used later in commands that return or update job execution information.
*/
public var executionNumber: kotlin.Long? = null
/**
* The content of the job document.
*/
public var jobDocument: kotlin.String? = null
/**
* The unique identifier you assigned to this job when it was created.
*/
public var jobId: kotlin.String? = null
/**
* The time, in milliseconds since the epoch, when the job execution was last updated.
*/
public var lastUpdatedAt: kotlin.Long = 0L
/**
* The time, in milliseconds since the epoch, when the job execution was enqueued.
*/
public var queuedAt: kotlin.Long = 0L
/**
* The time, in milliseconds since the epoch, when the job execution was started.
*/
public var startedAt: kotlin.Long? = null
/**
* The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
*/
public var status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = null
/**
* A collection of name/value pairs that describe the status of the job execution.
*/
public var statusDetails: Map? = null
/**
* The name of the thing that is executing the job.
*/
public var thingName: kotlin.String? = null
/**
* The version of the job execution. Job execution versions are incremented each time they are updated by a device.
*/
public var versionNumber: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecution) : this() {
this.approximateSecondsBeforeTimedOut = x.approximateSecondsBeforeTimedOut
this.executionNumber = x.executionNumber
this.jobDocument = x.jobDocument
this.jobId = x.jobId
this.lastUpdatedAt = x.lastUpdatedAt
this.queuedAt = x.queuedAt
this.startedAt = x.startedAt
this.status = x.status
this.statusDetails = x.statusDetails
this.thingName = x.thingName
this.versionNumber = x.versionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecution = JobExecution(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy