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

commonMain.aws.sdk.kotlin.services.iot.model.JobSummary.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * The job summary.
 */
public class JobSummary private constructor(builder: Builder) {
    /**
     * The time, in seconds since the epoch, when the job completed.
     */
    public val completedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.completedAt
    /**
     * The time, in seconds since the epoch, when the job was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
     */
    public val isConcurrent: kotlin.Boolean? = builder.isConcurrent
    /**
     * The job ARN.
     */
    public val jobArn: kotlin.String? = builder.jobArn
    /**
     * The unique identifier you assigned to this job when it was created.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * The time, in seconds since the epoch, when the job was last updated.
     */
    public val lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedAt
    /**
     * The job summary status.
     */
    public val status: aws.sdk.kotlin.services.iot.model.JobStatus? = builder.status
    /**
     * Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
     *
     * We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
     */
    public val targetSelection: aws.sdk.kotlin.services.iot.model.TargetSelection? = builder.targetSelection
    /**
     * The ID of the thing group.
     */
    public val thingGroupId: kotlin.String? = builder.thingGroupId

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

    override fun toString(): kotlin.String = buildString {
        append("JobSummary(")
        append("completedAt=$completedAt,")
        append("createdAt=$createdAt,")
        append("isConcurrent=$isConcurrent,")
        append("jobArn=$jobArn,")
        append("jobId=$jobId,")
        append("lastUpdatedAt=$lastUpdatedAt,")
        append("status=$status,")
        append("targetSelection=$targetSelection,")
        append("thingGroupId=$thingGroupId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = completedAt?.hashCode() ?: 0
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (isConcurrent?.hashCode() ?: 0)
        result = 31 * result + (jobArn?.hashCode() ?: 0)
        result = 31 * result + (jobId?.hashCode() ?: 0)
        result = 31 * result + (lastUpdatedAt?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (targetSelection?.hashCode() ?: 0)
        result = 31 * result + (thingGroupId?.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 JobSummary

        if (completedAt != other.completedAt) return false
        if (createdAt != other.createdAt) return false
        if (isConcurrent != other.isConcurrent) return false
        if (jobArn != other.jobArn) return false
        if (jobId != other.jobId) return false
        if (lastUpdatedAt != other.lastUpdatedAt) return false
        if (status != other.status) return false
        if (targetSelection != other.targetSelection) return false
        if (thingGroupId != other.thingGroupId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.JobSummary = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The time, in seconds since the epoch, when the job completed.
         */
        public var completedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time, in seconds since the epoch, when the job was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
         */
        public var isConcurrent: kotlin.Boolean? = null
        /**
         * The job ARN.
         */
        public var jobArn: kotlin.String? = null
        /**
         * The unique identifier you assigned to this job when it was created.
         */
        public var jobId: kotlin.String? = null
        /**
         * The time, in seconds since the epoch, when the job was last updated.
         */
        public var lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The job summary status.
         */
        public var status: aws.sdk.kotlin.services.iot.model.JobStatus? = null
        /**
         * Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
         *
         * We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
         */
        public var targetSelection: aws.sdk.kotlin.services.iot.model.TargetSelection? = null
        /**
         * The ID of the thing group.
         */
        public var thingGroupId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.JobSummary) : this() {
            this.completedAt = x.completedAt
            this.createdAt = x.createdAt
            this.isConcurrent = x.isConcurrent
            this.jobArn = x.jobArn
            this.jobId = x.jobId
            this.lastUpdatedAt = x.lastUpdatedAt
            this.status = x.status
            this.targetSelection = x.targetSelection
            this.thingGroupId = x.thingGroupId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy