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

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

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

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



/**
 * An excerpt from a table within a document. The table excerpt displays up to five columns and three rows, depending on how many table cells are relevant to the query and how many columns are available in the original table. The top most relevant cell is displayed in the table excerpt, along with the next most relevant cells.
 */
public class TableExcerpt private constructor(builder: Builder) {
    /**
     * A list of rows in the table excerpt.
     */
    public val rows: List? = builder.rows
    /**
     * A count of the number of rows in the original table within the document.
     */
    public val totalNumberOfRows: kotlin.Int? = builder.totalNumberOfRows

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

    override fun toString(): kotlin.String = buildString {
        append("TableExcerpt(")
        append("rows=$rows,")
        append("totalNumberOfRows=$totalNumberOfRows")
        append(")")
    }

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

        if (rows != other.rows) return false
        if (totalNumberOfRows != other.totalNumberOfRows) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of rows in the table excerpt.
         */
        public var rows: List? = null
        /**
         * A count of the number of rows in the original table within the document.
         */
        public var totalNumberOfRows: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.TableExcerpt) : this() {
            this.rows = x.rows
            this.totalNumberOfRows = x.totalNumberOfRows
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy