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

commonMain.aws.sdk.kotlin.services.codecommit.model.OverridePullRequestApprovalRulesRequest.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 OverridePullRequestApprovalRulesRequest private constructor(builder: Builder) {
    /**
     * Whether you want to set aside approval rule requirements for the pull request (OVERRIDE) or revoke a previous override and apply approval rule requirements (REVOKE). REVOKE status is not stored.
     */
    public val overrideStatus: aws.sdk.kotlin.services.codecommit.model.OverrideStatus? = builder.overrideStatus
    /**
     * The system-generated ID of the pull request for which you want to override all approval rule requirements. To get this information, use GetPullRequest.
     */
    public val pullRequestId: kotlin.String? = builder.pullRequestId
    /**
     * The system-generated ID of the most recent revision of the pull request. You cannot override approval rules for anything but the most recent revision of a pull request. To get the revision ID, use GetPullRequest.
     */
    public val revisionId: kotlin.String? = builder.revisionId

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

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

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

        if (overrideStatus != other.overrideStatus) 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.OverridePullRequestApprovalRulesRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Whether you want to set aside approval rule requirements for the pull request (OVERRIDE) or revoke a previous override and apply approval rule requirements (REVOKE). REVOKE status is not stored.
         */
        public var overrideStatus: aws.sdk.kotlin.services.codecommit.model.OverrideStatus? = null
        /**
         * The system-generated ID of the pull request for which you want to override all approval rule requirements. To get this information, use GetPullRequest.
         */
        public var pullRequestId: kotlin.String? = null
        /**
         * The system-generated ID of the most recent revision of the pull request. You cannot override approval rules for anything but the most recent revision of a pull request. To get the revision ID, use GetPullRequest.
         */
        public var revisionId: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy