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

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

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

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



/**
 * A featured document with its metadata information. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.
 */
public class FeaturedDocumentWithMetadata private constructor(builder: Builder) {
    /**
     * The identifier of the featured document with its metadata. You can use the [Query](https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html) API to search for specific documents with their document IDs included in the result items, or you can use the console.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The main title of the featured document.
     */
    public val title: kotlin.String? = builder.title
    /**
     * The source URI location of the featured document.
     */
    public val uri: kotlin.String? = builder.uri

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

    override fun toString(): kotlin.String = buildString {
        append("FeaturedDocumentWithMetadata(")
        append("id=$id,")
        append("title=$title,")
        append("uri=$uri")
        append(")")
    }

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

        if (id != other.id) return false
        if (title != other.title) return false
        if (uri != other.uri) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier of the featured document with its metadata. You can use the [Query](https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html) API to search for specific documents with their document IDs included in the result items, or you can use the console.
         */
        public var id: kotlin.String? = null
        /**
         * The main title of the featured document.
         */
        public var title: kotlin.String? = null
        /**
         * The source URI location of the featured document.
         */
        public var uri: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.FeaturedDocumentWithMetadata) : this() {
            this.id = x.id
            this.title = x.title
            this.uri = x.uri
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy