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

commonMain.aws.sdk.kotlin.services.qbusiness.model.DocumentDetails.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qbusiness.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details of a document within an Amazon Q Business index.
 */
public class DocumentDetails private constructor(builder: Builder) {
    /**
     * The timestamp for when the document was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The identifier of the document.
     */
    public val documentId: kotlin.String? = builder.documentId
    /**
     * An error message associated with the document.
     */
    public val error: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail? = builder.error
    /**
     * The current status of the document.
     */
    public val status: aws.sdk.kotlin.services.qbusiness.model.DocumentStatus? = builder.status
    /**
     * The timestamp for when the document was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("DocumentDetails(")
        append("createdAt=$createdAt,")
        append("documentId=$documentId,")
        append("error=$error,")
        append("status=$status,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (documentId?.hashCode() ?: 0)
        result = 31 * result + (error?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (updatedAt?.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 DocumentDetails

        if (createdAt != other.createdAt) return false
        if (documentId != other.documentId) return false
        if (error != other.error) return false
        if (status != other.status) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    public class Builder {
        /**
         * The timestamp for when the document was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The identifier of the document.
         */
        public var documentId: kotlin.String? = null
        /**
         * An error message associated with the document.
         */
        public var error: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail? = null
        /**
         * The current status of the document.
         */
        public var status: aws.sdk.kotlin.services.qbusiness.model.DocumentStatus? = null
        /**
         * The timestamp for when the document was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.DocumentDetails) : this() {
            this.createdAt = x.createdAt
            this.documentId = x.documentId
            this.error = x.error
            this.status = x.status
            this.updatedAt = x.updatedAt
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.qbusiness.model.ErrorDetail] inside the given [block]
         */
        public fun error(block: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail.Builder.() -> kotlin.Unit) {
            this.error = aws.sdk.kotlin.services.qbusiness.model.ErrorDetail.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy