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

commonMain.aws.sdk.kotlin.services.s3control.model.JobProgressSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.s3control.model



/**
 * Describes the total number of tasks that the specified job has started, the number of tasks that succeeded, and the number of tasks that failed.
 */
public class JobProgressSummary private constructor(builder: Builder) {
    /**
     *
     */
    public val numberOfTasksFailed: kotlin.Long? = builder.numberOfTasksFailed
    /**
     *
     */
    public val numberOfTasksSucceeded: kotlin.Long? = builder.numberOfTasksSucceeded
    /**
     * The JobTimers attribute of a job's progress summary.
     */
    public val timers: aws.sdk.kotlin.services.s3control.model.JobTimers? = builder.timers
    /**
     *
     */
    public val totalNumberOfTasks: kotlin.Long? = builder.totalNumberOfTasks

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

    override fun toString(): kotlin.String = buildString {
        append("JobProgressSummary(")
        append("numberOfTasksFailed=$numberOfTasksFailed,")
        append("numberOfTasksSucceeded=$numberOfTasksSucceeded,")
        append("timers=$timers,")
        append("totalNumberOfTasks=$totalNumberOfTasks")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = numberOfTasksFailed?.hashCode() ?: 0
        result = 31 * result + (numberOfTasksSucceeded?.hashCode() ?: 0)
        result = 31 * result + (timers?.hashCode() ?: 0)
        result = 31 * result + (totalNumberOfTasks?.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 JobProgressSummary

        if (numberOfTasksFailed != other.numberOfTasksFailed) return false
        if (numberOfTasksSucceeded != other.numberOfTasksSucceeded) return false
        if (timers != other.timers) return false
        if (totalNumberOfTasks != other.totalNumberOfTasks) return false

        return true
    }

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

    public class Builder {
        /**
         *
         */
        public var numberOfTasksFailed: kotlin.Long? = null
        /**
         *
         */
        public var numberOfTasksSucceeded: kotlin.Long? = null
        /**
         * The JobTimers attribute of a job's progress summary.
         */
        public var timers: aws.sdk.kotlin.services.s3control.model.JobTimers? = null
        /**
         *
         */
        public var totalNumberOfTasks: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3control.model.JobProgressSummary) : this() {
            this.numberOfTasksFailed = x.numberOfTasksFailed
            this.numberOfTasksSucceeded = x.numberOfTasksSucceeded
            this.timers = x.timers
            this.totalNumberOfTasks = x.totalNumberOfTasks
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.s3control.model.JobTimers] inside the given [block]
         */
        public fun timers(block: aws.sdk.kotlin.services.s3control.model.JobTimers.Builder.() -> kotlin.Unit) {
            this.timers = aws.sdk.kotlin.services.s3control.model.JobTimers.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy