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

commonMain.aws.sdk.kotlin.services.codecommit.model.MergeBranchesByFastForwardRequest.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 MergeBranchesByFastForwardRequest private constructor(builder: Builder) {
    /**
     * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
     */
    public val destinationCommitSpecifier: kotlin.String? = builder.destinationCommitSpecifier
    /**
     * The name of the repository where you want to merge two branches.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName
    /**
     * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
     */
    public val sourceCommitSpecifier: kotlin.String? = builder.sourceCommitSpecifier
    /**
     * The branch where the merge is applied.
     */
    public val targetBranch: kotlin.String? = builder.targetBranch

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

    override fun toString(): kotlin.String = buildString {
        append("MergeBranchesByFastForwardRequest(")
        append("destinationCommitSpecifier=$destinationCommitSpecifier,")
        append("repositoryName=$repositoryName,")
        append("sourceCommitSpecifier=$sourceCommitSpecifier,")
        append("targetBranch=$targetBranch")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = destinationCommitSpecifier?.hashCode() ?: 0
        result = 31 * result + (repositoryName?.hashCode() ?: 0)
        result = 31 * result + (sourceCommitSpecifier?.hashCode() ?: 0)
        result = 31 * result + (targetBranch?.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 MergeBranchesByFastForwardRequest

        if (destinationCommitSpecifier != other.destinationCommitSpecifier) return false
        if (repositoryName != other.repositoryName) return false
        if (sourceCommitSpecifier != other.sourceCommitSpecifier) return false
        if (targetBranch != other.targetBranch) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
         */
        public var destinationCommitSpecifier: kotlin.String? = null
        /**
         * The name of the repository where you want to merge two branches.
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
         */
        public var sourceCommitSpecifier: kotlin.String? = null
        /**
         * The branch where the merge is applied.
         */
        public var targetBranch: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.MergeBranchesByFastForwardRequest) : this() {
            this.destinationCommitSpecifier = x.destinationCommitSpecifier
            this.repositoryName = x.repositoryName
            this.sourceCommitSpecifier = x.sourceCommitSpecifier
            this.targetBranch = x.targetBranch
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy