commonMain.aws.sdk.kotlin.services.neptunegraph.model.VectorSearchConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptunegraph.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535
*/
public class VectorSearchConfiguration private constructor(builder: Builder) {
/**
* The number of dimensions.
*/
public val dimension: kotlin.Int = requireNotNull(builder.dimension) { "A non-null value must be provided for dimension" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.neptunegraph.model.VectorSearchConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VectorSearchConfiguration(")
append("dimension=$dimension")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dimension
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 VectorSearchConfiguration
if (dimension != other.dimension) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.neptunegraph.model.VectorSearchConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of dimensions.
*/
public var dimension: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.neptunegraph.model.VectorSearchConfiguration) : this() {
this.dimension = x.dimension
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.neptunegraph.model.VectorSearchConfiguration = VectorSearchConfiguration(this)
internal fun correctErrors(): Builder {
if (dimension == null) dimension = 0
return this
}
}
}