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

com.pulumi.azurenative.machinelearningservices.kotlin.inputs.RandomSamplingAlgorithmArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.machinelearningservices.kotlin.inputs

import com.pulumi.azurenative.machinelearningservices.inputs.RandomSamplingAlgorithmArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.enums.RandomSamplingAlgorithmRule
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Defines a Sampling Algorithm that generates values randomly
 * @property rule The specific type of random algorithm
 * @property samplingAlgorithmType
 * Expected value is 'Random'.
 * @property seed An optional integer to use as the seed for random number generation
 */
public data class RandomSamplingAlgorithmArgs(
    public val rule: Output>? = null,
    public val samplingAlgorithmType: Output,
    public val seed: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.RandomSamplingAlgorithmArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.RandomSamplingAlgorithmArgs.builder()
            .rule(
                rule?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .samplingAlgorithmType(samplingAlgorithmType.applyValue({ args0 -> args0 }))
            .seed(seed?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RandomSamplingAlgorithmArgs].
 */
@PulumiTagMarker
public class RandomSamplingAlgorithmArgsBuilder internal constructor() {
    private var rule: Output>? = null

    private var samplingAlgorithmType: Output? = null

    private var seed: Output? = null

    /**
     * @param value The specific type of random algorithm
     */
    @JvmName("wjdwwaaufgceuerg")
    public suspend fun rule(`value`: Output>) {
        this.rule = value
    }

    /**
     * @param value
     * Expected value is 'Random'.
     */
    @JvmName("ktpubteurxudjoke")
    public suspend fun samplingAlgorithmType(`value`: Output) {
        this.samplingAlgorithmType = value
    }

    /**
     * @param value An optional integer to use as the seed for random number generation
     */
    @JvmName("fswllfgsxvpfgkkh")
    public suspend fun seed(`value`: Output) {
        this.seed = value
    }

    /**
     * @param value The specific type of random algorithm
     */
    @JvmName("wsjpjksmstqhctov")
    public suspend fun rule(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rule = mapped
    }

    /**
     * @param value The specific type of random algorithm
     */
    @JvmName("vvvusagmkslddaso")
    public fun rule(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rule = mapped
    }

    /**
     * @param value The specific type of random algorithm
     */
    @JvmName("mxtioqkdothhaose")
    public fun rule(`value`: RandomSamplingAlgorithmRule) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rule = mapped
    }

    /**
     * @param value
     * Expected value is 'Random'.
     */
    @JvmName("qvepkcsoktxfgqle")
    public suspend fun samplingAlgorithmType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.samplingAlgorithmType = mapped
    }

    /**
     * @param value An optional integer to use as the seed for random number generation
     */
    @JvmName("huafbynapymhplty")
    public suspend fun seed(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.seed = mapped
    }

    internal fun build(): RandomSamplingAlgorithmArgs = RandomSamplingAlgorithmArgs(
        rule = rule,
        samplingAlgorithmType = samplingAlgorithmType ?: throw
            PulumiNullFieldException("samplingAlgorithmType"),
        seed = seed,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy