commonMain.aws.sdk.kotlin.services.qconnect.model.Highlight.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qconnect-jvm Show documentation
Show all versions of qconnect-jvm Show documentation
The AWS SDK for Kotlin client for QConnect
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qconnect.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.
*/
public class Highlight private constructor(builder: Builder) {
/**
* The offset for the start of the highlight.
*/
public val beginOffsetInclusive: kotlin.Int = builder.beginOffsetInclusive
/**
* The offset for the end of the highlight.
*/
public val endOffsetExclusive: kotlin.Int = builder.endOffsetExclusive
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qconnect.model.Highlight = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Highlight(")
append("beginOffsetInclusive=$beginOffsetInclusive,")
append("endOffsetExclusive=$endOffsetExclusive")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffsetInclusive
result = 31 * result + (endOffsetExclusive)
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 Highlight
if (beginOffsetInclusive != other.beginOffsetInclusive) return false
if (endOffsetExclusive != other.endOffsetExclusive) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qconnect.model.Highlight = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The offset for the start of the highlight.
*/
public var beginOffsetInclusive: kotlin.Int = 0
/**
* The offset for the end of the highlight.
*/
public var endOffsetExclusive: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qconnect.model.Highlight) : this() {
this.beginOffsetInclusive = x.beginOffsetInclusive
this.endOffsetExclusive = x.endOffsetExclusive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qconnect.model.Highlight = Highlight(this)
internal fun correctErrors(): Builder {
return this
}
}
}