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

commonMain.aws.sdk.kotlin.services.codecommit.model.PutFileResponse.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 PutFileResponse private constructor(builder: Builder) {
    /**
     * The ID of the blob, which is its SHA-1 pointer.
     */
    public val blobId: kotlin.String = requireNotNull(builder.blobId) { "A non-null value must be provided for blobId" }
    /**
     * The full SHA ID of the commit that contains this file change.
     */
    public val commitId: kotlin.String = requireNotNull(builder.commitId) { "A non-null value must be provided for commitId" }
    /**
     * The full SHA-1 pointer of the tree information for the commit that contains this 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.PutFileResponse = Builder().apply(block).build()
    }

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the blob, which is its SHA-1 pointer.
         */
        public var blobId: kotlin.String? = null
        /**
         * The full SHA ID of the commit that contains this file change.
         */
        public var commitId: kotlin.String? = null
        /**
         * The full SHA-1 pointer of the tree information for the commit that contains this file change.
         */
        public var treeId: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy