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

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

/**
 * Returns information about errors in a BatchDescribeMergeConflicts operation.
 */
public class BatchDescribeMergeConflictsError private constructor(builder: Builder) {
    /**
     * The name of the exception.
     */
    public val exceptionName: kotlin.String = requireNotNull(builder.exceptionName) { "A non-null value must be provided for exceptionName" }
    /**
     * The path to the file.
     */
    public val filePath: kotlin.String = requireNotNull(builder.filePath) { "A non-null value must be provided for filePath" }
    /**
     * The message provided by the exception.
     */
    public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }

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

    override fun toString(): kotlin.String = buildString {
        append("BatchDescribeMergeConflictsError(")
        append("exceptionName=$exceptionName,")
        append("filePath=$filePath,")
        append("message=$message")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = exceptionName.hashCode()
        result = 31 * result + (filePath.hashCode())
        result = 31 * result + (message.hashCode())
        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 BatchDescribeMergeConflictsError

        if (exceptionName != other.exceptionName) return false
        if (filePath != other.filePath) return false
        if (message != other.message) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the exception.
         */
        public var exceptionName: kotlin.String? = null
        /**
         * The path to the file.
         */
        public var filePath: kotlin.String? = null
        /**
         * The message provided by the exception.
         */
        public var message: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.BatchDescribeMergeConflictsError) : this() {
            this.exceptionName = x.exceptionName
            this.filePath = x.filePath
            this.message = x.message
        }

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

        internal fun correctErrors(): Builder {
            if (exceptionName == null) exceptionName = ""
            if (filePath == null) filePath = ""
            if (message == null) message = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy