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

commonMain.aws.sdk.kotlin.services.codecommit.model.EvaluatePullRequestApprovalRulesResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codecommit.model

import aws.smithy.kotlin.runtime.SdkDsl

public class EvaluatePullRequestApprovalRulesResponse private constructor(builder: Builder) {
    /**
     * The result of the evaluation, including the names of the rules whose conditions have been met (if any), the names of the rules whose conditions have not been met (if any), whether the pull request is in the approved state, and whether the pull request approval rule has been set aside by an override.
     */
    public val evaluation: aws.sdk.kotlin.services.codecommit.model.Evaluation? = builder.evaluation

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

    override fun toString(): kotlin.String = buildString {
        append("EvaluatePullRequestApprovalRulesResponse(")
        append("evaluation=$evaluation")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = evaluation?.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 EvaluatePullRequestApprovalRulesResponse

        if (evaluation != other.evaluation) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The result of the evaluation, including the names of the rules whose conditions have been met (if any), the names of the rules whose conditions have not been met (if any), whether the pull request is in the approved state, and whether the pull request approval rule has been set aside by an override.
         */
        public var evaluation: aws.sdk.kotlin.services.codecommit.model.Evaluation? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.EvaluatePullRequestApprovalRulesResponse) : this() {
            this.evaluation = x.evaluation
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy