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

commonMain.aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.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

/**
 * Information about the details of a merge hunk that contains a conflict in a merge or pull request operation.
 */
public class MergeHunkDetail private constructor(builder: Builder) {
    /**
     * The end position of the hunk in the merge result.
     */
    public val endLine: kotlin.Int? = builder.endLine
    /**
     * The base-64 encoded content of the hunk merged region that might contain a conflict.
     */
    public val hunkContent: kotlin.String? = builder.hunkContent
    /**
     * The start position of the hunk in the merge result.
     */
    public val startLine: kotlin.Int? = builder.startLine

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

    override fun toString(): kotlin.String = buildString {
        append("MergeHunkDetail(")
        append("endLine=$endLine,")
        append("hunkContent=$hunkContent,")
        append("startLine=$startLine")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endLine ?: 0
        result = 31 * result + (hunkContent?.hashCode() ?: 0)
        result = 31 * result + (startLine ?: 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 MergeHunkDetail

        if (endLine != other.endLine) return false
        if (hunkContent != other.hunkContent) return false
        if (startLine != other.startLine) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The end position of the hunk in the merge result.
         */
        public var endLine: kotlin.Int? = null
        /**
         * The base-64 encoded content of the hunk merged region that might contain a conflict.
         */
        public var hunkContent: kotlin.String? = null
        /**
         * The start position of the hunk in the merge result.
         */
        public var startLine: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail) : this() {
            this.endLine = x.endLine
            this.hunkContent = x.hunkContent
            this.startLine = x.startLine
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy