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

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

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

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



public class RetrieveResponse private constructor(builder: Builder) {
    /**
     * The identifier of query used for the search. You also use `QueryId` to identify the search when using the [Submitfeedback](https://docs.aws.amazon.com/kendra/latest/APIReference/API_SubmitFeedback.html) API.
     */
    public val queryId: kotlin.String? = builder.queryId
    /**
     * The results of the retrieved relevant passages for the search.
     */
    public val resultItems: List? = builder.resultItems

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

    override fun toString(): kotlin.String = buildString {
        append("RetrieveResponse(")
        append("queryId=$queryId,")
        append("resultItems=$resultItems")
        append(")")
    }

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

        if (queryId != other.queryId) return false
        if (resultItems != other.resultItems) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier of query used for the search. You also use `QueryId` to identify the search when using the [Submitfeedback](https://docs.aws.amazon.com/kendra/latest/APIReference/API_SubmitFeedback.html) API.
         */
        public var queryId: kotlin.String? = null
        /**
         * The results of the retrieved relevant passages for the search.
         */
        public var resultItems: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.RetrieveResponse) : this() {
            this.queryId = x.queryId
            this.resultItems = x.resultItems
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy