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

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

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

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



/**
 * Provides information about a document that could not be indexed.
 */
public class BatchPutDocumentResponseFailedDocument private constructor(builder: Builder) {
    /**
     * The type of error that caused the document to fail to be indexed.
     */
    public val errorCode: aws.sdk.kotlin.services.kendra.model.ErrorCode? = builder.errorCode
    /**
     * A description of the reason why the document could not be indexed.
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The identifier of the document.
     */
    public val id: kotlin.String? = builder.id

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

    override fun toString(): kotlin.String = buildString {
        append("BatchPutDocumentResponseFailedDocument(")
        append("errorCode=$errorCode,")
        append("errorMessage=$errorMessage,")
        append("id=$id")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorCode?.hashCode() ?: 0
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (id?.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 BatchPutDocumentResponseFailedDocument

        if (errorCode != other.errorCode) return false
        if (errorMessage != other.errorMessage) return false
        if (id != other.id) return false

        return true
    }

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

    public class Builder {
        /**
         * The type of error that caused the document to fail to be indexed.
         */
        public var errorCode: aws.sdk.kotlin.services.kendra.model.ErrorCode? = null
        /**
         * A description of the reason why the document could not be indexed.
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The identifier of the document.
         */
        public var id: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.BatchPutDocumentResponseFailedDocument) : this() {
            this.errorCode = x.errorCode
            this.errorMessage = x.errorMessage
            this.id = x.id
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy