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

commonMain.aws.sdk.kotlin.services.codecommit.model.MergePullRequestByFastForwardRequest.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 MergePullRequestByFastForwardRequest private constructor(builder: Builder) {
    /**
     * The system-generated ID of the pull request. To get this ID, use ListPullRequests.
     */
    public val pullRequestId: kotlin.String? = builder.pullRequestId
    /**
     * The name of the repository where the pull request was created.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName
    /**
     * The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
     */
    public val sourceCommitId: kotlin.String? = builder.sourceCommitId

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

    override fun toString(): kotlin.String = buildString {
        append("MergePullRequestByFastForwardRequest(")
        append("pullRequestId=$pullRequestId,")
        append("repositoryName=$repositoryName,")
        append("sourceCommitId=$sourceCommitId")
        append(")")
    }

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

        if (pullRequestId != other.pullRequestId) return false
        if (repositoryName != other.repositoryName) return false
        if (sourceCommitId != other.sourceCommitId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The system-generated ID of the pull request. To get this ID, use ListPullRequests.
         */
        public var pullRequestId: kotlin.String? = null
        /**
         * The name of the repository where the pull request was created.
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
         */
        public var sourceCommitId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.MergePullRequestByFastForwardRequest) : this() {
            this.pullRequestId = x.pullRequestId
            this.repositoryName = x.repositoryName
            this.sourceCommitId = x.sourceCommitId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy