
commonMain.aws.sdk.kotlin.services.kendra.model.SourceDocument.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* The document ID and its fields/attributes that are used for a query suggestion, if document fields set to use for query suggestions.
*/
public class SourceDocument private constructor(builder: Builder) {
/**
* The additional fields/attributes to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.
*/
public val additionalAttributes: List? = builder.additionalAttributes
/**
* The identifier of the document used for a query suggestion.
*/
public val documentId: kotlin.String? = builder.documentId
/**
* The document fields/attributes used for a query suggestion.
*/
public val suggestionAttributes: List? = builder.suggestionAttributes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.SourceDocument = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SourceDocument(")
append("additionalAttributes=$additionalAttributes,")
append("documentId=$documentId,")
append("suggestionAttributes=$suggestionAttributes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalAttributes?.hashCode() ?: 0
result = 31 * result + (documentId?.hashCode() ?: 0)
result = 31 * result + (suggestionAttributes?.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 SourceDocument
if (additionalAttributes != other.additionalAttributes) return false
if (documentId != other.documentId) return false
if (suggestionAttributes != other.suggestionAttributes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.SourceDocument = Builder(this).apply(block).build()
public class Builder {
/**
* The additional fields/attributes to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.
*/
public var additionalAttributes: List? = null
/**
* The identifier of the document used for a query suggestion.
*/
public var documentId: kotlin.String? = null
/**
* The document fields/attributes used for a query suggestion.
*/
public var suggestionAttributes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.SourceDocument) : this() {
this.additionalAttributes = x.additionalAttributes
this.documentId = x.documentId
this.suggestionAttributes = x.suggestionAttributes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.SourceDocument = SourceDocument(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy