commonMain.aws.sdk.kotlin.services.deadline.model.GetTaskResponse.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
The newest version!
// 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
public class GetTaskResponse private constructor(builder: Builder) {
/**
* The date and time the resource was created.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* The user or system that created this resource.
*/
public val createdBy: kotlin.String = requireNotNull(builder.createdBy) { "A non-null value must be provided for createdBy" }
/**
* The date and time the resource ended running.
*/
public val endedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.endedAt
/**
* The number of times that the task failed and was retried.
*/
public val failureRetryCount: kotlin.Int? = builder.failureRetryCount
/**
* The latest session ID for the task.
*/
public val latestSessionActionId: kotlin.String? = builder.latestSessionActionId
/**
* The parameters for the task.
*/
public val parameters: Map? = builder.parameters
/**
* The run status for the task.
*/
public val runStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus = requireNotNull(builder.runStatus) { "A non-null value must be provided for runStatus" }
/**
* The date and time the resource started running.
*/
public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
/**
* The run status with which to start the task.
*/
public val targetRunStatus: aws.sdk.kotlin.services.deadline.model.TaskTargetRunStatus? = builder.targetRunStatus
/**
* The task ID.
*/
public val taskId: kotlin.String = requireNotNull(builder.taskId) { "A non-null value must be provided for taskId" }
/**
* The date and time the resource was updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
/**
* The user or system that updated this resource.
*/
public val updatedBy: kotlin.String? = builder.updatedBy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.GetTaskResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetTaskResponse(")
append("createdAt=$createdAt,")
append("createdBy=$createdBy,")
append("endedAt=$endedAt,")
append("failureRetryCount=$failureRetryCount,")
append("latestSessionActionId=$latestSessionActionId,")
append("parameters=*** Sensitive Data Redacted ***,")
append("runStatus=$runStatus,")
append("startedAt=$startedAt,")
append("targetRunStatus=$targetRunStatus,")
append("taskId=$taskId,")
append("updatedAt=$updatedAt,")
append("updatedBy=$updatedBy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdAt.hashCode()
result = 31 * result + (createdBy.hashCode())
result = 31 * result + (endedAt?.hashCode() ?: 0)
result = 31 * result + (failureRetryCount ?: 0)
result = 31 * result + (latestSessionActionId?.hashCode() ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (runStatus.hashCode())
result = 31 * result + (startedAt?.hashCode() ?: 0)
result = 31 * result + (targetRunStatus?.hashCode() ?: 0)
result = 31 * result + (taskId.hashCode())
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.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 GetTaskResponse
if (createdAt != other.createdAt) return false
if (createdBy != other.createdBy) return false
if (endedAt != other.endedAt) return false
if (failureRetryCount != other.failureRetryCount) return false
if (latestSessionActionId != other.latestSessionActionId) return false
if (parameters != other.parameters) return false
if (runStatus != other.runStatus) return false
if (startedAt != other.startedAt) return false
if (targetRunStatus != other.targetRunStatus) return false
if (taskId != other.taskId) return false
if (updatedAt != other.updatedAt) return false
if (updatedBy != other.updatedBy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.GetTaskResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The date and time the resource was created.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that created this resource.
*/
public var createdBy: kotlin.String? = null
/**
* The date and time the resource ended running.
*/
public var endedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The number of times that the task failed and was retried.
*/
public var failureRetryCount: kotlin.Int? = null
/**
* The latest session ID for the task.
*/
public var latestSessionActionId: kotlin.String? = null
/**
* The parameters for the task.
*/
public var parameters: Map? = null
/**
* The run status for the task.
*/
public var runStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus? = null
/**
* The date and time the resource started running.
*/
public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The run status with which to start the task.
*/
public var targetRunStatus: aws.sdk.kotlin.services.deadline.model.TaskTargetRunStatus? = null
/**
* The task ID.
*/
public var taskId: kotlin.String? = null
/**
* The date and time the resource was updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that updated this resource.
*/
public var updatedBy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.GetTaskResponse) : this() {
this.createdAt = x.createdAt
this.createdBy = x.createdBy
this.endedAt = x.endedAt
this.failureRetryCount = x.failureRetryCount
this.latestSessionActionId = x.latestSessionActionId
this.parameters = x.parameters
this.runStatus = x.runStatus
this.startedAt = x.startedAt
this.targetRunStatus = x.targetRunStatus
this.taskId = x.taskId
this.updatedAt = x.updatedAt
this.updatedBy = x.updatedBy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.GetTaskResponse = GetTaskResponse(this)
internal fun correctErrors(): Builder {
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (createdBy == null) createdBy = ""
if (runStatus == null) runStatus = TaskRunStatus.SdkUnknown("no value provided")
if (taskId == null) taskId = ""
return this
}
}
}