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

commonMain.aws.sdk.kotlin.services.codecommit.model.GetMergeOptionsResponse.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 GetMergeOptionsResponse private constructor(builder: Builder) {
    /**
     * The commit ID of the merge base.
     */
    public val baseCommitId: kotlin.String = requireNotNull(builder.baseCommitId) { "A non-null value must be provided for baseCommitId" }
    /**
     * The commit ID of the destination commit specifier that was used in the merge evaluation.
     */
    public val destinationCommitId: kotlin.String = requireNotNull(builder.destinationCommitId) { "A non-null value must be provided for destinationCommitId" }
    /**
     * The merge option or strategy used to merge the code.
     */
    public val mergeOptions: List = requireNotNull(builder.mergeOptions) { "A non-null value must be provided for mergeOptions" }
    /**
     * The commit ID of the source commit specifier that was used in the merge evaluation.
     */
    public val sourceCommitId: kotlin.String = requireNotNull(builder.sourceCommitId) { "A non-null value must be provided for sourceCommitId" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetMergeOptionsResponse(")
        append("baseCommitId=$baseCommitId,")
        append("destinationCommitId=$destinationCommitId,")
        append("mergeOptions=$mergeOptions,")
        append("sourceCommitId=$sourceCommitId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = baseCommitId.hashCode()
        result = 31 * result + (destinationCommitId.hashCode())
        result = 31 * result + (mergeOptions.hashCode())
        result = 31 * result + (sourceCommitId.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 GetMergeOptionsResponse

        if (baseCommitId != other.baseCommitId) return false
        if (destinationCommitId != other.destinationCommitId) return false
        if (mergeOptions != other.mergeOptions) return false
        if (sourceCommitId != other.sourceCommitId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The commit ID of the merge base.
         */
        public var baseCommitId: kotlin.String? = null
        /**
         * The commit ID of the destination commit specifier that was used in the merge evaluation.
         */
        public var destinationCommitId: kotlin.String? = null
        /**
         * The merge option or strategy used to merge the code.
         */
        public var mergeOptions: List? = null
        /**
         * The commit ID of the source commit specifier that was used in the merge evaluation.
         */
        public var sourceCommitId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.GetMergeOptionsResponse) : this() {
            this.baseCommitId = x.baseCommitId
            this.destinationCommitId = x.destinationCommitId
            this.mergeOptions = x.mergeOptions
            this.sourceCommitId = x.sourceCommitId
        }

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

        internal fun correctErrors(): Builder {
            if (baseCommitId == null) baseCommitId = ""
            if (destinationCommitId == null) destinationCommitId = ""
            if (mergeOptions == null) mergeOptions = emptyList()
            if (sourceCommitId == null) sourceCommitId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy