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

commonMain.aws.sdk.kotlin.services.amplify.model.Job.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.amplify.model



/**
 * Describes an execution job for an Amplify app.
 */
public class Job private constructor(builder: Builder) {
    /**
     * The execution steps for an execution job, for an Amplify app.
     */
    public val steps: List = requireNotNull(builder.steps) { "A non-null value must be provided for steps" }
    /**
     * Describes the summary for an execution job for an Amplify app.
     */
    public val summary: aws.sdk.kotlin.services.amplify.model.JobSummary? = builder.summary

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

    override fun toString(): kotlin.String = buildString {
        append("Job(")
        append("steps=$steps,")
        append("summary=$summary")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = steps.hashCode()
        result = 31 * result + (summary?.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 Job

        if (steps != other.steps) return false
        if (summary != other.summary) return false

        return true
    }

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

    public class Builder {
        /**
         * The execution steps for an execution job, for an Amplify app.
         */
        public var steps: List? = null
        /**
         * Describes the summary for an execution job for an Amplify app.
         */
        public var summary: aws.sdk.kotlin.services.amplify.model.JobSummary? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.amplify.model.Job) : this() {
            this.steps = x.steps
            this.summary = x.summary
        }

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

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

        internal fun correctErrors(): Builder {
            if (steps == null) steps = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy