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

commonMain.aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestApprovalStateRequest.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 UpdatePullRequestApprovalStateRequest private constructor(builder: Builder) {
    /**
     * The approval state to associate with the user on the pull request.
     */
    public val approvalState: aws.sdk.kotlin.services.codecommit.model.ApprovalState? = builder.approvalState
    /**
     * The system-generated ID of the pull request.
     */
    public val pullRequestId: kotlin.String? = builder.pullRequestId
    /**
     * The system-generated ID of the revision.
     */
    public val revisionId: kotlin.String? = builder.revisionId

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePullRequestApprovalStateRequest(")
        append("approvalState=$approvalState,")
        append("pullRequestId=$pullRequestId,")
        append("revisionId=$revisionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = approvalState?.hashCode() ?: 0
        result = 31 * result + (pullRequestId?.hashCode() ?: 0)
        result = 31 * result + (revisionId?.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 UpdatePullRequestApprovalStateRequest

        if (approvalState != other.approvalState) return false
        if (pullRequestId != other.pullRequestId) return false
        if (revisionId != other.revisionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The approval state to associate with the user on the pull request.
         */
        public var approvalState: aws.sdk.kotlin.services.codecommit.model.ApprovalState? = null
        /**
         * The system-generated ID of the pull request.
         */
        public var pullRequestId: kotlin.String? = null
        /**
         * The system-generated ID of the revision.
         */
        public var revisionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestApprovalStateRequest) : this() {
            this.approvalState = x.approvalState
            this.pullRequestId = x.pullRequestId
            this.revisionId = x.revisionId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy