
commonMain.aws.sdk.kotlin.services.qbusiness.model.SourceAttribution.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* The documents used to generate an Amazon Q Business web experience response.
*/
public class SourceAttribution private constructor(builder: Builder) {
/**
* The number attached to a citation in an Amazon Q Business generated response.
*/
public val citationNumber: kotlin.Int? = builder.citationNumber
/**
* The content extract from the document on which the generated response is based.
*/
public val snippet: kotlin.String? = builder.snippet
/**
* A text extract from a source document that is used for source attribution.
*/
public val textMessageSegments: List? = builder.textMessageSegments
/**
* The title of the document which is the source for the Amazon Q Business generated response.
*/
public val title: kotlin.String? = builder.title
/**
* The Unix timestamp when the Amazon Q Business application was last updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
/**
* The URL of the document which is the source for the Amazon Q Business generated response.
*/
public val url: kotlin.String? = builder.url
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.SourceAttribution = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SourceAttribution(")
append("citationNumber=$citationNumber,")
append("snippet=$snippet,")
append("textMessageSegments=$textMessageSegments,")
append("title=$title,")
append("updatedAt=$updatedAt,")
append("url=$url")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = citationNumber ?: 0
result = 31 * result + (snippet?.hashCode() ?: 0)
result = 31 * result + (textMessageSegments?.hashCode() ?: 0)
result = 31 * result + (title?.hashCode() ?: 0)
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (url?.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 SourceAttribution
if (citationNumber != other.citationNumber) return false
if (snippet != other.snippet) return false
if (textMessageSegments != other.textMessageSegments) return false
if (title != other.title) return false
if (updatedAt != other.updatedAt) return false
if (url != other.url) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.SourceAttribution = Builder(this).apply(block).build()
public class Builder {
/**
* The number attached to a citation in an Amazon Q Business generated response.
*/
public var citationNumber: kotlin.Int? = null
/**
* The content extract from the document on which the generated response is based.
*/
public var snippet: kotlin.String? = null
/**
* A text extract from a source document that is used for source attribution.
*/
public var textMessageSegments: List? = null
/**
* The title of the document which is the source for the Amazon Q Business generated response.
*/
public var title: kotlin.String? = null
/**
* The Unix timestamp when the Amazon Q Business application was last updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The URL of the document which is the source for the Amazon Q Business generated response.
*/
public var url: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.SourceAttribution) : this() {
this.citationNumber = x.citationNumber
this.snippet = x.snippet
this.textMessageSegments = x.textMessageSegments
this.title = x.title
this.updatedAt = x.updatedAt
this.url = x.url
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.SourceAttribution = SourceAttribution(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy