
commonMain.aws.sdk.kotlin.services.kendra.model.AdditionalResultAttributeValue.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* An attribute returned with a document from a search.
*/
public class AdditionalResultAttributeValue private constructor(builder: Builder) {
/**
* The text associated with the attribute and information about the highlight to apply to the text.
*/
public val textWithHighlightsValue: aws.sdk.kotlin.services.kendra.model.TextWithHighlights? = builder.textWithHighlightsValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.AdditionalResultAttributeValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AdditionalResultAttributeValue(")
append("textWithHighlightsValue=$textWithHighlightsValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = textWithHighlightsValue?.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 AdditionalResultAttributeValue
if (textWithHighlightsValue != other.textWithHighlightsValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.AdditionalResultAttributeValue = Builder(this).apply(block).build()
public class Builder {
/**
* The text associated with the attribute and information about the highlight to apply to the text.
*/
public var textWithHighlightsValue: aws.sdk.kotlin.services.kendra.model.TextWithHighlights? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.AdditionalResultAttributeValue) : this() {
this.textWithHighlightsValue = x.textWithHighlightsValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.AdditionalResultAttributeValue = AdditionalResultAttributeValue(this)
/**
* construct an [aws.sdk.kotlin.services.kendra.model.TextWithHighlights] inside the given [block]
*/
public fun textWithHighlightsValue(block: aws.sdk.kotlin.services.kendra.model.TextWithHighlights.Builder.() -> kotlin.Unit) {
this.textWithHighlightsValue = aws.sdk.kotlin.services.kendra.model.TextWithHighlights.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy