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

commonMain.aws.sdk.kotlin.services.codecommit.model.SourceFileSpecifier.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 a source file that is part of changes made in a commit.
 */
public class SourceFileSpecifier private constructor(builder: Builder) {
    /**
     * The full path to the file, including the name of the file.
     */
    public val filePath: kotlin.String = requireNotNull(builder.filePath) { "A non-null value must be provided for filePath" }
    /**
     * Whether to remove the source file from the parent commit.
     */
    public val isMove: kotlin.Boolean = builder.isMove

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

    override fun toString(): kotlin.String = buildString {
        append("SourceFileSpecifier(")
        append("filePath=$filePath,")
        append("isMove=$isMove")
        append(")")
    }

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

        if (filePath != other.filePath) return false
        if (isMove != other.isMove) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The full path to the file, including the name of the file.
         */
        public var filePath: kotlin.String? = null
        /**
         * Whether to remove the source file from the parent commit.
         */
        public var isMove: kotlin.Boolean = false

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy