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

commonMain.aws.sdk.kotlin.services.codepipeline.model.PutJobFailureResultRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codepipeline.model



/**
 * Represents the input of a `PutJobFailureResult` action.
 */
public class PutJobFailureResultRequest private constructor(builder: Builder) {
    /**
     * The details about the failure of a job.
     */
    public val failureDetails: aws.sdk.kotlin.services.codepipeline.model.FailureDetails? = builder.failureDetails
    /**
     * The unique system-generated ID of the job that failed. This is the same ID returned from `PollForJobs`.
     */
    public val jobId: kotlin.String? = builder.jobId

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

    override fun toString(): kotlin.String = buildString {
        append("PutJobFailureResultRequest(")
        append("failureDetails=$failureDetails,")
        append("jobId=$jobId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = failureDetails?.hashCode() ?: 0
        result = 31 * result + (jobId?.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 PutJobFailureResultRequest

        if (failureDetails != other.failureDetails) return false
        if (jobId != other.jobId) return false

        return true
    }

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

    public class Builder {
        /**
         * The details about the failure of a job.
         */
        public var failureDetails: aws.sdk.kotlin.services.codepipeline.model.FailureDetails? = null
        /**
         * The unique system-generated ID of the job that failed. This is the same ID returned from `PollForJobs`.
         */
        public var jobId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.PutJobFailureResultRequest) : this() {
            this.failureDetails = x.failureDetails
            this.jobId = x.jobId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy