All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.deadline.model.JobSearchSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show 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

/**
 * The details of a job search.
 */
public class JobSearchSummary private constructor(builder: Builder) {
    /**
     * The date and time the resource was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The user or system that created this resource.
     */
    public val createdBy: kotlin.String? = builder.createdBy
    /**
     * The date and time the resource ended running.
     */
    public val endedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.endedAt
    /**
     * The job ID.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * The job parameters.
     */
    public val jobParameters: Map? = builder.jobParameters
    /**
     * The life cycle status.
     */
    public val lifecycleStatus: aws.sdk.kotlin.services.deadline.model.JobLifecycleStatus? = builder.lifecycleStatus
    /**
     * The life cycle status message.
     */
    public val lifecycleStatusMessage: kotlin.String? = builder.lifecycleStatusMessage
    /**
     * The number of task failures before the job stops running and is marked as `FAILED`.
     */
    public val maxFailedTasksCount: kotlin.Int? = builder.maxFailedTasksCount
    /**
     * The maximum number of retries for a job.
     */
    public val maxRetriesPerTask: kotlin.Int? = builder.maxRetriesPerTask
    /**
     * The job name.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The job priority.
     */
    public val priority: kotlin.Int? = builder.priority
    /**
     * The queue ID.
     */
    public val queueId: kotlin.String? = builder.queueId
    /**
     * The date and time the resource started running.
     */
    public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
    /**
     * The task status to start with on the job.
     */
    public val targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.JobTargetTaskRunStatus? = builder.targetTaskRunStatus
    /**
     * The task run status for the job.
     * + `PENDING`–pending and waiting for resources.
     * + `READY`–ready to be processed.
     * + `ASSIGNED`–assigned and will run next on a worker.
     * + `SCHEDULED`–scheduled to be run on a worker.
     * + `INTERRUPTING`–being interrupted.
     * + `RUNNING`–running on a worker.
     * + `SUSPENDED`–the task is suspended.
     * + `CANCELED`–the task has been canceled.
     * + `FAILED`–the task has failed.
     * + `SUCCEEDED`–the task has succeeded.
     */
    public val taskRunStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus? = builder.taskRunStatus
    /**
     * The number of tasks running on the job.
     */
    public val taskRunStatusCounts: Map? = builder.taskRunStatusCounts

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.JobSearchSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("JobSearchSummary(")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("endedAt=$endedAt,")
        append("jobId=$jobId,")
        append("jobParameters=*** Sensitive Data Redacted ***,")
        append("lifecycleStatus=$lifecycleStatus,")
        append("lifecycleStatusMessage=$lifecycleStatusMessage,")
        append("maxFailedTasksCount=$maxFailedTasksCount,")
        append("maxRetriesPerTask=$maxRetriesPerTask,")
        append("name=$name,")
        append("priority=$priority,")
        append("queueId=$queueId,")
        append("startedAt=$startedAt,")
        append("targetTaskRunStatus=$targetTaskRunStatus,")
        append("taskRunStatus=$taskRunStatus,")
        append("taskRunStatusCounts=$taskRunStatusCounts")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (endedAt?.hashCode() ?: 0)
        result = 31 * result + (jobId?.hashCode() ?: 0)
        result = 31 * result + (jobParameters?.hashCode() ?: 0)
        result = 31 * result + (lifecycleStatus?.hashCode() ?: 0)
        result = 31 * result + (lifecycleStatusMessage?.hashCode() ?: 0)
        result = 31 * result + (maxFailedTasksCount ?: 0)
        result = 31 * result + (maxRetriesPerTask ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (priority ?: 0)
        result = 31 * result + (queueId?.hashCode() ?: 0)
        result = 31 * result + (startedAt?.hashCode() ?: 0)
        result = 31 * result + (targetTaskRunStatus?.hashCode() ?: 0)
        result = 31 * result + (taskRunStatus?.hashCode() ?: 0)
        result = 31 * result + (taskRunStatusCounts?.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 JobSearchSummary

        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (endedAt != other.endedAt) return false
        if (jobId != other.jobId) return false
        if (jobParameters != other.jobParameters) return false
        if (lifecycleStatus != other.lifecycleStatus) return false
        if (lifecycleStatusMessage != other.lifecycleStatusMessage) return false
        if (maxFailedTasksCount != other.maxFailedTasksCount) return false
        if (maxRetriesPerTask != other.maxRetriesPerTask) return false
        if (name != other.name) return false
        if (priority != other.priority) return false
        if (queueId != other.queueId) return false
        if (startedAt != other.startedAt) return false
        if (targetTaskRunStatus != other.targetTaskRunStatus) return false
        if (taskRunStatus != other.taskRunStatus) return false
        if (taskRunStatusCounts != other.taskRunStatusCounts) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.JobSearchSummary = 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 job ID.
         */
        public var jobId: kotlin.String? = null
        /**
         * The job parameters.
         */
        public var jobParameters: Map? = null
        /**
         * The life cycle status.
         */
        public var lifecycleStatus: aws.sdk.kotlin.services.deadline.model.JobLifecycleStatus? = null
        /**
         * The life cycle status message.
         */
        public var lifecycleStatusMessage: kotlin.String? = null
        /**
         * The number of task failures before the job stops running and is marked as `FAILED`.
         */
        public var maxFailedTasksCount: kotlin.Int? = null
        /**
         * The maximum number of retries for a job.
         */
        public var maxRetriesPerTask: kotlin.Int? = null
        /**
         * The job name.
         */
        public var name: kotlin.String? = null
        /**
         * The job priority.
         */
        public var priority: kotlin.Int? = null
        /**
         * The queue ID.
         */
        public var queueId: kotlin.String? = null
        /**
         * The date and time the resource started running.
         */
        public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The task status to start with on the job.
         */
        public var targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.JobTargetTaskRunStatus? = null
        /**
         * The task run status for the job.
         * + `PENDING`–pending and waiting for resources.
         * + `READY`–ready to be processed.
         * + `ASSIGNED`–assigned and will run next on a worker.
         * + `SCHEDULED`–scheduled to be run on a worker.
         * + `INTERRUPTING`–being interrupted.
         * + `RUNNING`–running on a worker.
         * + `SUSPENDED`–the task is suspended.
         * + `CANCELED`–the task has been canceled.
         * + `FAILED`–the task has failed.
         * + `SUCCEEDED`–the task has succeeded.
         */
        public var taskRunStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus? = null
        /**
         * The number of tasks running on the job.
         */
        public var taskRunStatusCounts: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.JobSearchSummary) : this() {
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.endedAt = x.endedAt
            this.jobId = x.jobId
            this.jobParameters = x.jobParameters
            this.lifecycleStatus = x.lifecycleStatus
            this.lifecycleStatusMessage = x.lifecycleStatusMessage
            this.maxFailedTasksCount = x.maxFailedTasksCount
            this.maxRetriesPerTask = x.maxRetriesPerTask
            this.name = x.name
            this.priority = x.priority
            this.queueId = x.queueId
            this.startedAt = x.startedAt
            this.targetTaskRunStatus = x.targetTaskRunStatus
            this.taskRunStatus = x.taskRunStatus
            this.taskRunStatusCounts = x.taskRunStatusCounts
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.deadline.model.JobSearchSummary = JobSearchSummary(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy