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

commonMain.aws.sdk.kotlin.services.codecommit.model.DeleteFileResponse.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 DeleteFileResponse private constructor(builder: Builder) {
    /**
     * The blob ID removed from the tree as part of deleting the file.
     */
    public val blobId: kotlin.String = requireNotNull(builder.blobId) { "A non-null value must be provided for blobId" }
    /**
     * The full commit ID of the commit that contains the change that deletes the file.
     */
    public val commitId: kotlin.String = requireNotNull(builder.commitId) { "A non-null value must be provided for commitId" }
    /**
     * The fully qualified path to the file to be deleted, including the full name and extension of that file.
     */
    public val filePath: kotlin.String = requireNotNull(builder.filePath) { "A non-null value must be provided for filePath" }
    /**
     * The full SHA-1 pointer of the tree information for the commit that contains the delete file change.
     */
    public val treeId: kotlin.String = requireNotNull(builder.treeId) { "A non-null value must be provided for treeId" }

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteFileResponse(")
        append("blobId=$blobId,")
        append("commitId=$commitId,")
        append("filePath=$filePath,")
        append("treeId=$treeId")
        append(")")
    }

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

        if (blobId != other.blobId) return false
        if (commitId != other.commitId) return false
        if (filePath != other.filePath) return false
        if (treeId != other.treeId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The blob ID removed from the tree as part of deleting the file.
         */
        public var blobId: kotlin.String? = null
        /**
         * The full commit ID of the commit that contains the change that deletes the file.
         */
        public var commitId: kotlin.String? = null
        /**
         * The fully qualified path to the file to be deleted, including the full name and extension of that file.
         */
        public var filePath: kotlin.String? = null
        /**
         * The full SHA-1 pointer of the tree information for the commit that contains the delete file change.
         */
        public var treeId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.DeleteFileResponse) : this() {
            this.blobId = x.blobId
            this.commitId = x.commitId
            this.filePath = x.filePath
            this.treeId = x.treeId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy