All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.vertex.kotlin.outputs.AiIndexMetadataConfig.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.vertex.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property algorithmConfig The configuration with regard to the algorithms used for efficient search.
 * Structure is documented below.
 * @property approximateNeighborsCount The default number of neighbors to find via approximate search before exact reordering is
 * performed. Exact reordering is a procedure where results returned by an
 * approximate search algorithm are reordered via a more expensive distance computation.
 * Required if tree-AH algorithm is used.
 * @property dimensions The number of dimensions of the input vectors.
 * @property distanceMeasureType The distance measure used in nearest neighbor search. The value must be one of the followings:
 * * SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
 * * L1_DISTANCE: Manhattan (L_1) Distance
 * * COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
 * * DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
 * @property featureNormType Type of normalization to be carried out on each vector. The value must be one of the followings:
 * * UNIT_L2_NORM: Unit L2 normalization type
 * * NONE: No normalization type is specified.
 * @property shardSize Index data is split into equal parts to be processed. These are called "shards".
 * The shard size must be specified when creating an index. The value must be one of the followings:
 * * SHARD_SIZE_SMALL: Small (2GB)
 * * SHARD_SIZE_MEDIUM: Medium (20GB)
 * * SHARD_SIZE_LARGE: Large (50GB)
 */
public data class AiIndexMetadataConfig(
    public val algorithmConfig: AiIndexMetadataConfigAlgorithmConfig? = null,
    public val approximateNeighborsCount: Int? = null,
    public val dimensions: Int,
    public val distanceMeasureType: String? = null,
    public val featureNormType: String? = null,
    public val shardSize: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.vertex.outputs.AiIndexMetadataConfig): AiIndexMetadataConfig = AiIndexMetadataConfig(
            algorithmConfig = javaType.algorithmConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.vertex.kotlin.outputs.AiIndexMetadataConfigAlgorithmConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            approximateNeighborsCount = javaType.approximateNeighborsCount().map({ args0 ->
                args0
            }).orElse(null),
            dimensions = javaType.dimensions(),
            distanceMeasureType = javaType.distanceMeasureType().map({ args0 -> args0 }).orElse(null),
            featureNormType = javaType.featureNormType().map({ args0 -> args0 }).orElse(null),
            shardSize = javaType.shardSize().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy