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

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

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

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



/**
 * Provides information about the number of documents and the number of questions and answers in an index.
 */
public class IndexStatistics private constructor(builder: Builder) {
    /**
     * The number of question and answer topics in the index.
     */
    public val faqStatistics: aws.sdk.kotlin.services.kendra.model.FaqStatistics? = builder.faqStatistics
    /**
     * The number of text documents indexed.
     */
    public val textDocumentStatistics: aws.sdk.kotlin.services.kendra.model.TextDocumentStatistics? = builder.textDocumentStatistics

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

    override fun toString(): kotlin.String = buildString {
        append("IndexStatistics(")
        append("faqStatistics=$faqStatistics,")
        append("textDocumentStatistics=$textDocumentStatistics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = faqStatistics?.hashCode() ?: 0
        result = 31 * result + (textDocumentStatistics?.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 IndexStatistics

        if (faqStatistics != other.faqStatistics) return false
        if (textDocumentStatistics != other.textDocumentStatistics) return false

        return true
    }

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

    public class Builder {
        /**
         * The number of question and answer topics in the index.
         */
        public var faqStatistics: aws.sdk.kotlin.services.kendra.model.FaqStatistics? = null
        /**
         * The number of text documents indexed.
         */
        public var textDocumentStatistics: aws.sdk.kotlin.services.kendra.model.TextDocumentStatistics? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.IndexStatistics) : this() {
            this.faqStatistics = x.faqStatistics
            this.textDocumentStatistics = x.textDocumentStatistics
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy