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

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

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

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

import com.pulumi.azurenative.machinelearningservices.inputs.BanditPolicyArgs.builder
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.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation
 * @property delayEvaluation Number of intervals by which to delay the first evaluation.
 * @property evaluationInterval Interval (number of runs) between policy evaluations.
 * @property policyType
 * Expected value is 'Bandit'.
 * @property slackAmount Absolute distance allowed from the best performing run.
 * @property slackFactor Ratio of the allowed distance from the best performing run.
 */
public data class BanditPolicyArgs(
    public val delayEvaluation: Output? = null,
    public val evaluationInterval: Output? = null,
    public val policyType: Output,
    public val slackAmount: Output? = null,
    public val slackFactor: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.BanditPolicyArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.BanditPolicyArgs.builder()
            .delayEvaluation(delayEvaluation?.applyValue({ args0 -> args0 }))
            .evaluationInterval(evaluationInterval?.applyValue({ args0 -> args0 }))
            .policyType(policyType.applyValue({ args0 -> args0 }))
            .slackAmount(slackAmount?.applyValue({ args0 -> args0 }))
            .slackFactor(slackFactor?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BanditPolicyArgs].
 */
@PulumiTagMarker
public class BanditPolicyArgsBuilder internal constructor() {
    private var delayEvaluation: Output? = null

    private var evaluationInterval: Output? = null

    private var policyType: Output? = null

    private var slackAmount: Output? = null

    private var slackFactor: Output? = null

    /**
     * @param value Number of intervals by which to delay the first evaluation.
     */
    @JvmName("xdmmmkjrdtijnbkk")
    public suspend fun delayEvaluation(`value`: Output) {
        this.delayEvaluation = value
    }

    /**
     * @param value Interval (number of runs) between policy evaluations.
     */
    @JvmName("egxkqsgpmpxtdwsu")
    public suspend fun evaluationInterval(`value`: Output) {
        this.evaluationInterval = value
    }

    /**
     * @param value
     * Expected value is 'Bandit'.
     */
    @JvmName("shvijlmogrpoeiko")
    public suspend fun policyType(`value`: Output) {
        this.policyType = value
    }

    /**
     * @param value Absolute distance allowed from the best performing run.
     */
    @JvmName("bqonwiireqtlriys")
    public suspend fun slackAmount(`value`: Output) {
        this.slackAmount = value
    }

    /**
     * @param value Ratio of the allowed distance from the best performing run.
     */
    @JvmName("haitaamqsioukeec")
    public suspend fun slackFactor(`value`: Output) {
        this.slackFactor = value
    }

    /**
     * @param value Number of intervals by which to delay the first evaluation.
     */
    @JvmName("kvolxepdqwkpadkr")
    public suspend fun delayEvaluation(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.delayEvaluation = mapped
    }

    /**
     * @param value Interval (number of runs) between policy evaluations.
     */
    @JvmName("moygknlifouqoffd")
    public suspend fun evaluationInterval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluationInterval = mapped
    }

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

    /**
     * @param value Absolute distance allowed from the best performing run.
     */
    @JvmName("suvjesprknmwtanj")
    public suspend fun slackAmount(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slackAmount = mapped
    }

    /**
     * @param value Ratio of the allowed distance from the best performing run.
     */
    @JvmName("inecttnaejtcmotn")
    public suspend fun slackFactor(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slackFactor = mapped
    }

    internal fun build(): BanditPolicyArgs = BanditPolicyArgs(
        delayEvaluation = delayEvaluation,
        evaluationInterval = evaluationInterval,
        policyType = policyType ?: throw PulumiNullFieldException("policyType"),
        slackAmount = slackAmount,
        slackFactor = slackFactor,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy