
commonMain.aws.sdk.kotlin.services.kendra.model.SuggestionHighlight.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* The text highlights for a single query suggestion.
*/
public class SuggestionHighlight private constructor(builder: Builder) {
/**
* The zero-based location in the response string where the highlight starts.
*/
public val beginOffset: kotlin.Int? = builder.beginOffset
/**
* The zero-based location in the response string where the highlight ends.
*/
public val endOffset: kotlin.Int? = builder.endOffset
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.SuggestionHighlight = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SuggestionHighlight(")
append("beginOffset=$beginOffset,")
append("endOffset=$endOffset")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffset ?: 0
result = 31 * result + (endOffset ?: 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 SuggestionHighlight
if (beginOffset != other.beginOffset) return false
if (endOffset != other.endOffset) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.SuggestionHighlight = Builder(this).apply(block).build()
public class Builder {
/**
* The zero-based location in the response string where the highlight starts.
*/
public var beginOffset: kotlin.Int? = null
/**
* The zero-based location in the response string where the highlight ends.
*/
public var endOffset: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.SuggestionHighlight) : this() {
this.beginOffset = x.beginOffset
this.endOffset = x.endOffset
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.SuggestionHighlight = SuggestionHighlight(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy