commonMain.aws.sdk.kotlin.services.deadline.model.SessionActionSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The details of a session action.
*/
public class SessionActionSummary private constructor(builder: Builder) {
/**
* The session action definition.
*/
public val definition: aws.sdk.kotlin.services.deadline.model.SessionActionDefinitionSummary? = builder.definition
/**
* The date and time the resource ended running.
*/
public val endedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.endedAt
/**
* The completion percentage for the session action.
*/
public val progressPercent: kotlin.Float? = builder.progressPercent
/**
* The session action ID.
*/
public val sessionActionId: kotlin.String = requireNotNull(builder.sessionActionId) { "A non-null value must be provided for sessionActionId" }
/**
* The date and time the resource started running.
*/
public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
/**
* The status of the session action.
*/
public val status: aws.sdk.kotlin.services.deadline.model.SessionActionStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The Linux timestamp of the last date and time that the session action was updated.
*/
public val workerUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.workerUpdatedAt
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.SessionActionSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SessionActionSummary(")
append("definition=$definition,")
append("endedAt=$endedAt,")
append("progressPercent=$progressPercent,")
append("sessionActionId=$sessionActionId,")
append("startedAt=$startedAt,")
append("status=$status,")
append("workerUpdatedAt=$workerUpdatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = definition?.hashCode() ?: 0
result = 31 * result + (endedAt?.hashCode() ?: 0)
result = 31 * result + (progressPercent?.hashCode() ?: 0)
result = 31 * result + (sessionActionId.hashCode())
result = 31 * result + (startedAt?.hashCode() ?: 0)
result = 31 * result + (status.hashCode())
result = 31 * result + (workerUpdatedAt?.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 SessionActionSummary
if (definition != other.definition) return false
if (endedAt != other.endedAt) return false
if (!(progressPercent?.equals(other.progressPercent) ?: (other.progressPercent == null))) return false
if (sessionActionId != other.sessionActionId) return false
if (startedAt != other.startedAt) return false
if (status != other.status) return false
if (workerUpdatedAt != other.workerUpdatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.SessionActionSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The session action definition.
*/
public var definition: aws.sdk.kotlin.services.deadline.model.SessionActionDefinitionSummary? = null
/**
* The date and time the resource ended running.
*/
public var endedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The completion percentage for the session action.
*/
public var progressPercent: kotlin.Float? = null
/**
* The session action ID.
*/
public var sessionActionId: kotlin.String? = null
/**
* The date and time the resource started running.
*/
public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The status of the session action.
*/
public var status: aws.sdk.kotlin.services.deadline.model.SessionActionStatus? = null
/**
* The Linux timestamp of the last date and time that the session action was updated.
*/
public var workerUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.SessionActionSummary) : this() {
this.definition = x.definition
this.endedAt = x.endedAt
this.progressPercent = x.progressPercent
this.sessionActionId = x.sessionActionId
this.startedAt = x.startedAt
this.status = x.status
this.workerUpdatedAt = x.workerUpdatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.SessionActionSummary = SessionActionSummary(this)
internal fun correctErrors(): Builder {
if (sessionActionId == null) sessionActionId = ""
if (status == null) status = SessionActionStatus.SdkUnknown("no value provided")
return this
}
}
}