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

commonMain.aws.sdk.kotlin.services.codecommit.model.Folder.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 a folder in a repository.
 */
public class Folder private constructor(builder: Builder) {
    /**
     * The fully qualified path of the folder in the repository.
     */
    public val absolutePath: kotlin.String? = builder.absolutePath
    /**
     * The relative path of the specified folder from the folder where the query originated.
     */
    public val relativePath: kotlin.String? = builder.relativePath
    /**
     * The full SHA-1 pointer of the tree information for the commit that contains the folder.
     */
    public val treeId: kotlin.String? = builder.treeId

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

    override fun toString(): kotlin.String = buildString {
        append("Folder(")
        append("absolutePath=$absolutePath,")
        append("relativePath=$relativePath,")
        append("treeId=$treeId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = absolutePath?.hashCode() ?: 0
        result = 31 * result + (relativePath?.hashCode() ?: 0)
        result = 31 * result + (treeId?.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 Folder

        if (absolutePath != other.absolutePath) return false
        if (relativePath != other.relativePath) return false
        if (treeId != other.treeId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The fully qualified path of the folder in the repository.
         */
        public var absolutePath: kotlin.String? = null
        /**
         * The relative path of the specified folder from the folder where the query originated.
         */
        public var relativePath: kotlin.String? = null
        /**
         * The full SHA-1 pointer of the tree information for the commit that contains the folder.
         */
        public var treeId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.Folder) : this() {
            this.absolutePath = x.absolutePath
            this.relativePath = x.relativePath
            this.treeId = x.treeId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy