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

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

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

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

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

/**
 * Trial component definition.
 * @property codeId ARM resource ID of the code asset.
 * @property command [Required] The command to execute on startup of the job. eg. "python train.py"
 * @property distribution Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
 * @property environmentId [Required] The ARM resource ID of the Environment specification for the job.
 * @property environmentVariables Environment variables included in the job.
 * @property resources Compute Resource configuration for the job.
 */
public data class TrialComponentArgs(
    public val codeId: Output? = null,
    public val command: Output,
    public val distribution: Output? = null,
    public val environmentId: Output,
    public val environmentVariables: Output>? = null,
    public val resources: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.TrialComponentArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.TrialComponentArgs.builder()
            .codeId(codeId?.applyValue({ args0 -> args0 }))
            .command(command.applyValue({ args0 -> args0 }))
            .distribution(distribution?.applyValue({ args0 -> args0 }))
            .environmentId(environmentId.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resources(resources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [TrialComponentArgs].
 */
@PulumiTagMarker
public class TrialComponentArgsBuilder internal constructor() {
    private var codeId: Output? = null

    private var command: Output? = null

    private var distribution: Output? = null

    private var environmentId: Output? = null

    private var environmentVariables: Output>? = null

    private var resources: Output? = null

    /**
     * @param value ARM resource ID of the code asset.
     */
    @JvmName("nbikwmmnopckyajs")
    public suspend fun codeId(`value`: Output) {
        this.codeId = value
    }

    /**
     * @param value [Required] The command to execute on startup of the job. eg. "python train.py"
     */
    @JvmName("qdesbhxwrleaaspn")
    public suspend fun command(`value`: Output) {
        this.command = value
    }

    /**
     * @param value Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
     */
    @JvmName("dhnwfwmxqiyocrkk")
    public suspend fun distribution(`value`: Output) {
        this.distribution = value
    }

    /**
     * @param value [Required] The ARM resource ID of the Environment specification for the job.
     */
    @JvmName("ajgebetonhyyutrf")
    public suspend fun environmentId(`value`: Output) {
        this.environmentId = value
    }

    /**
     * @param value Environment variables included in the job.
     */
    @JvmName("jwvoeecdttvpuqlv")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value Compute Resource configuration for the job.
     */
    @JvmName("wrohplaycafecbmb")
    public suspend fun resources(`value`: Output) {
        this.resources = value
    }

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

    /**
     * @param value [Required] The command to execute on startup of the job. eg. "python train.py"
     */
    @JvmName("shemqdyrfqvglqaq")
    public suspend fun command(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param value Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
     */
    @JvmName("lwacpeykhvgtwqcm")
    public suspend fun distribution(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distribution = mapped
    }

    /**
     * @param value [Required] The ARM resource ID of the Environment specification for the job.
     */
    @JvmName("qwyvwpvgdgnxfhki")
    public suspend fun environmentId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentId = mapped
    }

    /**
     * @param value Environment variables included in the job.
     */
    @JvmName("emygtytnfgctyjls")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values Environment variables included in the job.
     */
    @JvmName("yunpyeiswyubjynp")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Compute Resource configuration for the job.
     */
    @JvmName("gbmvflertlcbfkrf")
    public suspend fun resources(`value`: JobResourceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument Compute Resource configuration for the job.
     */
    @JvmName("ouwvxxdvcbtbkyfv")
    public suspend fun resources(argument: suspend JobResourceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = JobResourceConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    internal fun build(): TrialComponentArgs = TrialComponentArgs(
        codeId = codeId,
        command = command ?: throw PulumiNullFieldException("command"),
        distribution = distribution,
        environmentId = environmentId ?: throw PulumiNullFieldException("environmentId"),
        environmentVariables = environmentVariables,
        resources = resources,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy