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

com.pulumi.azurenative.machinelearningservices.kotlin.inputs.SweepJobArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.azurenative.machinelearningservices.inputs.SweepJobArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Sweep job definition.
 * @property componentId ARM resource ID of the component resource.
 * @property computeId ARM resource ID of the compute resource.
 * @property description The asset description text.
 * @property displayName Display name of job.
 * @property earlyTermination Early termination policies enable canceling poor-performing runs before they complete
 * @property experimentName The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment.
 * @property identity Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null.
 * Defaults to AmlToken if null.
 * @property inputs Mapping of input data bindings used in the job.
 * @property isArchived Is the asset archived?
 * @property jobType Enum to determine the type of job.
 * Expected value is 'Sweep'.
 * @property limits Sweep Job limit.
 * @property objective [Required] Optimization objective.
 * @property outputs Mapping of output data bindings used in the job.
 * @property properties The asset property dictionary.
 * @property samplingAlgorithm [Required] The hyperparameter sampling algorithm
 * @property searchSpace [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter
 * @property services List of JobEndpoints.
 * For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
 * @property tags Tag dictionary. Tags can be added, removed, and updated.
 * @property trial [Required] Trial component definition.
 */
public data class SweepJobArgs(
    public val componentId: Output? = null,
    public val computeId: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val earlyTermination: Output? = null,
    public val experimentName: Output? = null,
    public val identity: Output? = null,
    public val inputs: Output>? = null,
    public val isArchived: Output? = null,
    public val jobType: Output,
    public val limits: Output? = null,
    public val objective: Output,
    public val outputs: Output>? = null,
    public val properties: Output>? = null,
    public val samplingAlgorithm: Output,
    public val searchSpace: Output,
    public val services: Output>? = null,
    public val tags: Output>? = null,
    public val trial: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.SweepJobArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.SweepJobArgs.builder()
            .componentId(componentId?.applyValue({ args0 -> args0 }))
            .computeId(computeId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .earlyTermination(earlyTermination?.applyValue({ args0 -> args0 }))
            .experimentName(experimentName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0 }))
            .inputs(inputs?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .isArchived(isArchived?.applyValue({ args0 -> args0 }))
            .jobType(jobType.applyValue({ args0 -> args0 }))
            .limits(limits?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .objective(objective.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .outputs(outputs?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .samplingAlgorithm(samplingAlgorithm.applyValue({ args0 -> args0 }))
            .searchSpace(searchSpace.applyValue({ args0 -> args0 }))
            .services(
                services?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .trial(trial.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [SweepJobArgs].
 */
@PulumiTagMarker
public class SweepJobArgsBuilder internal constructor() {
    private var componentId: Output? = null

    private var computeId: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var earlyTermination: Output? = null

    private var experimentName: Output? = null

    private var identity: Output? = null

    private var inputs: Output>? = null

    private var isArchived: Output? = null

    private var jobType: Output? = null

    private var limits: Output? = null

    private var objective: Output? = null

    private var outputs: Output>? = null

    private var properties: Output>? = null

    private var samplingAlgorithm: Output? = null

    private var searchSpace: Output? = null

    private var services: Output>? = null

    private var tags: Output>? = null

    private var trial: Output? = null

    /**
     * @param value ARM resource ID of the component resource.
     */
    @JvmName("hmoqfjibrqihwgpm")
    public suspend fun componentId(`value`: Output) {
        this.componentId = value
    }

    /**
     * @param value ARM resource ID of the compute resource.
     */
    @JvmName("kkpukgpyhwujjpea")
    public suspend fun computeId(`value`: Output) {
        this.computeId = value
    }

    /**
     * @param value The asset description text.
     */
    @JvmName("ixedsdyobblqylly")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Display name of job.
     */
    @JvmName("larxcmewgqcnrstm")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Early termination policies enable canceling poor-performing runs before they complete
     */
    @JvmName("umgqvavenkkegsxn")
    public suspend fun earlyTermination(`value`: Output) {
        this.earlyTermination = value
    }

    /**
     * @param value The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment.
     */
    @JvmName("faklahcnsvtcaksg")
    public suspend fun experimentName(`value`: Output) {
        this.experimentName = value
    }

    /**
     * @param value Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null.
     * Defaults to AmlToken if null.
     */
    @JvmName("rejjrgahgrdbumuv")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Mapping of input data bindings used in the job.
     */
    @JvmName("dlpanvurvmdhsaig")
    public suspend fun inputs(`value`: Output>) {
        this.inputs = value
    }

    /**
     * @param value Is the asset archived?
     */
    @JvmName("lgrfykjervvjtytv")
    public suspend fun isArchived(`value`: Output) {
        this.isArchived = value
    }

    /**
     * @param value Enum to determine the type of job.
     * Expected value is 'Sweep'.
     */
    @JvmName("wsesnyyhodfshvli")
    public suspend fun jobType(`value`: Output) {
        this.jobType = value
    }

    /**
     * @param value Sweep Job limit.
     */
    @JvmName("ejpeeqyjodqxnohf")
    public suspend fun limits(`value`: Output) {
        this.limits = value
    }

    /**
     * @param value [Required] Optimization objective.
     */
    @JvmName("fmbftttpmvxdbhvh")
    public suspend fun objective(`value`: Output) {
        this.objective = value
    }

    /**
     * @param value Mapping of output data bindings used in the job.
     */
    @JvmName("mpeplapefjtcmuxl")
    public suspend fun outputs(`value`: Output>) {
        this.outputs = value
    }

    /**
     * @param value The asset property dictionary.
     */
    @JvmName("pheoiunaaqambeov")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value [Required] The hyperparameter sampling algorithm
     */
    @JvmName("mleviycbvfdjhafy")
    public suspend fun samplingAlgorithm(`value`: Output) {
        this.samplingAlgorithm = value
    }

    /**
     * @param value [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter
     */
    @JvmName("ouvvmllqqbactwju")
    public suspend fun searchSpace(`value`: Output) {
        this.searchSpace = value
    }

    /**
     * @param value List of JobEndpoints.
     * For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
     */
    @JvmName("hpgvsjfhwhavlhfe")
    public suspend fun services(`value`: Output>) {
        this.services = value
    }

    /**
     * @param value Tag dictionary. Tags can be added, removed, and updated.
     */
    @JvmName("whwgfwmesvswysfe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value [Required] Trial component definition.
     */
    @JvmName("miduqpbhflddpvxg")
    public suspend fun trial(`value`: Output) {
        this.trial = value
    }

    /**
     * @param value ARM resource ID of the component resource.
     */
    @JvmName("nuobrobunudpumoy")
    public suspend fun componentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.componentId = mapped
    }

    /**
     * @param value ARM resource ID of the compute resource.
     */
    @JvmName("qqkutosavoxsnvek")
    public suspend fun computeId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeId = mapped
    }

    /**
     * @param value The asset description text.
     */
    @JvmName("kokvoqnojqartods")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Display name of job.
     */
    @JvmName("scymjxtinlrttltt")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Early termination policies enable canceling poor-performing runs before they complete
     */
    @JvmName("acdyewtufqrvijsb")
    public suspend fun earlyTermination(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.earlyTermination = mapped
    }

    /**
     * @param value The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment.
     */
    @JvmName("abhkdlkgkiwfmxfk")
    public suspend fun experimentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.experimentName = mapped
    }

    /**
     * @param value Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null.
     * Defaults to AmlToken if null.
     */
    @JvmName("gitmnmkcvhtikdow")
    public suspend fun identity(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param value Mapping of input data bindings used in the job.
     */
    @JvmName("hgoejdmwedoyeqvv")
    public suspend fun inputs(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inputs = mapped
    }

    /**
     * @param values Mapping of input data bindings used in the job.
     */
    @JvmName("jjmhpeyneaxalrvg")
    public fun inputs(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inputs = mapped
    }

    /**
     * @param value Is the asset archived?
     */
    @JvmName("epqsxwffkbxtfbxs")
    public suspend fun isArchived(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isArchived = mapped
    }

    /**
     * @param value Enum to determine the type of job.
     * Expected value is 'Sweep'.
     */
    @JvmName("bshtmiafcsgufbmd")
    public suspend fun jobType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.jobType = mapped
    }

    /**
     * @param value Sweep Job limit.
     */
    @JvmName("mtoclhmocpjgseph")
    public suspend fun limits(`value`: SweepJobLimitsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.limits = mapped
    }

    /**
     * @param argument Sweep Job limit.
     */
    @JvmName("kblyhmklukjgxnnp")
    public suspend fun limits(argument: suspend SweepJobLimitsArgsBuilder.() -> Unit) {
        val toBeMapped = SweepJobLimitsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.limits = mapped
    }

    /**
     * @param value [Required] Optimization objective.
     */
    @JvmName("qfpfnrmnqpjhrvhx")
    public suspend fun objective(`value`: ObjectiveArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.objective = mapped
    }

    /**
     * @param argument [Required] Optimization objective.
     */
    @JvmName("jvcawnnkjmaojngd")
    public suspend fun objective(argument: suspend ObjectiveArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectiveArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.objective = mapped
    }

    /**
     * @param value Mapping of output data bindings used in the job.
     */
    @JvmName("qoqvhupsdlsjwful")
    public suspend fun outputs(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputs = mapped
    }

    /**
     * @param values Mapping of output data bindings used in the job.
     */
    @JvmName("kpcagcrfvgjucnlo")
    public fun outputs(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.outputs = mapped
    }

    /**
     * @param value The asset property dictionary.
     */
    @JvmName("petrmfjxqcbvdelh")
    public suspend fun properties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param values The asset property dictionary.
     */
    @JvmName("cmhauhgwpkppusmv")
    public fun properties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value [Required] The hyperparameter sampling algorithm
     */
    @JvmName("pnyguhgwnfyddhjn")
    public suspend fun samplingAlgorithm(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.samplingAlgorithm = mapped
    }

    /**
     * @param value [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter
     */
    @JvmName("tbechmhgjrknngqi")
    public suspend fun searchSpace(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.searchSpace = mapped
    }

    /**
     * @param value List of JobEndpoints.
     * For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
     */
    @JvmName("yjupwduaawqpwnen")
    public suspend fun services(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.services = mapped
    }

    /**
     * @param argument List of JobEndpoints.
     * For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
     */
    @JvmName("kfdwxfjhjavrgekp")
    public suspend fun services(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                JobServiceArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.services = mapped
    }

    /**
     * @param values List of JobEndpoints.
     * For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
     */
    @JvmName("lwxekpdckpqqyirk")
    public fun services(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.services = mapped
    }

    /**
     * @param value Tag dictionary. Tags can be added, removed, and updated.
     */
    @JvmName("yirkhoxgbttminta")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Tag dictionary. Tags can be added, removed, and updated.
     */
    @JvmName("gqqfsclcavryguyi")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value [Required] Trial component definition.
     */
    @JvmName("lkwvjlnfxklqsjrr")
    public suspend fun trial(`value`: TrialComponentArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.trial = mapped
    }

    /**
     * @param argument [Required] Trial component definition.
     */
    @JvmName("wiogvoqyqkfcatej")
    public suspend fun trial(argument: suspend TrialComponentArgsBuilder.() -> Unit) {
        val toBeMapped = TrialComponentArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.trial = mapped
    }

    internal fun build(): SweepJobArgs = SweepJobArgs(
        componentId = componentId,
        computeId = computeId,
        description = description,
        displayName = displayName,
        earlyTermination = earlyTermination,
        experimentName = experimentName,
        identity = identity,
        inputs = inputs,
        isArchived = isArchived,
        jobType = jobType ?: throw PulumiNullFieldException("jobType"),
        limits = limits,
        objective = objective ?: throw PulumiNullFieldException("objective"),
        outputs = outputs,
        properties = properties,
        samplingAlgorithm = samplingAlgorithm ?: throw PulumiNullFieldException("samplingAlgorithm"),
        searchSpace = searchSpace ?: throw PulumiNullFieldException("searchSpace"),
        services = services,
        tags = tags,
        trial = trial ?: throw PulumiNullFieldException("trial"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy