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

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

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

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



/**
 * Represents information about the result of an approval request.
 */
public class ApprovalResult private constructor(builder: Builder) {
    /**
     * The response submitted by a reviewer assigned to an approval action request.
     */
    public val status: aws.sdk.kotlin.services.codepipeline.model.ApprovalStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The summary of the current status of the approval request.
     */
    public val summary: kotlin.String = requireNotNull(builder.summary) { "A non-null value must be provided for summary" }

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * The response submitted by a reviewer assigned to an approval action request.
         */
        public var status: aws.sdk.kotlin.services.codepipeline.model.ApprovalStatus? = null
        /**
         * The summary of the current status of the approval request.
         */
        public var summary: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.ApprovalResult) : this() {
            this.status = x.status
            this.summary = x.summary
        }

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

        internal fun correctErrors(): Builder {
            if (status == null) status = ApprovalStatus.SdkUnknown("no value provided")
            if (summary == null) summary = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy