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

commonMain.aws.sdk.kotlin.services.kendra.model.Status.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kendra.model



/**
 * Provides information about the status of documents submitted for indexing.
 */
public class Status private constructor(builder: Builder) {
    /**
     * The identifier of the document.
     */
    public val documentId: kotlin.String? = builder.documentId
    /**
     * The current status of a document.
     *
     * If the document was submitted for deletion, the status is `NOT_FOUND` after the document is deleted.
     */
    public val documentStatus: aws.sdk.kotlin.services.kendra.model.DocumentStatus? = builder.documentStatus
    /**
     * Indicates the source of the error.
     */
    public val failureCode: kotlin.String? = builder.failureCode
    /**
     * Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.
     */
    public val failureReason: kotlin.String? = builder.failureReason

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

    override fun toString(): kotlin.String = buildString {
        append("Status(")
        append("documentId=$documentId,")
        append("documentStatus=$documentStatus,")
        append("failureCode=$failureCode,")
        append("failureReason=$failureReason")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = documentId?.hashCode() ?: 0
        result = 31 * result + (documentStatus?.hashCode() ?: 0)
        result = 31 * result + (failureCode?.hashCode() ?: 0)
        result = 31 * result + (failureReason?.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 Status

        if (documentId != other.documentId) return false
        if (documentStatus != other.documentStatus) return false
        if (failureCode != other.failureCode) return false
        if (failureReason != other.failureReason) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier of the document.
         */
        public var documentId: kotlin.String? = null
        /**
         * The current status of a document.
         *
         * If the document was submitted for deletion, the status is `NOT_FOUND` after the document is deleted.
         */
        public var documentStatus: aws.sdk.kotlin.services.kendra.model.DocumentStatus? = null
        /**
         * Indicates the source of the error.
         */
        public var failureCode: kotlin.String? = null
        /**
         * Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.
         */
        public var failureReason: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.Status) : this() {
            this.documentId = x.documentId
            this.documentStatus = x.documentStatus
            this.failureCode = x.failureCode
            this.failureReason = x.failureReason
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy