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

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

/**
 * If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
 */
public class ConflictResolution private constructor(builder: Builder) {
    /**
     * Files to be deleted as part of the merge conflict resolution.
     */
    public val deleteFiles: List? = builder.deleteFiles
    /**
     * Files to have content replaced as part of the merge conflict resolution.
     */
    public val replaceContents: List? = builder.replaceContents
    /**
     * File modes that are set as part of the merge conflict resolution.
     */
    public val setFileModes: List? = builder.setFileModes

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

    override fun toString(): kotlin.String = buildString {
        append("ConflictResolution(")
        append("deleteFiles=$deleteFiles,")
        append("replaceContents=$replaceContents,")
        append("setFileModes=$setFileModes")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deleteFiles?.hashCode() ?: 0
        result = 31 * result + (replaceContents?.hashCode() ?: 0)
        result = 31 * result + (setFileModes?.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 ConflictResolution

        if (deleteFiles != other.deleteFiles) return false
        if (replaceContents != other.replaceContents) return false
        if (setFileModes != other.setFileModes) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Files to be deleted as part of the merge conflict resolution.
         */
        public var deleteFiles: List? = null
        /**
         * Files to have content replaced as part of the merge conflict resolution.
         */
        public var replaceContents: List? = null
        /**
         * File modes that are set as part of the merge conflict resolution.
         */
        public var setFileModes: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.ConflictResolution) : this() {
            this.deleteFiles = x.deleteFiles
            this.replaceContents = x.replaceContents
            this.setFileModes = x.setFileModes
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy