commonMain.aws.sdk.kotlin.services.bedrockagent.model.VectorKnowledgeBaseConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains details about the model used to create vector embeddings for the knowledge base.
*/
public class VectorKnowledgeBaseConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.
*/
public val embeddingModelArn: kotlin.String = requireNotNull(builder.embeddingModelArn) { "A non-null value must be provided for embeddingModelArn" }
/**
* The embeddings model configuration details for the vector model used in Knowledge Base.
*/
public val embeddingModelConfiguration: aws.sdk.kotlin.services.bedrockagent.model.EmbeddingModelConfiguration? = builder.embeddingModelConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.VectorKnowledgeBaseConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VectorKnowledgeBaseConfiguration(")
append("embeddingModelArn=$embeddingModelArn,")
append("embeddingModelConfiguration=$embeddingModelConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = embeddingModelArn.hashCode()
result = 31 * result + (embeddingModelConfiguration?.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 VectorKnowledgeBaseConfiguration
if (embeddingModelArn != other.embeddingModelArn) return false
if (embeddingModelConfiguration != other.embeddingModelConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.VectorKnowledgeBaseConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.
*/
public var embeddingModelArn: kotlin.String? = null
/**
* The embeddings model configuration details for the vector model used in Knowledge Base.
*/
public var embeddingModelConfiguration: aws.sdk.kotlin.services.bedrockagent.model.EmbeddingModelConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.VectorKnowledgeBaseConfiguration) : this() {
this.embeddingModelArn = x.embeddingModelArn
this.embeddingModelConfiguration = x.embeddingModelConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.VectorKnowledgeBaseConfiguration = VectorKnowledgeBaseConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.EmbeddingModelConfiguration] inside the given [block]
*/
public fun embeddingModelConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.EmbeddingModelConfiguration.Builder.() -> kotlin.Unit) {
this.embeddingModelConfiguration = aws.sdk.kotlin.services.bedrockagent.model.EmbeddingModelConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (embeddingModelArn == null) embeddingModelArn = ""
return this
}
}
}